,ignored_issues?:list}> */ public function providerValidCodeParse(): iterable { return [ 'simpleVars' => [ 'code' => ' [ '$a' => 'string', '$b' => 'string', ], ], 'simpleVarsWithSeparateTypes' => [ 'code' => ' [ '$a' => 'string', '$b' => 'int', ], ], 'simpleVarsWithSeparateTypesInVar' => [ 'code' => ' [ '$a' => 'string', '$b' => 'int', ], ], 'thisVar' => [ 'code' => 'a, $this->b) = ["a", "b"]; return $this->a; } }', ], 'mixedNestedAssignment' => [ 'code' => ' [ '$a' => 'mixed', '$b' => 'mixed', '$c' => 'mixed', ], ], 'explicitLiteralKey' => [ 'code' => ' $a */ function takesList($a): void {} $a = [1, 1 => 2, 3]; takesList($a);', ], 'simpleTypeInfererNonEmptyList' => [ 'code' => ' $vars */ function foo(array $vars): void { print_r($vars); } foo(Foo::VARS); ', ], ]; } /** * @return iterable,php_version?:string}> */ public function providerInvalidCodeParse(): iterable { return [ 'thisVarWithBadType' => [ 'code' => 'a, $this->b) = ["a", "b"]; return $this->a; } }', 'error_message' => 'InvalidPropertyAssignmentValue - src' . DIRECTORY_SEPARATOR . 'somefile.php:11', ], 'explicitVariableKey' => [ 'code' => ' $a */ function takesList($a): void {} /** @return array-key */ function getKey() { return 0; } $a = [getKey() => 1]; takesList($a);', 'error_message' => 'MixedArgumentTypeCoercion', ], ]; } }