| Conditions | 4 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function extractKey(Request $request): ?string |
||
| 21 | { |
||
| 22 | $value = $request->headers->get($this->name); |
||
| 23 | |||
| 24 | if (!$value || !$this->prefix) { |
||
| 25 | return $value; |
||
| 26 | } |
||
| 27 | |||
| 28 | if (0 !== strpos($value, $this->prefix . ' ')) { |
||
| 29 | return null; |
||
| 30 | } |
||
| 31 | |||
| 32 | return substr($value, strlen($this->prefix) + 1); |
||
| 33 | } |
||
| 35 |