Skip to content

Commit

Permalink
refactor: enable level 31: ThrowWithPreviousExceptionRector
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Dec 7, 2024
1 parent 37e6329 commit 608b869
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/

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;
Expand Down Expand Up @@ -199,7 +198,6 @@
EmptyOnNullableObjectToInstanceOfRector::class,
DisallowedEmptyRuleFixerRector::class,
PrivatizeFinalClassPropertyRector::class,
CompleteDynamicPropertiesRector::class,
BooleanInIfConditionRuleFixerRector::class,
VersionCompareFuncCallToConstantRector::class,
AddClosureVoidReturnTypeWhereNoReturnRector::class,
Expand All @@ -213,4 +211,4 @@
// keep '\\' prefix string on string '\Foo\Bar'
StringClassNameToClassConstantRector::SHOULD_KEEP_PRE_SLASH => true,
])
->withCodeQualityLevel(27);
->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 608b869

Please sign in to comment.