| Conditions | 3 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 1 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public static function __callStatic(string $name, array $arguments): MiddlewareInterface |
||
| 43 | 1 | { |
|
| 44 | if (! array_key_exists(0, $arguments) || ! $arguments[0] instanceof ContainerInterface) { |
||
| 45 | throw new InvalidArgumentException(sprintf( |
||
| 46 | 'The first argument must be of type %s', |
||
| 47 | ContainerInterface::class |
||
| 48 | )); |
||
| 49 | } |
||
| 50 | |||
| 51 | return (new self($name))($arguments[0]); |
||
| 52 | } |
||
| 54 |