Total Complexity | 7 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Coverage | 94.44% |
Changes | 0 |
1 | <?php |
||
9 | class AnnotationResolver |
||
10 | { |
||
11 | /** |
||
12 | * @var ReflectionProperty |
||
13 | */ |
||
14 | protected $reflection; |
||
15 | |||
16 | /** @var ?Reader */ |
||
|
|||
17 | protected static $reader; |
||
18 | |||
19 | /** |
||
20 | * TypeResolver constructor. |
||
21 | * @param ReflectionProperty $reflection |
||
22 | */ |
||
23 | 36 | public function __construct(ReflectionProperty $reflection) |
|
26 | 36 | } |
|
27 | |||
28 | 36 | public function resolve(): array |
|
29 | { |
||
30 | 36 | $annotations = []; |
|
31 | 36 | foreach (self::getReader()->getPropertyAnnotations($this->reflection) as $annotation) { |
|
32 | 7 | $annotations[get_class($annotation)] = $annotation; |
|
33 | } |
||
34 | |||
35 | 36 | return $annotations; |
|
36 | } |
||
37 | |||
38 | 1 | public static function setReader() |
|
47 | } |
||
48 | 1 | } |
|
49 | |||
50 | 36 | protected static function getReader() |
|
57 | } |
||
58 | } |
||
59 |
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