Conditions | 1 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
25 | public static function methodNotAllowed(string $uri, string $method, array $allowedMethods): self |
||
26 | { |
||
27 | $allowedMethods = implode(', ', $allowedMethods); |
||
28 | $exception = new self( |
||
29 | "Method `$method` not allowed. This uri `$uri` allows only $allowedMethods http methods.", |
||
30 | Response::HTTP_METHOD_NOT_ALLOWED |
||
31 | ); |
||
32 | return $exception; |
||
33 | } |
||
35 |