Conditions | 2 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
32 | 5 | #[Override] |
|
33 | 5 | public function __invoke(string $varName, array $query, InjectorInterface $injector) |
|
34 | { |
||
35 | $superGlobals = static::$globals ?: $GLOBALS; |
||
|
|||
36 | /** @var array<string, array<string, string>> $superGlobals */ |
||
37 | $webContextParam = $this->webContextParam; |
||
38 | 4 | assert(is_string($webContextParam::GLOBAL_KEY)); |
|
39 | /** @psalm-suppress MixedArrayOffset */ |
||
40 | 4 | $phpWebContext = $superGlobals[$webContextParam::GLOBAL_KEY]; |
|
41 | 4 | ||
42 | 4 | return $phpWebContext[$this->webContextParam->key] ?? ($this->defaultParam)($varName, $query, $injector); |
|
43 | } |
||
51 |