,error_levels?:string[]}> */ public function providerValidCodeParse(): iterable { return [ 'classAndPropertyAttributesExists' => [ ' [ ' [ ' [ 'getAttributes(BaseAttribute::class, 2) as $attr) { $attribute = $attr->newInstance(); echo $attribute->name; } }', [], [], '8.0' ], ]; } /** * @return iterable */ public function providerInvalidCodeParse(): iterable { return [ 'missingAttributeOnClass' => [ ' 'UndefinedAttributeClass', [], false, '8.0' ], 'missingAttributeOnFunction' => [ ' 'UndefinedAttributeClass', [], false, '8.0' ], 'missingAttributeOnParam' => [ ' 'UndefinedAttributeClass', [], false, '8.0' ], 'tooFewArgumentsToAttributeConstructor' => [ ' 'TooFewArguments', [], false, '8.0' ], 'classAttributeUsedOnFunction' => [ ' 'InvalidAttribute', [], false, '8.0' ], 'testReflectingClass74' => [ 'getAttributes(BaseAttribute::class, 2) as $attr) { $attribute = $attr->newInstance(); echo $attribute->name; } }', 'error_message' => 'UndefinedMethod', [], false, '7.4' ], ]; } }