fix: noverify + типы для правил провеки

This commit is contained in:
origami11@yandex.ru 2025-01-21 19:33:33 +03:00
parent 9680409ba9
commit 90cbd3b2b6
10 changed files with 319 additions and 300 deletions

View file

@ -95,7 +95,7 @@ class Component
public function getView($name)
{
if ($this->output == 'json') {
if ($this->output === 'json') {
return new FakeTemplate($name);
}
@ -126,7 +126,7 @@ class Component
}
$tpl->stripComments(true);
$tpl->addPreFilter(new PHPTAL_PreFilter_Normalize());
$tpl->addPreFilter(new \PHPTAL_PreFilter_Normalize());
$tpl->set('common', Path::join($this->config->get('system', 'web'), '../', 'common'));
$tpl->set('script', Path::join($this->config->get('system', 'web'), 'js'));
@ -152,7 +152,7 @@ class Component
$registry = $this->config;
// Брать настройки из куков если есть
$template = ($this->template) ? $this->template : $this->getTemplateName($registry);
foreach ($this->viewPath as $index => $viewPath) {
foreach ($this->viewPath as $index => $_) {
if(is_dir(Path::join($this->viewPath[$index], 'templates', $template))) {
return Path::join($this->viewPath[$index], 'templates', $template, $name);
}