Skip to content

Commit

Permalink
Merge pull request codeigniter4#9303 from samsonasik/refactor-apply-c…
Browse files Browse the repository at this point in the history
…ode-quality-level-27

refactor: Apply code quality level 31 for rector
  • Loading branch information
samsonasik authored Dec 7, 2024
2 parents 0d3c3b1 + 608b869 commit 124a7e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
*/

use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector;
use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector;
use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector;
use Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector;
use Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector;
use Rector\CodeQuality\Rector\FuncCall\CompactToVariablesRector;
use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector;
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
use Rector\CodeQuality\Rector\If_\ShortenElseIfRector;
Expand Down Expand Up @@ -171,6 +171,8 @@

// Unnecessary (string) is inserted
NullToStrictStringFuncCallArgRector::class,

CompactToVariablesRector::class,
])
// auto import fully qualified class names
->withImportNames(removeUnusedImports: true)
Expand All @@ -196,7 +198,6 @@
EmptyOnNullableObjectToInstanceOfRector::class,
DisallowedEmptyRuleFixerRector::class,
PrivatizeFinalClassPropertyRector::class,
CompleteDynamicPropertiesRector::class,
BooleanInIfConditionRuleFixerRector::class,
VersionCompareFuncCallToConstantRector::class,
AddClosureVoidReturnTypeWhereNoReturnRector::class,
Expand All @@ -210,4 +211,4 @@
// keep '\\' prefix string on string '\Foo\Bar'
StringClassNameToClassConstantRector::SHOULD_KEEP_PRE_SLASH => true,
])
->withCodeQualityLevel(24);
->withCodeQualityLevel(31);
2 changes: 1 addition & 1 deletion system/Security/Security.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ protected function derandomize(string $token): string
return bin2hex(hex2bin($value) ^ hex2bin($key));
} catch (ErrorException $e) {
// "hex2bin(): Hexadecimal input string must have an even length"
throw new InvalidArgumentException($e->getMessage());
throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
}
}

Expand Down

0 comments on commit 124a7e6

Please sign in to comment.