| Total Complexity | 4 |
| Total Lines | 34 |
| 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 |
|
| 18 | { |
||
| 19 | 1 | return new Storage(static::initFactory(), $lang); |
|
| 20 | } |
||
| 21 | |||
| 22 | 1 | public static function initFactory(): Storage\Factory |
|
| 23 | { |
||
| 24 | 1 | return new Storage\Factory( |
|
| 25 | 1 | new Storage\Key\Factory(), |
|
| 26 | 1 | new Storage\Target\Factory() |
|
| 27 | ); |
||
| 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 | * @throws StorageException |
||
| 33 | * @return IStorage |
||
| 34 | */ |
||
| 35 | 1 | public static function getStorage($params): IStorage |
|
| 36 | { |
||
| 37 | 1 | return (new Access\Factory())->getStorage($params); |
|
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param array<string|int, string|int|float|object|bool|array<string|int|float|object>>|string|object|int|bool|null $params |
||
| 42 | * @param string|null $alias |
||
| 43 | * @throws StorageException |
||
| 44 | * @return IStorage |
||
| 45 | */ |
||
| 46 | 1 | public static function getMultiStorage($params, ?string $alias = null): IStorage |
|
| 49 | } |
||
| 50 | } |
||
| 51 |