| Conditions | 8 |
| Paths | 7 |
| Total Lines | 29 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 32 | public function processNode(Node $node, Scope $scope): array |
||
| 33 | { |
||
| 34 | $class = $scope->getClassReflection(); |
||
| 35 | |||
| 36 | if ($class === null) { |
||
| 37 | return []; |
||
| 38 | } |
||
| 39 | |||
| 40 | if (!$class->implementsInterface(CompilerPassInterface::class)) { |
||
| 41 | return []; |
||
| 42 | } |
||
| 43 | |||
| 44 | if (!$node->name instanceof Identifier) { |
||
| 45 | return []; |
||
| 46 | } |
||
| 47 | |||
| 48 | if ((string) $node->name !== 'getVariable' && (string) $node->name !== 'hasVariable') { |
||
| 49 | return []; |
||
| 50 | } |
||
| 51 | |||
| 52 | if (!$node->class instanceof Name) { |
||
| 53 | return []; |
||
| 54 | } |
||
| 55 | |||
| 56 | if ((string) $node->class !== EnvironmentHelper::class) { |
||
| 57 | return []; |
||
| 58 | } |
||
| 59 | |||
| 60 | return ['Do not use EnvironmentHelper inside compiler passes.']; |
||
| 61 | } |
||
| 63 |
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