Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
30 | protected function buildMessage(array $allowedMethods): string |
||
31 | { |
||
32 | $ending = 'Allowed method is: %s'; |
||
33 | |||
34 | if (count($allowedMethods) > 1) { |
||
35 | $ending = 'Allowed methods are: %s'; |
||
36 | } |
||
37 | |||
38 | return sprintf('Method is not allowed. ' . $ending, implode(', ', $allowedMethods)); |
||
39 | } |
||
40 | } |