Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | public static function getInstance(?ContainerBuilder $containerBuilder = null): self |
||
36 | { |
||
37 | if (null !== self::$instance) { |
||
38 | return self::$instance; |
||
39 | } |
||
40 | |||
41 | if (null === $containerBuilder) { |
||
42 | throw new InvalidArgumentException('Container builder should be sent for ' . self::class . ' creation'); |
||
43 | } |
||
44 | |||
45 | return self::$instance = new self($containerBuilder); |
||
46 | } |
||
72 |