From 2d06e386f511a3d05e90b2f23015ea81e6d3ff01 Mon Sep 17 00:00:00 2001 From: Arsen Mirzaev Tatyano-Muradovich Date: Sun, 26 Sep 2021 02:35:59 +1000 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B2=D0=B5=D1=80=D1=85=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D0=BD=D1=8B=D0=B5=20=D0=B8=D1=81=D0=BF=D1=80?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mirzaev/minimal/system/models/model.php | 14 ++++---------- mirzaev/minimal/system/router.php | 5 +++-- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/mirzaev/minimal/system/models/model.php b/mirzaev/minimal/system/models/model.php index 006476d..0f6ec09 100644 --- a/mirzaev/minimal/system/models/model.php +++ b/mirzaev/minimal/system/models/model.php @@ -38,10 +38,8 @@ class model * * @param mixed $name Название * @param mixed $value Значение - * - * @return void */ - public function __set($name, $value): void + public function __set(string $name, mixed $value): void { if ($name === 'db') { if (!isset($this->db)) { @@ -58,11 +56,9 @@ class model /** * Прочитать свойство * - * @param mixed $name Название - * - * @return mixed + * @param string $name Название */ - public function __get($name) + public function __get(string $name): mixed { if ($name === 'db') { return $this->db; @@ -76,10 +72,8 @@ class model * Проверить свойство на инициализированность * * @param string $name Название - * - * @return mixed */ - public function __isset(string $name) + public function __isset(string $name): bool { if ($name === 'db') { return isset($this->db); diff --git a/mirzaev/minimal/system/router.php b/mirzaev/minimal/system/router.php index a01e03f..4cae941 100644 --- a/mirzaev/minimal/system/router.php +++ b/mirzaev/minimal/system/router.php @@ -49,8 +49,6 @@ final class router * * @param string $route Маршрут * @param string $controller Контроллер - * - * @return void */ public static function handle(string $uri = null): void { @@ -104,6 +102,9 @@ final class router echo self::error(); } + /** + * Контроллер ошибок + */ private static function error(): ?string { if (