| Conditions | 3 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 59 | private function createMiddlewareNormalizer(): callable |
||
| 60 | { |
||
| 61 | return function (mixed $middlewareName): string { |
||
| 62 | if (!\is_string($middlewareName) || !\is_a($middlewareName, MiddlewareInterface::class, true)) { |
||
| 63 | throw new \RuntimeException( |
||
| 64 | vsprintf('Each middleware must implements the "%s" interface, but "%s" doesn\'t.', [ |
||
| 65 | MiddlewareInterface::class, |
||
| 66 | $middlewareName, |
||
| 67 | ]) |
||
| 68 | ); |
||
| 69 | } |
||
| 70 | |||
| 71 | return $middlewareName; |
||
| 72 | }; |
||
| 75 |