addFile( 'somefile.php', 'analyzeFile('somefile.php', new Context()); } /** * @return iterable,2?:string[]}> */ public function providerValidCodeParse() { return [ 'variadic' => [ ' */ function f($req, $opt = null, ...$params) { return $params; } f(1); f(1, 2); f(1, 2, 3); f(1, 2, 3, 4); f(1, 2, 3, 4, 5);', ], 'funcNumArgsVariadic' => [ ' [ ' */ function f(int ...$a_list) { return array_map( /** * @return int */ function (int $a) { return $a + 1; }, $a_list ); } f(1); f(1, 2); f(1, 2, 3); /** * @param string ...$a_list * @return void */ function g(string ...$a_list) { }', ], ]; } }