chore: Аннотации к типам
This commit is contained in:
parent
2aac407c4d
commit
0267d3081f
3 changed files with 9 additions and 8 deletions
|
|
@ -232,13 +232,14 @@ class Component
|
|||
}
|
||||
|
||||
/**
|
||||
* FIXME: Передавать в модель имя класса, а не часть
|
||||
* Создает модель
|
||||
* @param string $name
|
||||
* @param class-string $modelName
|
||||
* @return mixed
|
||||
*/
|
||||
public function getModel($name)
|
||||
public function getModel($modelName)
|
||||
{
|
||||
$modelName = "App\\Mapper\\" . $name;
|
||||
// $modelName = "App\\Mapper\\" . $name;
|
||||
$model = new $modelName();
|
||||
$model->config = $this->config;
|
||||
$model->db = $this->db;
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ use Exception;
|
|||
* type:string,
|
||||
* table_name:string,
|
||||
* table:string,
|
||||
* fields:array,
|
||||
* fields:array<mixed>,
|
||||
* field: ColumnProps,
|
||||
* constraints:?array,
|
||||
* references:?array,
|
||||
* constraints:?array<mixed>,
|
||||
* references:?array<mixed>,
|
||||
* source:string,
|
||||
* pgsql?:string,
|
||||
* old_name?:string,
|
||||
|
|
@ -24,7 +24,7 @@ use Exception;
|
|||
* column_name?:string,
|
||||
* refTable?:string,
|
||||
* refColumn?:string,
|
||||
* values:array,
|
||||
* values:array<mixed>,
|
||||
* view:string,
|
||||
* select:string
|
||||
* }
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class PDOStatement extends \PDOStatement implements \IteratorAggregate
|
|||
{
|
||||
/** @var int */
|
||||
protected $cursorPos = 0;
|
||||
/** @var array */
|
||||
/** @var array<int, mixed> */
|
||||
public $cache = [];
|
||||
/** @var ?array */
|
||||
public $fields;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue