fix: Аннотация типов

This commit is contained in:
origami11@yandex.ru 2025-11-06 11:59:54 +03:00
parent 540805ae35
commit 87fc94d700
3 changed files with 9 additions and 11 deletions

View file

@ -60,7 +60,7 @@ class Component
public $template = null;
public string $templatePath;
/** @var string */
/** @var int */
public $component_id;
/** @var string */
public $component_title;
@ -359,12 +359,9 @@ class Component
$path = Path::join ($config->get('site', 'components'), $name, $filename . '.php');
$className = implode("\\", ['Components', ucfirst($name), $filename]);
/**
* @var ?Component $component
*/
$component = null;
if (file_exists($path)) {
/** @var Component $component */
$component = new $className();
$component->viewPath = [$config->get('site', 'components') . '/' . $name . '/'];
@ -372,6 +369,7 @@ class Component
$component->COMPONENTS_WEB = $config->get('site', 'web') . '/components/';
} else {
/** @var Component $component */
$component = new $className();
$template = $component->getTemplateName($site->getConfig());