diff options
author | Andrew Dolgov <[email protected]> | 2021-11-12 21:14:21 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-11-12 21:14:21 +0300 |
commit | e5966e575af96c96b530284eb360095f460d5828 (patch) | |
tree | 51c3626885d76f7d53ff08e58bd455e986de8b79 | |
parent | f72872c41dc0cf75c569bafac2a344b29abb663b (diff) |
use nullable types for some class properties instead of phpdoc hints
-rw-r--r-- | classes/config.php | 6 | ||||
-rw-r--r-- | classes/db.php | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/classes/config.php b/classes/config.php index e71f314..2fec4e0 100644 --- a/classes/config.php +++ b/classes/config.php @@ -26,8 +26,7 @@ class Config { Config::SESSION_NAME => [ "epube_sid", Config::T_STRING ], ]; - /** @var Config|null */ - private static $instance; + private static ?Config $instance = null; /** @var array<string, array<bool|int|string>> */ private array $params = []; @@ -35,8 +34,7 @@ class Config { /** @var array<string, mixed> */ private array $version = []; - /** @var Db_Migrations|null */ - private $migrations; + private Db_Migrations $migrations; public static function get_instance() : Config { if (self::$instance == null) diff --git a/classes/db.php b/classes/db.php index d815095..42422b2 100644 --- a/classes/db.php +++ b/classes/db.php @@ -1,7 +1,6 @@ <?php class Db { - /** @var Db|null */ - private static $instance; + private static ?Db $instance = null; private PDO $pdo; |