diff --git a/rector.php b/rector.php index 73d0ecb2cfc3..dea282d17bef 100644 --- a/rector.php +++ b/rector.php @@ -202,4 +202,4 @@ // keep '\\' prefix string on string '\Foo\Bar' StringClassNameToClassConstantRector::SHOULD_KEEP_PRE_SLASH => true, ]) - ->withCodeQualityLevel(58); + ->withCodeQualityLevel(61); diff --git a/system/Database/MigrationRunner.php b/system/Database/MigrationRunner.php index 8f723924539f..01c4e5ff64ad 100644 --- a/system/Database/MigrationRunner.php +++ b/system/Database/MigrationRunner.php @@ -47,7 +47,7 @@ class MigrationRunner * * @var string|null */ - protected $namespace; + protected $namespace = APP_NAMESPACE; /** * The database Group to migrate. @@ -136,8 +136,6 @@ public function __construct(MigrationsConfig $config, $db = null) $this->enabled = $config->enabled ?? false; $this->table = $config->table ?? 'migrations'; - $this->namespace = APP_NAMESPACE; - // Even if a DB connection is passed, since it is a test, // it is assumed to use the default group name $this->group = is_string($db) ? $db : config(Database::class)->defaultGroup; diff --git a/system/Pager/PagerRenderer.php b/system/Pager/PagerRenderer.php index 2352a98460e3..f970ee551f19 100644 --- a/system/Pager/PagerRenderer.php +++ b/system/Pager/PagerRenderer.php @@ -29,9 +29,12 @@ class PagerRenderer /** * First page number in the set of links to be displayed. * + * `first` and `last` will be updated by `setSurroundCount()`. + * You must call `setSurroundCount()` after instantiation. + * * @var int */ - protected $first; + protected $first = 1; /** * Last page number in the set of links to be displayed. @@ -102,10 +105,7 @@ class PagerRenderer */ public function __construct(array $details) { - // `first` and `last` will be updated by `setSurroundCount()`. - // You must call `setSurroundCount()` after instantiation. - $this->first = 1; - $this->last = $details['pageCount']; + $this->last = $details['pageCount']; $this->current = $details['currentPage']; $this->total = $details['total'];