| Total Complexity | 12 |
| Total Lines | 58 |
| 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 | |||
| 14 | private static function engine(): Engine |
||
| 15 | { |
||
| 16 | if (!isset(self::$engine) || is_null(self::$engine)) { |
||
| 17 | self::$engine = new Engine; |
||
| 18 | } |
||
| 19 | return self::$engine; |
||
| 20 | } |
||
| 21 | |||
| 22 | public static function setDev(bool $dev): void |
||
| 23 | { |
||
| 24 | self::$dev = $dev; |
||
| 25 | } |
||
| 26 | |||
| 27 | public static function setDir(String $dir): void |
||
| 28 | { |
||
| 29 | self::$dir = $dir; |
||
| 30 | } |
||
| 31 | |||
| 32 | public static function getDir(): String |
||
| 33 | { |
||
| 34 | return self::$dir; |
||
| 35 | } |
||
| 36 | |||
| 37 | public static function setUrl(String $url): void |
||
| 38 | { |
||
| 39 | self::$url = $url; |
||
| 40 | } |
||
| 41 | |||
| 42 | public static function getUrl(): String |
||
| 43 | { |
||
| 44 | return self::$url; |
||
| 45 | } |
||
| 46 | |||
| 47 | public static function config(array $config): void |
||
| 48 | { |
||
| 49 | self::engine()->config($config); |
||
|
|
|||
| 50 | } |
||
| 51 | |||
| 52 | public static function assign(string $key, $value): void |
||
| 58 | } |
||
| 59 | |||
| 60 | public static function render(string $template): void |
||
| 61 | { |
||
| 62 | echo self::engine()->render($template, self::$assign); |
||
| 63 | } |
||
| 64 | } |
||
| 65 |
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.