Total Complexity | 4 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
9 | class MiddlewareException extends RuntimeException |
||
10 | { |
||
11 | public static function invalidValueReturnedFromMiddleware(): self |
||
12 | { |
||
13 | return new self(sprintf( |
||
14 | 'Middleware has returned invalid value, %s expected. Did you forgot return statement?', |
||
15 | ResponseInterface::class |
||
16 | )); |
||
17 | } |
||
18 | |||
19 | public static function invalidArgumentsPassedToNextCallback(): self |
||
25 | )); |
||
26 | } |
||
27 | |||
28 | public static function forEmptyMiddlewarePipeline(): self |
||
29 | { |
||
30 | return new self('Middleware pipeline is empty.'); |
||
31 | } |
||
32 | |||
33 | public static function forInvalidMiddlewareResponse($response): self |
||
40 | )); |
||
41 | } |
||
43 |