| Conditions | 4 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| 1 | <?php |
||
| 13 | /** |
||
| 14 | * @inheritDoc |
||
| 15 | * |
||
| 16 | * @throws \DomainException if $middlewares does not conform to type expectations |
||
| 17 | */ |
||
| 18 | 10 | protected function assertValid(array $middlewares) |
|
| 19 | { |
||
| 20 | 10 | parent::assertValid($middlewares); |
|
| 21 | |||
| 22 | 10 | foreach ($middlewares as $middleware) { |
|
| 23 | 3 | if (!(is_callable($middleware) || method_exists($middleware, '__invoke'))) { |
|
| 24 | 1 | throw new DomainException( |
|
| 25 | 'All elements of $middlewares must be callable' |
||
| 31 |