Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3.072 |
Changes | 0 |
1 | <?php |
||
12 | 1 | public function supports(Request $request): bool |
|
13 | { |
||
14 | 1 | if (null === $header = $request->headers->get(RequestHeader::AUTHORIZATION)) { |
|
15 | return false; |
||
16 | } |
||
17 | |||
18 | 1 | $parts = explode(' ', $header); |
|
19 | |||
20 | 1 | return count($parts) === 2 && strcasecmp($parts[0], 'Bearer') === 0; |
|
21 | } |
||
22 | |||
28 |