fix phpstan warnings in classes/db/migrations.php
This commit is contained in:
parent
3ba8d964b6
commit
45431170b6
|
@ -21,10 +21,10 @@ class Db_Migrations {
|
||||||
private $pdo;
|
private $pdo;
|
||||||
|
|
||||||
/** @var int */
|
/** @var int */
|
||||||
private $cached_version;
|
private $cached_version = 0;
|
||||||
|
|
||||||
/** @var int */
|
/** @var int */
|
||||||
private $cached_max_version;
|
private $cached_max_version = 0;
|
||||||
|
|
||||||
/** @var int */
|
/** @var int */
|
||||||
private $max_version_override;
|
private $max_version_override;
|
||||||
|
@ -65,7 +65,7 @@ class Db_Migrations {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_version() : int {
|
function get_version() : int {
|
||||||
if (isset($this->cached_version))
|
if ($this->cached_version)
|
||||||
return $this->cached_version;
|
return $this->cached_version;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -152,7 +152,7 @@ class Db_Migrations {
|
||||||
if ($this->max_version_override > 0)
|
if ($this->max_version_override > 0)
|
||||||
return $this->max_version_override;
|
return $this->max_version_override;
|
||||||
|
|
||||||
if (isset($this->cached_max_version))
|
if ($this->cached_max_version)
|
||||||
return $this->cached_max_version;
|
return $this->cached_max_version;
|
||||||
|
|
||||||
$migrations = glob("{$this->migrations_path}/*.sql");
|
$migrations = glob("{$this->migrations_path}/*.sql");
|
||||||
|
|
Loading…
Reference in New Issue