| Conditions | 3 |
| Paths | 2 |
| Total Lines | 7 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 18 | protected function getAuthorizationHeader(HTTPRequest $request): ?string |
||
| 19 | { |
||
| 20 | $authHeader = $request->getHeader('Authorization'); |
||
| 21 | if ($authHeader && preg_match('/Bearer\s+(?<token>.*)$/i', $authHeader, $matches)) { |
||
| 22 | return $matches['token']; |
||
| 23 | } |
||
| 24 | return null; |
||
| 25 | } |
||
| 27 |