Skip to content

Commit 95c04c8

Browse files
authored
Merge pull request #7531 from codeigniter4/dependabot/composer/rector/rector-0.17.0
build(deps-dev): update rector/rector requirement from 0.16.0 to 0.17.0
2 parents 167042a + a5958bd commit 95c04c8

File tree

7 files changed

+7
-19
lines changed

7 files changed

+7
-19
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"phpunit/phpcov": "^8.2",
2525
"phpunit/phpunit": "^9.1",
2626
"predis/predis": "^1.1 || ^2.0",
27-
"rector/rector": "0.16.0",
27+
"rector/rector": "0.17.0",
2828
"vimeo/psalm": "^5.0"
2929
},
3030
"suggest": {

rector.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
use Rector\CodeQuality\Rector\BooleanAnd\SimplifyEmptyArrayCheckRector;
1313
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector;
1414
use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector;
15-
use Rector\CodeQuality\Rector\For_\ForToForeachRector;
1615
use Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector;
17-
use Rector\CodeQuality\Rector\FuncCall\AddPregQuoteDelimiterRector;
1816
use Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector;
1917
use Rector\CodeQuality\Rector\FuncCall\SimplifyRegexPatternRector;
2018
use Rector\CodeQuality\Rector\FuncCall\SimplifyStrposLowerRector;
@@ -125,7 +123,6 @@
125123
$rectorConfig->rule(RemoveAlwaysElseRector::class);
126124
$rectorConfig->rule(PassStrictParameterToFunctionParameterRector::class);
127125
$rectorConfig->rule(CountArrayToEmptyArrayComparisonRector::class);
128-
$rectorConfig->rule(ForToForeachRector::class);
129126
$rectorConfig->rule(ChangeNestedForeachIfsToEarlyContinueRector::class);
130127
$rectorConfig->rule(ChangeIfElseValueAssignToEarlyReturnRector::class);
131128
$rectorConfig->rule(SimplifyStrposLowerRector::class);
@@ -140,7 +137,6 @@
140137
$rectorConfig->rule(UnnecessaryTernaryExpressionRector::class);
141138
$rectorConfig->rule(RemoveErrorSuppressInTryCatchStmtsRector::class);
142139
$rectorConfig->rule(RemoveVarTagFromClassConstantRector::class);
143-
$rectorConfig->rule(AddPregQuoteDelimiterRector::class);
144140
$rectorConfig->rule(SimplifyRegexPatternRector::class);
145141
$rectorConfig->rule(FuncGetArgsToVariadicParamRector::class);
146142
$rectorConfig->rule(MakeInheritedMethodVisibilitySameAsParentRector::class);

system/Common.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -744,11 +744,7 @@ function is_windows(?bool $mock = null): bool
744744
$mocked = $mock;
745745
}
746746

747-
if (isset($mocked)) {
748-
return $mocked;
749-
}
750-
751-
return DIRECTORY_SEPARATOR === '\\';
747+
return $mocked ?? DIRECTORY_SEPARATOR === '\\';
752748
}
753749
}
754750

system/Model.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -800,11 +800,7 @@ public function __get(string $name)
800800
return parent::__get($name);
801801
}
802802

803-
if (isset($this->builder()->{$name})) {
804-
return $this->builder()->{$name};
805-
}
806-
807-
return null;
803+
return $this->builder()->{$name} ?? null;
808804
}
809805

810806
/**

tests/system/Database/Live/ForgeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,14 +1513,14 @@ public function testDropKey()
15131513
public function testAddTextColumnWithConstraint()
15141514
{
15151515
// some DBMS do not allow a constraint for type TEXT
1516-
$result = $this->forge->addColumn('user', [
1516+
$this->forge->addColumn('user', [
15171517
'text_with_constraint' => ['type' => 'text', 'constraint' => 255, 'default' => ''],
15181518
]);
15191519

15201520
$this->assertTrue($this->db->fieldExists('text_with_constraint', 'user'));
15211521

15221522
// SQLSRV requires dropping default constraint before dropping column
1523-
$result = $this->forge->dropColumn('user', 'text_with_constraint');
1523+
$this->forge->dropColumn('user', 'text_with_constraint');
15241524

15251525
$this->db->resetDataCache();
15261526

tests/system/HTTP/RedirectResponseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ public function testWithHeadersWithEmptyHeaders()
293293
}
294294

295295
$response = new RedirectResponse(new App());
296-
$response = $response->withHeaders();
296+
$response->withHeaders();
297297

298298
$this->assertEmpty($baseResponse->headers());
299299
}

tests/system/Language/LanguageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public function testLanguageFileLoadingReturns()
179179
$this->assertNotContains('More', $this->lang->loaded());
180180
$this->assertCount(3, $result);
181181

182-
$result = $this->lang->loadem('More', 'en');
182+
$this->lang->loadem('More', 'en');
183183
$this->assertContains('More', $this->lang->loaded());
184184
$this->assertCount(1, $this->lang->loaded());
185185
}

0 commit comments

Comments
 (0)