Total Complexity | 4 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class Helper |
||
16 | { |
||
17 | 1 | public static function initStorage(?IStTranslations $lang = null): Storage |
|
20 | } |
||
21 | |||
22 | 1 | public static function initFactory(?IStTranslations $lang = null): Storage\Factory |
|
23 | { |
||
24 | 1 | return new Storage\Factory( |
|
25 | 1 | new Storage\Key\Factory(), |
|
26 | 1 | new Storage\Target\Factory($lang) |
|
27 | 1 | ); |
|
28 | } |
||
29 | |||
30 | /** |
||
31 | * @param array<string|int, string|int|float|object|bool|array<string|int|float|object>>|string|object|int|bool|null $params |
||
32 | * @param IStTranslations|null $lang |
||
33 | * @throws StorageException |
||
34 | * @return IStorage |
||
35 | */ |
||
36 | 1 | public static function getStorage($params, ?IStTranslations $lang = null): IStorage |
|
37 | { |
||
38 | 1 | return (new Access\Factory($lang))->getStorage($params); |
|
39 | } |
||
40 | |||
41 | /** |
||
42 | * @param array<string|int, string|int|float|object|bool|array<string|int|float|object>>|string|object|int|bool|null $params |
||
43 | * @param string|null $alias |
||
44 | * @param IStTranslations|null $lang |
||
45 | * @throws StorageException |
||
46 | * @return IStorage |
||
47 | */ |
||
48 | 1 | public static function getMultiStorage($params, ?string $alias = null, ?IStTranslations $lang = null): IStorage |
|
51 | } |
||
52 | } |
||
53 |