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 @@ -29,7 +29,7 @@
"phpunit/phpcov": "^9.0.2 || ^10.0",
"phpunit/phpunit": "^10.5.16 || ^11.2",
"predis/predis": "^3.0",
"rector/rector": "2.5.2",
"rector/rector": "2.5.3",
"shipmonk/phpstan-baseline-per-identifier": "^2.0"
},
"replace": {
Expand Down
10 changes: 5 additions & 5 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\CodeQuality\Rector\BooleanNot\NegatedAndsToPositiveOrsRector;
use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector;
use Rector\CodeQuality\Rector\FuncCall\CompactToVariablesRector;
use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector;
Expand All @@ -22,6 +23,7 @@
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
use Rector\CodingStyle\Rector\FuncCall\VersionCompareFuncCallToConstantRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\ClassMethod\RemoveDuplicatedReturnSelfDocblockRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedConstructorParamRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector;
use Rector\DeadCode\Rector\MethodCall\RemoveNullArgOnNullDefaultParamRector;
Expand All @@ -36,7 +38,6 @@
use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector;
use Rector\PHPUnit\CodeQuality\Rector\FuncCall\AssertFuncCallToPHPUnitAssertRector;
use Rector\PHPUnit\CodeQuality\Rector\StmtsAwareInterface\DeclareStrictTypesTestsRector;
use Rector\PostRector\Rector\UnusedImportRemovingPostRector;
use Rector\Privatization\Rector\Class_\FinalizeTestCaseClassRector;
use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector;
use Rector\Renaming\Rector\ConstFetch\RenameConstantRector;
Expand Down Expand Up @@ -175,10 +176,9 @@
__DIR__ . '/tests/system/Models',
],

UnusedImportRemovingPostRector::class => [
// buggy on auto import removed
__DIR__ . '/system/HTTP/Response.php',
],
// to be applied in separate PRs to ease review
NegatedAndsToPositiveOrsRector::class,
RemoveDuplicatedReturnSelfDocblockRector::class,
])
// auto import fully qualified class names
->withImportNames()
Expand Down
4 changes: 2 additions & 2 deletions system/Database/BaseBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2686,7 +2686,7 @@ protected function _updateBatch(string $table, array $keys, array $values): stri
$sql .= 'WHERE ' . implode(
' AND ',
array_map(
static fn ($key, $value) => (
static fn ($key, $value): RawSql|string => (
($value instanceof RawSql && is_string($key))
?
$table . '.' . $key . ' = ' . $value
Expand Down Expand Up @@ -2936,7 +2936,7 @@ protected function _deleteBatch(string $table, array $keys, array $values): stri
$sql .= 'ON ' . implode(
' AND ',
array_map(
static fn ($key, $value) => (
static fn ($key, $value): RawSql|string => (
$value instanceof RawSql ?
$value :
(
Expand Down
2 changes: 1 addition & 1 deletion system/Database/MySQLi/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected function _updateBatch(string $table, array $keys, array $values): stri
$sql .= 'ON ' . implode(
' AND ',
array_map(
static fn ($key, $value) => (
static fn ($key, $value): RawSql|string => (
($value instanceof RawSql && is_string($key))
?
$table . '.' . $key . ' = ' . $value
Expand Down
6 changes: 3 additions & 3 deletions system/Database/OCI8/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ protected function _updateBatch(string $table, array $keys, array $values): stri
$sql .= 'ON (' . implode(
' AND ',
array_map(
static fn ($key, $value) => (
static fn ($key, $value): RawSql|string => (
($value instanceof RawSql && is_string($key))
?
$table . '.' . $key . ' = ' . $value
Expand Down Expand Up @@ -353,7 +353,7 @@ protected function _upsertBatch(string $table, array $keys, array $values): stri
$sql .= implode(
' AND ',
array_map(
static fn ($key, $value) => (
static fn ($key, $value): RawSql|string => (
($value instanceof RawSql && is_string($key))
?
$table . '.' . $key . ' = ' . $value
Expand Down Expand Up @@ -442,7 +442,7 @@ protected function _deleteBatch(string $table, array $keys, array $values): stri
$sql .= 'WHERE ' . implode(
' AND ',
array_map(
static fn ($key, $value) => (
static fn ($key, $value): RawSql|string => (
$value instanceof RawSql ?
$value :
(
Expand Down
2 changes: 1 addition & 1 deletion system/Database/SQLSRV/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ protected function _upsertBatch(string $table, array $keys, array $values): stri
$sql .= implode(
' AND ',
array_map(
static fn ($key, $value) => (
static fn ($key, $value): RawSql|string => (
($value instanceof RawSql && is_string($key))
?
$fullTableName . '.' . $key . ' = ' . $value
Expand Down
10 changes: 5 additions & 5 deletions tests/system/Test/FeatureTestTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ public function testCallGetWithParams(): void
[
'GET',
'home',
static fn () => json_encode(service('request')->getGet()),
static fn (): false|string => json_encode(service('request')->getGet()),
],
]);
$data = [
Expand All @@ -439,7 +439,7 @@ public function testCallGetWithParamsAndREQUEST(): void
[
'GET',
'home',
static fn () => json_encode(service('request')->fetchGlobal('request')),
static fn (): false|string => json_encode(service('request')->fetchGlobal('request')),
],
]);
$data = [
Expand All @@ -466,7 +466,7 @@ public function testCallPostWithParams(): void
[
'POST',
'home',
static fn () => json_encode(service('request')->getPost()),
static fn (): false|string => json_encode(service('request')->getPost()),
],
]);
$data = [
Expand All @@ -493,7 +493,7 @@ public function testCallPostWithParamsAndREQUEST(): void
[
'POST',
'home',
static fn () => json_encode(service('request')->fetchGlobal('request')),
static fn (): false|string => json_encode(service('request')->fetchGlobal('request')),
],
]);
$data = [
Expand Down Expand Up @@ -544,7 +544,7 @@ public function testCallPutWithJsonRequestAndREQUEST(): void
[
'PUT',
'home',
static fn () => json_encode(service('request')->fetchGlobal('request')),
static fn (): false|string => json_encode(service('request')->fetchGlobal('request')),
],
]);
$data = [
Expand Down
Loading