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)
|
||||
{
|
||||
/** @var BaseMapper */
|
||||
$model = new $modelName();
|
||||
$model->db = $this->db;
|
||||
return $model;
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class HttpRequest extends Collection
|
|||
return $this->_session;
|
||||
}
|
||||
|
||||
function getArray($key, $default = []) {
|
||||
function getArray(string $key, array $default = []): array {
|
||||
$result = parent::get('data')->get($key, $default);
|
||||
if (is_array($result)) {
|
||||
return $result;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
namespace ctiso\Model;
|
||||
|
||||
/**
|
||||
* @property \ctiso\Database $db
|
||||
*/
|
||||
abstract class BaseMapper {
|
||||
function getAllAsOptions(): array {
|
||||
return [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue