Conditions | 2 |
Paths | 2 |
Total Lines | 21 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
9 | private static $assign = []; |
||
10 | private static $engine = null; |
||
11 | |||
12 | 2 | private static function engine(): Engine |
|
13 | { |
||
14 | 2 | if (!isset(self::$engine) || is_null(self::$engine)) { |
|
15 | 2 | self::$engine = new Engine; |
|
16 | } |
||
17 | |||
18 | 2 | return self::$engine; |
|
19 | } |
||
20 | |||
21 | 2 | public static function config(array $config): void |
|
22 | { |
||
23 | 2 | self::engine()->config($config); |
|
24 | 2 | } |
|
25 | |||
26 | 2 | public static function assign(string $key, $value): void |
|
27 | { |
||
28 | 2 | self::$assign[$key] = $value; |
|
29 | 2 | } |
|
30 | |||
36 |