,error_levels?:string[]}> */ public function providerValidCodeParse(): iterable { return [ 'constArray' => [ ' [ '$a' => 'string', ], ], 'classConstFeatures' => [ 'f(); $c4 = (new C)->four;', 'assertions' => [ '$c1' => 'int', '$c2' => 'int', '$c3' => 'int', '$c1_3rd' => 'float|int', '$c_sentence' => 'string', '$cf' => 'int', '$c4' => 'int', ], ], 'constFeatures' => [ ' [ '$one' => 'int', '$two' => 'int', ], ], 'argumentUnpacking' => [ ' [ ' [ '$a' => 'non-empty-list', ], ], 'arrayMergeArgumentUnpacking' => [ ' [ '$b' => 'array{0: int, 1: int}', ], ], 'preserveTypesWhenUnpacking' => [ '> */ function getData(): array { return [ ["a", "b"], ["c", "d"] ]; } /** * @return array */ function f1(): array { $data = getData(); return array_merge($data[0], $data[1]); } /** * @return array */ function f2(): array { $data = getData(); return array_merge(...$data); } /** * @return array */ function f3(): array { $data = getData(); return array_merge([], ...$data); }', ], 'unpackArg' => [ ' */ function Baz(string ...$c) { Foo(...$c); return $c; }', ], 'unpackByRefArg' => [ ' [ '$y' => 'int', '$z' => 'array', ], ], 'exponentiation' => [ ' [ ' [ ' [ ' [ ' [ ' */ public function providerInvalidCodeParse(): iterable { return [ 'arrayPushArgumentUnpackingWithBadArg' => [ ' 'InvalidArgument', ], ]; } }