Total Complexity | 9 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
8 | class DecoratorChain implements DecoratorChainInterface |
||
9 | { |
||
10 | /** |
||
11 | * @var DecoratorInterface[] |
||
12 | */ |
||
13 | protected $decorators; |
||
14 | |||
15 | /** |
||
16 | * DecoratorChain constructor. |
||
17 | * |
||
18 | * @param DecoratorInterface[] $decorators |
||
19 | */ |
||
20 | 74 | public function __construct($decorators = []) |
|
28 | } |
||
29 | 74 | } |
|
30 | |||
31 | 74 | public static function getDefaultDecoratorsSet() |
|
32 | { |
||
33 | 74 | $result = []; |
|
34 | |||
35 | 74 | if (class_exists(Constraint::class)) { |
|
36 | 57 | $result[] = new AssertDecorator(); |
|
37 | } |
||
38 | |||
39 | 74 | $result[] = new PhpDocDecorator(); |
|
40 | |||
41 | 74 | return $result; |
|
42 | } |
||
43 | |||
44 | 42 | public function getDecoratedValue($value, FieldMetadata $field) |
|
45 | { |
||
46 | 42 | foreach ($this->decorators as $d) { |
|
47 | 42 | if (!$d->decorate($value, $field)) { |
|
48 | 32 | break; |
|
49 | } |
||
50 | } |
||
51 | |||
52 | 42 | return $value; |
|
53 | } |
||
54 | |||
55 | 74 | public function addDecorator(DecoratorInterface $d) |
|
58 | 74 | } |
|
59 | } |
||
60 |
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