summaryrefslogtreecommitdiff
path: root/classes/db
diff options
context:
space:
mode:
authorwn_ <[email protected]>2021-11-12 21:17:31 +0000
committerwn_ <[email protected]>2021-11-12 21:17:31 +0000
commitd3a81f598b24d6ae4f98415fac9509df6749eaf8 (patch)
tree79fcdaba8badc193595485c965e6150bcaaecd25 /classes/db
parent2c41bc7fbc9013e79e929a31e3824cf040afc54a (diff)
Switch class properties from PHP typing to PHPDoc for compatibility with PHP < 7.4.0
Diffstat (limited to 'classes/db')
-rw-r--r--classes/db/migrations.php37
1 files changed, 27 insertions, 10 deletions
diff --git a/classes/db/migrations.php b/classes/db/migrations.php
index cb74c247a..6e20ddf7f 100644
--- a/classes/db/migrations.php
+++ b/classes/db/migrations.php
@@ -1,16 +1,33 @@
<?php
class Db_Migrations {
- private string $base_filename = "schema.sql";
- private string $base_path;
- private string $migrations_path;
- private string $migrations_table;
- private bool $base_is_latest;
- private \PDO $pdo;
-
- private int $cached_version;
- private int $cached_max_version;
- private int $max_version_override;
+ // TODO: class properties can be switched to PHP typing if/when the minimum PHP_VERSION is raised to 7.4.0+
+ /** @var string */
+ private $base_filename = "schema.sql";
+
+ /** @var string */
+ private $base_path;
+
+ /** @var string */
+ private $migrations_path;
+
+ /** @var string */
+ private $migrations_table;
+
+ /** @var bool */
+ private $base_is_latest;
+
+ /** @var PDO */
+ private $pdo;
+
+ /** @var int */
+ private $cached_version;
+
+ /** @var int */
+ private $cached_max_version;
+
+ /** @var int */
+ private $max_version_override;
function __construct() {
$this->pdo = Db::pdo();