Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 92.31% |
Changes | 0 |
1 | <?php |
||
14 | class CatchMiddleware extends AbstractWrapperMiddleware |
||
15 | { |
||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $catchClass; |
||
20 | /** |
||
21 | * @var ExceptionHandlerInterface |
||
22 | */ |
||
23 | protected $catcher; |
||
24 | |||
25 | 1 | public function __construct( |
|
26 | $innerMiddleware, |
||
27 | ExceptionHandlerInterface $catcher, |
||
28 | string $catchClass = \Throwable::class |
||
29 | ) { |
||
30 | 1 | parent::__construct($innerMiddleware); |
|
31 | 1 | $this->catchClass = $catchClass; |
|
32 | 1 | $this->catcher = $catcher; |
|
33 | 1 | } |
|
34 | |||
35 | 1 | public static function catcher( |
|
40 | } |
||
41 | |||
42 | 1 | protected function main(): ResponseInterface |
|
51 | } |
||
52 | } |
||
54 |