fix: phpstan level=3
This commit is contained in:
parent
277a297b8a
commit
4fc2e2ac7d
16 changed files with 69 additions and 54 deletions
|
|
@ -49,9 +49,9 @@ class Component
|
|||
|
||||
public $COMPONENTS_WEB;
|
||||
|
||||
public $config/*: Registry*/;
|
||||
public $db/*: Database*/;
|
||||
public $parameter/*: Collection*/;
|
||||
public Registry $config;
|
||||
public Database $db;
|
||||
public Collection $parameter;
|
||||
|
||||
public $output = 'html';
|
||||
|
||||
|
|
@ -104,6 +104,7 @@ class Component
|
|||
$template = ($this->template) ? $this->template : $this->getTemplateName($config);
|
||||
|
||||
$selected = null;
|
||||
$tpl = null;
|
||||
foreach ($this->viewPath as $index => $viewPath) {
|
||||
// Загружать шаблон по умолчанию если не найден текущий
|
||||
$dir = Path::join($this->viewPath[$index], 'templates', $template);
|
||||
|
|
@ -147,7 +148,7 @@ class Component
|
|||
}
|
||||
|
||||
public function getTemplatePath($name) {
|
||||
$registry/*: \ctiso\Settings*/ = $this->config;
|
||||
$registry = $this->config;
|
||||
// Брать настройки из куков если есть
|
||||
$template = ($this->template) ? $this->template : $this->getTemplateName($registry);
|
||||
foreach ($this->viewPath as $index => $viewPath) {
|
||||
|
|
@ -167,7 +168,7 @@ class Component
|
|||
/**
|
||||
* Создает модель
|
||||
* @param string $name
|
||||
* @return model
|
||||
* @return mixed
|
||||
*/
|
||||
public function getModel($name)
|
||||
{
|
||||
|
|
@ -302,6 +303,7 @@ class Component
|
|||
$component->component_id = $cid->getInt('id_component');
|
||||
} else {
|
||||
$last = $db->getIdGenerator();
|
||||
$result = null;
|
||||
if ($last->isBeforeInsert()) {
|
||||
$result = $last->getId('component_id_component_seq');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue