diff options
author | Andrew Dolgov <[email protected]> | 2021-11-13 17:31:13 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-11-13 17:31:13 +0300 |
commit | 45431170b629908b9fc39d19a87cf64d90bc9faf (patch) | |
tree | 55f99555bbd342e8d01cabdc6eada664c2951742 /classes/db/migrations.php | |
parent | 3ba8d964b669ed78713fe96413cb2722f7e9f68e (diff) |
fix phpstan warnings in classes/db/migrations.php
Diffstat (limited to 'classes/db/migrations.php')
-rw-r--r-- | classes/db/migrations.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/classes/db/migrations.php b/classes/db/migrations.php index 6e20ddf7f..aecd9186c 100644 --- a/classes/db/migrations.php +++ b/classes/db/migrations.php @@ -21,10 +21,10 @@ class Db_Migrations { private $pdo; /** @var int */ - private $cached_version; + private $cached_version = 0; /** @var int */ - private $cached_max_version; + private $cached_max_version = 0; /** @var int */ private $max_version_override; @@ -65,7 +65,7 @@ class Db_Migrations { } function get_version() : int { - if (isset($this->cached_version)) + if ($this->cached_version) return $this->cached_version; try { @@ -152,7 +152,7 @@ class Db_Migrations { if ($this->max_version_override > 0) return $this->max_version_override; - if (isset($this->cached_max_version)) + if ($this->cached_max_version) return $this->cached_max_version; $migrations = glob("{$this->migrations_path}/*.sql"); |