chore: Аннотации к типам

This commit is contained in:
origami11@yandex.ru 2025-10-29 17:38:30 +03:00
parent 2aac407c4d
commit 0267d3081f
3 changed files with 9 additions and 8 deletions

View file

@ -232,13 +232,14 @@ class Component
} }
/** /**
* FIXME: Передавать в модель имя класса, а не часть
* Создает модель * Создает модель
* @param string $name * @param class-string $modelName
* @return mixed * @return mixed
*/ */
public function getModel($name) public function getModel($modelName)
{ {
$modelName = "App\\Mapper\\" . $name; // $modelName = "App\\Mapper\\" . $name;
$model = new $modelName(); $model = new $modelName();
$model->config = $this->config; $model->config = $this->config;
$model->db = $this->db; $model->db = $this->db;

View file

@ -12,10 +12,10 @@ use Exception;
* type:string, * type:string,
* table_name:string, * table_name:string,
* table:string, * table:string,
* fields:array, * fields:array<mixed>,
* field: ColumnProps, * field: ColumnProps,
* constraints:?array, * constraints:?array<mixed>,
* references:?array, * references:?array<mixed>,
* source:string, * source:string,
* pgsql?:string, * pgsql?:string,
* old_name?:string, * old_name?:string,
@ -24,7 +24,7 @@ use Exception;
* column_name?:string, * column_name?:string,
* refTable?:string, * refTable?:string,
* refColumn?:string, * refColumn?:string,
* values:array, * values:array<mixed>,
* view:string, * view:string,
* select:string * select:string
* } * }

View file

@ -11,7 +11,7 @@ class PDOStatement extends \PDOStatement implements \IteratorAggregate
{ {
/** @var int */ /** @var int */
protected $cursorPos = 0; protected $cursorPos = 0;
/** @var array */ /** @var array<int, mixed> */
public $cache = []; public $cache = [];
/** @var ?array */ /** @var ?array */
public $fields; public $fields;