Skip to content

Commit 928ed7c

Browse files
authored
Merge pull request codeigniter4#9766 from samsonasik/refactor-apply-code-quality-61
refactor: apply code quality level 61 for Rector
2 parents c809b41 + c37e3e1 commit 928ed7c

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

rector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,4 @@
202202
// keep '\\' prefix string on string '\Foo\Bar'
203203
StringClassNameToClassConstantRector::SHOULD_KEEP_PRE_SLASH => true,
204204
])
205-
->withCodeQualityLevel(58);
205+
->withCodeQualityLevel(61);

system/Database/MigrationRunner.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class MigrationRunner
4747
*
4848
* @var string|null
4949
*/
50-
protected $namespace;
50+
protected $namespace = APP_NAMESPACE;
5151

5252
/**
5353
* The database Group to migrate.
@@ -136,8 +136,6 @@ public function __construct(MigrationsConfig $config, $db = null)
136136
$this->enabled = $config->enabled ?? false;
137137
$this->table = $config->table ?? 'migrations';
138138

139-
$this->namespace = APP_NAMESPACE;
140-
141139
// Even if a DB connection is passed, since it is a test,
142140
// it is assumed to use the default group name
143141
$this->group = is_string($db) ? $db : config(Database::class)->defaultGroup;

system/Pager/PagerRenderer.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,12 @@ class PagerRenderer
2929
/**
3030
* First page number in the set of links to be displayed.
3131
*
32+
* `first` and `last` will be updated by `setSurroundCount()`.
33+
* You must call `setSurroundCount()` after instantiation.
34+
*
3235
* @var int
3336
*/
34-
protected $first;
37+
protected $first = 1;
3538

3639
/**
3740
* Last page number in the set of links to be displayed.
@@ -102,10 +105,7 @@ class PagerRenderer
102105
*/
103106
public function __construct(array $details)
104107
{
105-
// `first` and `last` will be updated by `setSurroundCount()`.
106-
// You must call `setSurroundCount()` after instantiation.
107-
$this->first = 1;
108-
$this->last = $details['pageCount'];
108+
$this->last = $details['pageCount'];
109109

110110
$this->current = $details['currentPage'];
111111
$this->total = $details['total'];

0 commit comments

Comments
 (0)