Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | protected function readAuthorizationToken(): ?string |
||
21 | { |
||
22 | $headerName = 'HTTP_' . strtoupper(str_replace('-', '_', $this->headerName)); |
||
23 | $apiKey = $_SERVER[$headerName] ?? null; |
||
24 | if (!$apiKey) { |
||
25 | $this->errorMessage = 'API key is not set'; |
||
26 | return null; |
||
27 | } |
||
28 | return $apiKey; |
||
29 | } |
||
30 | |||
36 |