Total Complexity | 14 |
Total Lines | 71 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
5 | class Tpl |
||
6 | { |
||
7 | private static $assign = []; |
||
8 | private static $engine = null; |
||
9 | |||
10 | private static $dev = false; |
||
11 | private static $dir = 'view/'; |
||
12 | private static $url = 'http://localhost/'; |
||
13 | private static $assets = 'assets/'; |
||
14 | |||
15 | private static function engine(): Engine |
||
16 | { |
||
17 | if (!isset(self::$engine) || is_null(self::$engine)) { |
||
18 | self::$engine = new Engine; |
||
19 | } |
||
20 | return self::$engine; |
||
21 | } |
||
22 | |||
23 | public static function setDev(bool $dev): void |
||
24 | { |
||
25 | self::$dev = $dev; |
||
26 | } |
||
27 | |||
28 | public static function setDir(String $dir): void |
||
29 | { |
||
30 | self::$dir = $dir; |
||
31 | } |
||
32 | |||
33 | public static function getDir(): String |
||
34 | { |
||
35 | return self::$dir; |
||
36 | } |
||
37 | |||
38 | public static function setUrl(String $url): void |
||
39 | { |
||
40 | self::$url = $url; |
||
41 | } |
||
42 | |||
43 | public static function getUrl(): String |
||
44 | { |
||
45 | return self::$url; |
||
46 | } |
||
47 | |||
48 | public static function setAssets(String $assets) |
||
49 | { |
||
50 | self::$assets = $assets; |
||
51 | } |
||
52 | |||
53 | public static function getAssets(): String |
||
54 | { |
||
55 | return self::$assets; |
||
56 | } |
||
57 | |||
58 | |||
59 | |||
60 | public static function config(array $config): void |
||
61 | { |
||
62 | self::engine()->config($config); |
||
|
|||
63 | } |
||
64 | |||
65 | public static function assign(string $key, $value): void |
||
71 | } |
||
72 | |||
73 | public static function render(string $template): void |
||
74 | { |
||
75 | echo self::engine()->render($template, self::$assign); |
||
76 | } |
||
77 | } |
||
78 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.