Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
20 | 46 | public function __construct($middlewareDefinition, int $code = 0, ?Throwable $previous = null) |
|
21 | { |
||
22 | 46 | $message = 'Parameter should be either middleware class name or a callable.'; |
|
23 | |||
24 | 46 | $definitionString = $this->convertDefinitionToString($middlewareDefinition); |
|
25 | 46 | if ($definitionString !== null) { |
|
26 | 34 | $message .= ' Got ' . $definitionString . '.'; |
|
27 | } |
||
28 | |||
29 | 46 | parent::__construct($message, $code, $previous); |
|
30 | } |
||
70 |