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