| Conditions | 4 | 
| Paths | 4 | 
| Total Lines | 15 | 
| Code Lines | 10 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 0 | 
| CRAP Score | 20 | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 17 | private function getAuthToken(ServerRequestInterface $request): ?string  | 
            ||
| 18 |     { | 
            ||
| 19 | $authHeaders = $request->getHeader($this->header);  | 
            ||
| 20 | $authHeader = \reset($authHeaders);  | 
            ||
| 21 |         if ($authHeader !== null) { | 
            ||
| 22 |             if ($this->pattern !== null) { | 
            ||
| 23 |                 if (preg_match($this->pattern, $authHeader, $matches)) { | 
            ||
| 24 | $authHeader = $matches[1];  | 
            ||
| 25 |                 } else { | 
            ||
| 26 | return null;  | 
            ||
| 27 | }  | 
            ||
| 28 | }  | 
            ||
| 29 | return $authHeader;  | 
            ||
| 30 | }  | 
            ||
| 31 | return null;  | 
            ||
| 32 | }  | 
            ||
| 33 | }  |