Skip to content

Commit 124a7e6

Browse files
authored
Merge pull request #9303 from samsonasik/refactor-apply-code-quality-level-27
refactor: Apply code quality level 31 for rector
2 parents 0d3c3b1 + 608b869 commit 124a7e6

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

rector.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
*/
1313

1414
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
15-
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector;
1615
use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector;
1716
use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector;
1817
use Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector;
1918
use Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector;
19+
use Rector\CodeQuality\Rector\FuncCall\CompactToVariablesRector;
2020
use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector;
2121
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
2222
use Rector\CodeQuality\Rector\If_\ShortenElseIfRector;
@@ -171,6 +171,8 @@
171171

172172
// Unnecessary (string) is inserted
173173
NullToStrictStringFuncCallArgRector::class,
174+
175+
CompactToVariablesRector::class,
174176
])
175177
// auto import fully qualified class names
176178
->withImportNames(removeUnusedImports: true)
@@ -196,7 +198,6 @@
196198
EmptyOnNullableObjectToInstanceOfRector::class,
197199
DisallowedEmptyRuleFixerRector::class,
198200
PrivatizeFinalClassPropertyRector::class,
199-
CompleteDynamicPropertiesRector::class,
200201
BooleanInIfConditionRuleFixerRector::class,
201202
VersionCompareFuncCallToConstantRector::class,
202203
AddClosureVoidReturnTypeWhereNoReturnRector::class,
@@ -210,4 +211,4 @@
210211
// keep '\\' prefix string on string '\Foo\Bar'
211212
StringClassNameToClassConstantRector::SHOULD_KEEP_PRE_SLASH => true,
212213
])
213-
->withCodeQualityLevel(24);
214+
->withCodeQualityLevel(31);

system/Security/Security.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ protected function derandomize(string $token): string
377377
return bin2hex(hex2bin($value) ^ hex2bin($key));
378378
} catch (ErrorException $e) {
379379
// "hex2bin(): Hexadecimal input string must have an even length"
380-
throw new InvalidArgumentException($e->getMessage());
380+
throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
381381
}
382382
}
383383

0 commit comments

Comments
 (0)