chore: Аннотция типов
This commit is contained in:
parent
0886109467
commit
3169ea2032
3 changed files with 5 additions and 1 deletions
|
|
@ -55,6 +55,7 @@ class Service
|
||||||
*/
|
*/
|
||||||
public function getModel($modelName)
|
public function getModel($modelName)
|
||||||
{
|
{
|
||||||
|
/** @var BaseMapper */
|
||||||
$model = new $modelName();
|
$model = new $modelName();
|
||||||
$model->db = $this->db;
|
$model->db = $this->db;
|
||||||
return $model;
|
return $model;
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ class HttpRequest extends Collection
|
||||||
return $this->_session;
|
return $this->_session;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getArray($key, $default = []) {
|
function getArray(string $key, array $default = []): array {
|
||||||
$result = parent::get('data')->get($key, $default);
|
$result = parent::get('data')->get($key, $default);
|
||||||
if (is_array($result)) {
|
if (is_array($result)) {
|
||||||
return $result;
|
return $result;
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
namespace ctiso\Model;
|
namespace ctiso\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @property \ctiso\Database $db
|
||||||
|
*/
|
||||||
abstract class BaseMapper {
|
abstract class BaseMapper {
|
||||||
function getAllAsOptions(): array {
|
function getAllAsOptions(): array {
|
||||||
return [];
|
return [];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue