,ignored_issues?:list}> */ public function providerValidCodeParse(): iterable { return [ 'publicPropertiesOf' => [ 'code' => ' */ function returnPropertyOfA() { return ["foo" => true]; } ', ], 'protectedPropertiesOf' => [ 'code' => ' */ function returnPropertyOfA() { return ["adams" => 42]; } ', ], 'privatePropertiesOf' => [ 'code' => ' */ function returnPropertyOfA() { return ["bar" => "foo"]; } ', ], 'allPropertiesOf' => [ 'code' => ' */ function returnPropertyOfA(int $visibility) { return [ "foo" => true, "bar" => "foo", "adams" => 1 ]; } ', ], 'allPropertiesOfContainsNoStatic' => [ 'code' => ' */ function returnPropertyOfA(int $visibility) { return [ "foo" => true, "bar" => "foo", "adams" => 1 ]; } ', ], 'usePropertiesOfSelfAsArrayKey' => [ 'code' => ' */ public function asArray() { return [ "a" => $this->a, "b" => $this->b ]; } } ', ], 'usePropertiesOfStaticAsArrayKey' => [ 'code' => ' */ public function asArray() { return [ "a" => $this->a, "b" => $this->b ]; } } class B extends A { /** @var int */ public $c = 3; public function asArray() { return [ "a" => $this->a, "b" => $this->b, "c" => $this->c, ]; } } ', ], 'propertiesOfMultipleInheritanceStaticAsArrayKey' => [ 'code' => ' */ public function asArray() { return [ "a" => $this->a, "b" => $this->b ]; } } class B extends A { /** @var int */ public $c = 3; } class C extends B { /** @var int */ public $d = 4; public function asArray() { return [ "a" => $this->a, "b" => $this->b, "c" => $this->c, "d" => $this->d, ]; } } ', ], ]; } /** * @return iterable,php_version?:string}> */ public function providerInvalidCodeParse(): iterable { return [ 'onlyOneTemplateParam' => [ 'code' => ' */ $test = "foobar"; ', 'error_message' => 'InvalidDocblock', ], 'propertiesOfPicksNoStatic' => [ 'code' => ' */ function returnPropertyOfA() { return ["foo" => true]; } ', 'error_message' => 'InvalidReturnStatement' ], 'publicPropertiesOfPicksNoPrivate' => [ 'code' => ' */ function returnPropertyOfA() { return ["bar" => true]; } ', 'error_message' => 'InvalidReturnStatement' ], 'publicPropertiesOfPicksNoProtected' => [ 'code' => ' */ function returnPropertyOfA() { return ["adams" => true]; } ', 'error_message' => 'InvalidReturnStatement' ], 'protectedPropertiesOfPicksNoPublic' => [ 'code' => ' */ function returnPropertyOfA() { return ["foo" => true]; } ', 'error_message' => 'InvalidReturnStatement' ], 'protectedPropertiesOfPicksNoPrivate' => [ 'code' => ' */ function returnPropertyOfA() { return ["bar" => true]; } ', 'error_message' => 'InvalidReturnStatement' ], 'privatePropertiesOfPicksNoPublic' => [ 'code' => ' */ function returnPropertyOfA() { return ["foo" => true]; } ', 'error_message' => 'InvalidReturnStatement' ], 'privatePropertiesOfPicksNoProtected' => [ 'code' => ' */ function returnPropertyOfA() { return ["adams" => true]; } ', 'error_message' => 'InvalidReturnStatement' ], ]; } }