fix: phpstan level=3

This commit is contained in:
origami11@yandex.ru 2024-01-22 19:56:45 +03:00
parent 277a297b8a
commit 4fc2e2ac7d
16 changed files with 69 additions and 54 deletions

View file

@ -7,7 +7,7 @@ namespace ctiso\View;
class Pages
{
static $range = 5;
static int $range = 5;
static function getPages($page, $onpage, $count, $prefix = '?')
{
$n = ceil($count / $onpage);

View file

@ -120,8 +120,6 @@ class View extends \stdClass
/**
* Обработка всех вложенных шаблонов
*
* @return string
*/
public function execute()
{
@ -166,16 +164,20 @@ class View extends \stdClass
throw new Exception("file not found: $file");
}
// FIXME: Префикс, конфликтует с протоколом
function resolveName($alias, $file) {
list($type, $filename) = explode(":", $file, 2);
// Сделать поиск а не просто замену папки при совпадении имени
if (is_array($alias[$type])) {
$output = $this->find_file($alias[$type], $filename);
} else {
$output = $alias[$type] . '/' . $filename;
if (isset($alias[$type])) {
if (is_array($alias[$type])) {
$output = $this->find_file($alias[$type], $filename);
} else {
$output = $alias[$type] . '/' . $filename;
}
return $output;
}
return $output;
return $file;
}
function loadImports($importFile)