,ignored_issues?:list}> */ public function providerValidCodeParse(): iterable { return [ 'classAndPropertyAttributesExists' => [ 'code' => ' [], 'ignored_issues' => [], 'php_version' => '8.0' ], 'functionAttributeExists' => [ 'code' => ' [], 'ignored_issues' => [], 'php_version' => '8.0' ], 'paramAttributeExists' => [ 'code' => ' [], 'ignored_issues' => [], 'php_version' => '8.0' ], 'testReflectingClass' => [ 'code' => 'getAttributes(BaseAttribute::class, 2) as $attr) { $attribute = $attr->newInstance(); echo $attribute->name; } }', 'assertions' => [], 'ignored_issues' => [], 'php_version' => '8.0' ], 'testReflectingAllAttributes' => [ 'code' => 'getAttributes(); ', 'assertions' => [ '$b' => 'array>', ], 'ignored_issues' => [], 'php_version' => '8.0' ], 'convertKeyedArray' => [ 'code' => 'methods = $methods; } } #[Route(methods: ["GET"])] class HealthController {}', 'assertions' => [], 'ignored_issues' => [], 'php_version' => '8.0' ], 'allowsRepeatableFlag' => [ 'code' => ' [], 'ignored_issues' => [], 'php_version' => '8.0' ], 'allowsClassString' => [ 'code' => ' $_className */ public function __construct(string $_className) { } } #[Foo(_className: Baz::class)] class Baz {}', 'assertions' => [], 'ignored_issues' => [], 'php_version' => '8.0' ], 'allowsClassStringFromDifferentNamespace' => [ 'code' => ' $className */ public function __construct(string $className) { $this->className = $className; } } interface FoobarInterface {} class Bar implements FoobarInterface {} } namespace NamespaceTwo { use NamespaceOne\FooAttribute; use NamespaceOne\Bar as ZZ; #[FooAttribute(className: ZZ::class)] class Baz {} } ' ], 'returnTypeWillChange7.1' => [ 'code' => ' [], 'ignored_issues' => [], 'php_version' => '7.1' ], 'returnTypeWillChange8.1' => [ 'code' => ' [], 'ignored_issues' => [], 'php_version' => '8.1' ] ]; } /** * @return iterable,php_version?:string}> */ public function providerInvalidCodeParse(): iterable { return [ 'attributeClassHasNoAttributeAnnotation' => [ 'code' => ' 'InvalidAttribute', 'ignored_issues' => [], 'php_version' => '8.0' ], 'missingAttributeOnClass' => [ 'code' => ' 'UndefinedAttributeClass', 'ignored_issues' => [], 'php_version' => '8.0' ], 'missingAttributeOnFunction' => [ 'code' => ' 'UndefinedAttributeClass', 'ignored_issues' => [], 'php_version' => '8.0' ], 'missingAttributeOnParam' => [ 'code' => ' 'UndefinedAttributeClass', 'ignored_issues' => [], 'php_version' => '8.0' ], 'tooFewArgumentsToAttributeConstructor' => [ 'code' => ' 'TooFewArguments', 'ignored_issues' => [], 'php_version' => '8.0' ], 'invalidArgument' => [ 'code' => ' 'InvalidScalarArgument', 'ignored_issues' => [], 'php_version' => '8.0' ], 'classAttributeUsedOnFunction' => [ 'code' => ' 'InvalidAttribute', 'ignored_issues' => [], 'php_version' => '8.0' ], 'interfaceCannotBeAttributeClass' => [ 'code' => ' 'InvalidAttribute', 'ignored_issues' => [], 'php_version' => '8.0' ], 'traitCannotBeAttributeClass' => [ 'code' => ' 'InvalidAttribute', 'ignored_issues' => [], 'php_version' => '8.0' ], 'abstractClassCannotBeAttributeClass' => [ 'code' => ' 'InvalidAttribute', 'ignored_issues' => [], 'php_version' => '8.0' ], 'abstractClassCannotHavePrivateConstructor' => [ 'code' => ' 'InvalidAttribute', 'ignored_issues' => [], 'php_version' => '8.0' ], ]; } }