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 |
||
38 | 3 | public static function __callStatic(string $name, array $arguments): MessageBusInterface |
|
39 | { |
||
40 | 3 | if (! array_key_exists(0, $arguments) || ! $arguments[0] instanceof ContainerInterface) { |
|
41 | 1 | throw new InvalidArgumentException(sprintf( |
|
42 | 1 | 'The first argument must be of type %s', |
|
43 | 1 | ContainerInterface::class |
|
44 | )); |
||
45 | } |
||
46 | |||
47 | 2 | return (new static($name))($arguments[0]); |
|
48 | } |
||
50 |