,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' ], 'createObjectAsAttributeArg' => [ 'code' => ',php_version?:string}> */ public function providerInvalidCodeParse(): iterable { return [ 'attributeClassHasNoAttributeAnnotation' => [ 'code' => ' 'InvalidAttribute - src' . DIRECTORY_SEPARATOR . 'somefile.php:4:23', 'ignored_issues' => [], 'php_version' => '8.0', ], 'missingAttributeOnClass' => [ 'code' => ' 'UndefinedAttributeClass - src' . DIRECTORY_SEPARATOR . 'somefile.php:4:23', 'ignored_issues' => [], 'php_version' => '8.0', ], 'missingAttributeOnFunction' => [ 'code' => ' 'UndefinedAttributeClass - src' . DIRECTORY_SEPARATOR . 'somefile.php:4:23', 'ignored_issues' => [], 'php_version' => '8.0', ], 'missingAttributeOnParam' => [ 'code' => ' 'UndefinedAttributeClass - src' . DIRECTORY_SEPARATOR . 'somefile.php:4:36', 'ignored_issues' => [], 'php_version' => '8.0', ], 'tooFewArgumentsToAttributeConstructor' => [ 'code' => ' 'TooFewArguments - src' . DIRECTORY_SEPARATOR . 'somefile.php:9:23', 'ignored_issues' => [], 'php_version' => '8.0', ], 'invalidArgument' => [ 'code' => ' 'InvalidScalarArgument - src' . DIRECTORY_SEPARATOR . 'somefile.php:10:27', 'ignored_issues' => [], 'php_version' => '8.0', ], 'classAttributeUsedOnFunction' => [ 'code' => ' 'InvalidAttribute - src' . DIRECTORY_SEPARATOR . 'somefile.php:9:23', 'ignored_issues' => [], 'php_version' => '8.0', ], 'interfaceCannotBeAttributeClass' => [ 'code' => ' 'InvalidAttribute - src' . DIRECTORY_SEPARATOR . 'somefile.php:2:23', 'ignored_issues' => [], 'php_version' => '8.0', ], 'traitCannotBeAttributeClass' => [ 'code' => ' 'InvalidAttribute - src' . DIRECTORY_SEPARATOR . 'somefile.php:2:23', 'ignored_issues' => [], 'php_version' => '8.0', ], 'abstractClassCannotBeAttributeClass' => [ 'code' => ' 'InvalidAttribute - src' . DIRECTORY_SEPARATOR . 'somefile.php:2:23', 'ignored_issues' => [], 'php_version' => '8.0', ], 'abstractClassCannotHavePrivateConstructor' => [ 'code' => ' 'InvalidAttribute - src' . DIRECTORY_SEPARATOR . 'somefile.php:2:23', 'ignored_issues' => [], 'php_version' => '8.0', ], ]; } }