| Total Complexity | 4 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | final class AssistedWebContextParam implements ParamInterface |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * $GLOBALS for testing |
||
| 22 | * |
||
| 23 | * @var SuperGlobalsMap |
||
|
|
|||
| 24 | */ |
||
| 25 | private static array $globals = []; |
||
| 26 | |||
| 27 | public function __construct( |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * {@inheritDoc} |
||
| 35 | * |
||
| 36 | * @psalm-taint-source input |
||
| 37 | */ |
||
| 38 | #[Override] |
||
| 39 | public function __invoke(string $varName, array $query, InjectorInterface $injector) |
||
| 40 | { |
||
| 41 | $superGlobals = static::$globals ?: $GLOBALS; |
||
| 42 | /** @var SuperGlobalsMap $superGlobals */ |
||
| 43 | $webContextParam = $this->webContextParam; |
||
| 44 | assert(is_string($webContextParam::GLOBAL_KEY)); |
||
| 45 | /** @psalm-suppress MixedArrayOffset */ |
||
| 46 | $phpWebContext = $superGlobals[$webContextParam::GLOBAL_KEY]; |
||
| 47 | |||
| 48 | return $phpWebContext[$this->webContextParam->key] ?? ($this->defaultParam)($varName, $query, $injector); |
||
| 49 | } |
||
| 50 | |||
| 51 | /** @param SuperGlobalsMap $globals */ |
||
| 52 | public static function setSuperGlobalsOnlyForTestingPurpose(array $globals): void |
||
| 55 | } |
||
| 56 | } |
||
| 57 |
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