fix: phpstan level=3
This commit is contained in:
parent
277a297b8a
commit
4fc2e2ac7d
16 changed files with 69 additions and 54 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue