Total Complexity | 6 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class Styles |
||
15 | { |
||
16 | protected static ?ILoader $loader = null; |
||
17 | /** @var array<string, array<int, string>> */ |
||
18 | protected static array $styles = []; |
||
19 | |||
20 | 5 | public static function init(?ILoader $loader): void |
|
23 | 5 | } |
|
24 | |||
25 | 1 | public static function want(string $module, string $path): void |
|
26 | { |
||
27 | 1 | if (empty(static::$styles[$module])) { |
|
28 | 1 | static::$styles[$module] = []; |
|
29 | } |
||
30 | 1 | static::$styles[$module][] = $path; |
|
31 | 1 | } |
|
32 | |||
33 | /** |
||
34 | * @return array<string, array<int, string>> |
||
35 | */ |
||
36 | 1 | public static function getAll(): array |
|
39 | } |
||
40 | |||
41 | /** |
||
42 | * @param string $module |
||
43 | * @param string $path |
||
44 | * @throws StylesException |
||
45 | * @return string|null |
||
46 | */ |
||
47 | 4 | public static function getFile(string $module, string $path): ?string |
|
53 | } |
||
54 | } |
||
55 |