Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"phpunit/phpcov": "^8.2",
"phpunit/phpunit": "^9.1",
"predis/predis": "^1.1 || ^2.0",
"rector/rector": "0.16.0",
"rector/rector": "0.17.0",
"vimeo/psalm": "^5.0"
},
"suggest": {
Expand Down
4 changes: 0 additions & 4 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
use Rector\CodeQuality\Rector\BooleanAnd\SimplifyEmptyArrayCheckRector;
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector;
use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector;
use Rector\CodeQuality\Rector\For_\ForToForeachRector;
use Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector;
use Rector\CodeQuality\Rector\FuncCall\AddPregQuoteDelimiterRector;
use Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector;
use Rector\CodeQuality\Rector\FuncCall\SimplifyRegexPatternRector;
use Rector\CodeQuality\Rector\FuncCall\SimplifyStrposLowerRector;
Expand Down Expand Up @@ -125,7 +123,6 @@
$rectorConfig->rule(RemoveAlwaysElseRector::class);
$rectorConfig->rule(PassStrictParameterToFunctionParameterRector::class);
$rectorConfig->rule(CountArrayToEmptyArrayComparisonRector::class);
$rectorConfig->rule(ForToForeachRector::class);
$rectorConfig->rule(ChangeNestedForeachIfsToEarlyContinueRector::class);
$rectorConfig->rule(ChangeIfElseValueAssignToEarlyReturnRector::class);
$rectorConfig->rule(SimplifyStrposLowerRector::class);
Expand All @@ -140,7 +137,6 @@
$rectorConfig->rule(UnnecessaryTernaryExpressionRector::class);
$rectorConfig->rule(RemoveErrorSuppressInTryCatchStmtsRector::class);
$rectorConfig->rule(RemoveVarTagFromClassConstantRector::class);
$rectorConfig->rule(AddPregQuoteDelimiterRector::class);
$rectorConfig->rule(SimplifyRegexPatternRector::class);
$rectorConfig->rule(FuncGetArgsToVariadicParamRector::class);
$rectorConfig->rule(MakeInheritedMethodVisibilitySameAsParentRector::class);
Expand Down
6 changes: 1 addition & 5 deletions system/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -744,11 +744,7 @@ function is_windows(?bool $mock = null): bool
$mocked = $mock;
}

if (isset($mocked)) {
return $mocked;
}

return DIRECTORY_SEPARATOR === '\\';
return $mocked ?? DIRECTORY_SEPARATOR === '\\';
}
}

Expand Down
6 changes: 1 addition & 5 deletions system/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -800,11 +800,7 @@ public function __get(string $name)
return parent::__get($name);
}

if (isset($this->builder()->{$name})) {
return $this->builder()->{$name};
}

return null;
return $this->builder()->{$name} ?? null;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/system/Database/Live/ForgeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1513,14 +1513,14 @@ public function testDropKey()
public function testAddTextColumnWithConstraint()
{
// some DBMS do not allow a constraint for type TEXT
$result = $this->forge->addColumn('user', [
$this->forge->addColumn('user', [
'text_with_constraint' => ['type' => 'text', 'constraint' => 255, 'default' => ''],
]);

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

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

$this->db->resetDataCache();

Expand Down
2 changes: 1 addition & 1 deletion tests/system/HTTP/RedirectResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ public function testWithHeadersWithEmptyHeaders()
}

$response = new RedirectResponse(new App());
$response = $response->withHeaders();
$response->withHeaders();

$this->assertEmpty($baseResponse->headers());
}
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Language/LanguageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function testLanguageFileLoadingReturns()
$this->assertNotContains('More', $this->lang->loaded());
$this->assertCount(3, $result);

$result = $this->lang->loadem('More', 'en');
$this->lang->loadem('More', 'en');
$this->assertContains('More', $this->lang->loaded());
$this->assertCount(1, $this->lang->loaded());
}
Expand Down