Total Complexity | 5 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 90.91% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class MultitonInstances |
||
15 | { |
||
16 | /** @var MultitonInstances|null */ |
||
17 | protected static $instance = null; |
||
18 | /** @var Multiton */ |
||
19 | protected $multi = null; |
||
20 | |||
21 | 1 | public static function init(?Interfaces\IStTranslations $lang = null): void |
|
22 | { |
||
23 | 1 | static::$instance = new self($lang); |
|
24 | 1 | } |
|
25 | |||
26 | 1 | public static function getInstance(): Multiton |
|
32 | } |
||
33 | |||
34 | 1 | protected function __construct(?Interfaces\IStTranslations $lang = null) |
|
37 | 1 | } |
|
38 | |||
39 | /** |
||
40 | * @codeCoverageIgnore singleton |
||
41 | */ |
||
42 | private function __clone() |
||
47 |