From a51d32423e57afb62ed95c08ddd29d4b74975d2e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Jun 2023 08:58:10 +0000 Subject: [PATCH 1/3] chore(deps-dev): update rector/rector requirement from 0.16.0 to 0.17.1 Updates the requirements on [rector/rector](https://github.com/rectorphp/rector) to permit the latest version. - [Release notes](https://github.com/rectorphp/rector/releases) - [Commits](https://github.com/rectorphp/rector/compare/0.16.0...0.17.1) --- updated-dependencies: - dependency-name: rector/rector dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1ac2c78..79b9f47 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "require-dev": { "codeigniter4/devkit": "^1.0", "codeigniter4/framework": "^4.2.3", - "rector/rector": "0.16.0" + "rector/rector": "0.17.1" }, "minimum-stability": "dev", "prefer-stable": true, From 0b01105aaec40565df667ed0956046fc2c03467e Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Fri, 16 Jun 2023 10:58:23 +0700 Subject: [PATCH 2/3] update config --- rector.php | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/rector.php b/rector.php index 217b1f3..f463cb1 100644 --- a/rector.php +++ b/rector.php @@ -3,9 +3,7 @@ use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector; use Rector\CodeQuality\Rector\BooleanAnd\SimplifyEmptyArrayCheckRector; 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; @@ -21,7 +19,6 @@ use Rector\Config\RectorConfig; use Rector\Core\ValueObject\PhpVersion; use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector; -use Rector\DeadCode\Rector\MethodCall\RemoveEmptyMethodCallRector; use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector; use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector; use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector; @@ -31,7 +28,6 @@ use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector; use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector; use Rector\PHPUnit\Set\PHPUnitSetList; -use Rector\PSR4\Rector\FileWithoutNamespace\NormalizeNamespaceByPSR4ComposerAutoloadRector; use Rector\Set\ValueObject\LevelSetList; use Rector\Set\ValueObject\SetList; @@ -74,17 +70,6 @@ // Note: requires php 8 RemoveUnusedPromotedPropertyRector::class, - // Ignore tests that might make calls without a result - RemoveEmptyMethodCallRector::class => [ - __DIR__ . '/tests', - ], - - // Ignore files that should not be namespaced - NormalizeNamespaceByPSR4ComposerAutoloadRector::class => [ - __DIR__ . '/src/Helpers', - __DIR__ . '/tests/_support', - ], - // May load view files directly when detecting classes StringClassNameToClassConstantRector::class, @@ -94,7 +79,6 @@ $rectorConfig->rule(SimplifyUselessVariableRector::class); $rectorConfig->rule(RemoveAlwaysElseRector::class); $rectorConfig->rule(CountArrayToEmptyArrayComparisonRector::class); - $rectorConfig->rule(ForToForeachRector::class); $rectorConfig->rule(ChangeNestedForeachIfsToEarlyContinueRector::class); $rectorConfig->rule(ChangeIfElseValueAssignToEarlyReturnRector::class); $rectorConfig->rule(SimplifyStrposLowerRector::class); @@ -107,12 +91,10 @@ $rectorConfig->rule(UnusedForeachValueToArrayKeysRector::class); $rectorConfig->rule(ChangeArrayPushToArrayAssignRector::class); $rectorConfig->rule(UnnecessaryTernaryExpressionRector::class); - $rectorConfig->rule(AddPregQuoteDelimiterRector::class); $rectorConfig->rule(SimplifyRegexPatternRector::class); $rectorConfig->rule(FuncGetArgsToVariadicParamRector::class); $rectorConfig->rule(MakeInheritedMethodVisibilitySameAsParentRector::class); $rectorConfig->rule(SimplifyEmptyArrayCheckRector::class); - $rectorConfig->rule(NormalizeNamespaceByPSR4ComposerAutoloadRector::class); $rectorConfig ->ruleWithConfiguration(TypedPropertyFromAssignsRector::class, [ // Set to false if you use in libraries, or it does create breaking changes. From 1727894cfba22a09b4911f1d651734ee2df90fed Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Fri, 16 Jun 2023 11:00:25 +0700 Subject: [PATCH 3/3] cs fix --- src/Handlers/DatabaseHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handlers/DatabaseHandler.php b/src/Handlers/DatabaseHandler.php index 96806cb..9f7f0b8 100644 --- a/src/Handlers/DatabaseHandler.php +++ b/src/Handlers/DatabaseHandler.php @@ -93,7 +93,7 @@ public function set(string $class, string $property, $value = null, ?string $con 'context' => $context, 'updated_at' => $time, ]); - // ...otherwise insert it + // ...otherwise insert it } else { $result = $this->builder ->insert([