1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace JMS\Serializer\Metadata\Driver; |
||
6 | |||
7 | use JMS\Serializer\Annotation\SerializerAttribute; |
||
8 | |||
9 | class AttributeDriver extends AnnotationOrAttributeDriver |
||
10 | { |
||
11 | /** |
||
12 | * @return list<SerializerAttribute> |
||
0 ignored issues
–
show
|
|||
13 | */ |
||
14 | protected function getClassAnnotations(\ReflectionClass $class): array |
||
15 | { |
||
16 | return array_map( |
||
0 ignored issues
–
show
|
|||
17 | static fn (\ReflectionAttribute $attribute): object => $attribute->newInstance(), |
||
18 | $class->getAttributes(SerializerAttribute::class, \ReflectionAttribute::IS_INSTANCEOF), |
||
19 | ); |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * @return list<SerializerAttribute> |
||
24 | */ |
||
25 | protected function getMethodAnnotations(\ReflectionMethod $method): array |
||
26 | { |
||
27 | return array_map( |
||
0 ignored issues
–
show
|
|||
28 | static fn (\ReflectionAttribute $attribute): object => $attribute->newInstance(), |
||
29 | $method->getAttributes(SerializerAttribute::class, \ReflectionAttribute::IS_INSTANCEOF), |
||
30 | ); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @return list<SerializerAttribute> |
||
35 | */ |
||
36 | protected function getPropertyAnnotations(\ReflectionProperty $property): array |
||
37 | { |
||
38 | return array_map( |
||
0 ignored issues
–
show
|
|||
39 | static fn (\ReflectionAttribute $attribute): object => $attribute->newInstance(), |
||
40 | $property->getAttributes(SerializerAttribute::class, \ReflectionAttribute::IS_INSTANCEOF), |
||
41 | ); |
||
42 | } |
||
43 | } |
||
44 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths