Conditions | 9 |
Paths | 40 |
Total Lines | 37 |
Code Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public function command(?string $pathToFile = null, ?string $pathToOptimizedFile = null): array |
||
13 | { |
||
14 | $options = $this->options; |
||
15 | $reflection = new ReflectionClass($this); |
||
16 | |||
17 | foreach ($reflection->getProperties() as $property) { |
||
18 | $attributes = $property->getAttributes(Option::class); |
||
19 | $value = $property->getValue($this); |
||
20 | |||
21 | if (is_null($value)) { |
||
22 | continue; |
||
23 | } |
||
24 | |||
25 | $value = is_a($value, BackedEnum::class) ? $value->value : $value; |
||
26 | |||
27 | foreach ($attributes as $attribute) { |
||
28 | $instance = $attribute->newInstance(); |
||
29 | |||
30 | if (is_bool($value)) { |
||
31 | $value = $value ? 'true' : 'false'; |
||
32 | } |
||
33 | |||
34 | $options[] = "$instance->name=$value"; |
||
35 | } |
||
36 | } |
||
37 | |||
38 | $command = array_merge([$this->gsBinary], $options, $this->extraOptions); |
||
39 | |||
40 | if ($pathToOptimizedFile) { |
||
41 | $command[] = "-sOutputFile=$pathToOptimizedFile"; |
||
42 | } |
||
43 | |||
44 | if ($pathToFile) { |
||
45 | $command[] = $pathToFile; |
||
46 | } |
||
47 | |||
48 | return $command; |
||
49 | } |
||
56 |
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