| Conditions | 5 |
| Paths | 5 |
| Total Lines | 21 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 29 | public function processNode(Node $node, Scope $scope): array |
||
| 30 | { |
||
| 31 | $class = $scope->getClassReflection(); |
||
| 32 | |||
| 33 | if ($class === null) { |
||
| 34 | return []; |
||
| 35 | } |
||
| 36 | |||
| 37 | if (!$class->implementsInterface(CompilerPassInterface::class)) { |
||
| 38 | return []; |
||
| 39 | } |
||
| 40 | |||
| 41 | if (!$node->var instanceof Node\Expr\Variable) { |
||
| 42 | return []; |
||
| 43 | } |
||
| 44 | |||
| 45 | if (!\in_array($node->var->name, ['_GET', '_POST', '_COOKIE', '_SERVER', '_FILES', '_REQUEST'], true)) { |
||
| 46 | return []; |
||
| 47 | } |
||
| 48 | |||
| 49 | return ['Do not use super globals inside compiler passes.']; |
||
| 50 | } |
||
| 52 |
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