Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
40 | 3 | public function negotiate(ServerRequestInterface $request): bool |
|
41 | { |
||
42 | 3 | if ('' === $method = $request->getHeaderLine(self::HEADER)) { |
|
43 | 1 | return false; |
|
44 | } |
||
45 | |||
46 | 2 | foreach ($this->allowMethods as $allowMethod) { |
|
47 | 2 | if ($allowMethod === $method) { |
|
48 | 2 | return true; |
|
49 | } |
||
50 | } |
||
51 | |||
52 | 1 | return false; |
|
53 | } |
||
54 | |||
63 |