Total Complexity | 2 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
19 | class View extends Engine |
||
20 | { |
||
21 | public $lang = 'en'; |
||
22 | |||
23 | private $path; |
||
24 | |||
25 | /** |
||
26 | * View constructor. Initialize template engine |
||
27 | */ |
||
28 | public function __construct() |
||
29 | { |
||
30 | $this->lang = App::$Request->getLanguage(); |
||
31 | // get theme from config based on env_name global |
||
32 | $theme = App::$Properties->get('theme')[env_name] ?? 'default'; |
||
33 | $env = ucfirst(Str::lowerCase(env_name)); |
||
34 | |||
35 | $this->path = root . DIRECTORY_SEPARATOR . 'Apps' . DIRECTORY_SEPARATOR . 'View' . DIRECTORY_SEPARATOR . $env . DIRECTORY_SEPARATOR . $theme; |
||
36 | |||
37 | // initialize template engine with path and load default extensions |
||
38 | parent::__construct($this->path); |
||
39 | $this->loadDefaultExtensions(); |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * Get current template absolute path |
||
44 | * @return string|null |
||
45 | */ |
||
46 | public function getCurrentPath(): ?string |
||
49 | } |
||
50 | } |
||
51 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths