Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | 2 | public static function __callStatic(string $name, array $arguments): AddBusNameStampMiddleware |
|
35 | { |
||
36 | 2 | if (! array_key_exists(0, $arguments) || ! $arguments[0] instanceof ContainerInterface) { |
|
37 | 1 | throw new InvalidArgumentException(sprintf( |
|
38 | 1 | 'The first argument must be of type %s', |
|
39 | 1 | ContainerInterface::class |
|
40 | )); |
||
41 | } |
||
42 | |||
43 | 1 | return (new static($name))($arguments[0]); |
|
44 | } |
||
46 |