Conditions | 4 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | 3 | public function negotiate(ServerRequestInterface $request): bool |
|
28 | { |
||
29 | 3 | if ('' === $method = $request->getHeaderLine(self::HEADER)) { |
|
30 | 1 | return false; |
|
31 | } |
||
32 | |||
33 | 2 | foreach ($this->allowMethods as $allowMethod) { |
|
34 | 2 | if ($allowMethod === $method) { |
|
35 | 2 | return true; |
|
36 | } |
||
37 | } |
||
38 | |||
39 | 1 | return false; |
|
40 | } |
||
55 |