Skip to content

Commit 1d4034e

Browse files
committed
refactor: apply cs-fix and rector
1 parent 6bcd101 commit 1d4034e

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

rector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use Rector\CodeQuality\Rector\FuncCall\SimplifyRegexPatternRector;
1919
use Rector\CodeQuality\Rector\FuncCall\SimplifyStrposLowerRector;
2020
use Rector\CodeQuality\Rector\FuncCall\SingleInArrayToCompareRector;
21-
use Rector\CodingStyle\Rector\FuncCall\VersionCompareFuncCallToConstantRector;
2221
use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector;
2322
use Rector\CodeQuality\Rector\If_\CombineIfRector;
2423
use Rector\CodeQuality\Rector\If_\ShortenElseIfRector;
@@ -29,6 +28,7 @@
2928
use Rector\CodingStyle\Rector\ClassMethod\FuncGetArgsToVariadicParamRector;
3029
use Rector\CodingStyle\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector;
3130
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
31+
use Rector\CodingStyle\Rector\FuncCall\VersionCompareFuncCallToConstantRector;
3232
use Rector\Config\RectorConfig;
3333
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedConstructorParamRector;
3434
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector;

system/Autoloader/Autoloader.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -346,11 +346,7 @@ public function sanitizeFilename(string $filename): string
346346
);
347347
}
348348
if ($result === false) {
349-
if (PHP_VERSION_ID >= 80000) {
350-
$message = preg_last_error_msg();
351-
} else {
352-
$message = 'Regex error. error code: ' . preg_last_error();
353-
}
349+
$message = PHP_VERSION_ID >= 80000 ? preg_last_error_msg() : 'Regex error. error code: ' . preg_last_error();
354350

355351
throw new RuntimeException($message . '. filename: "' . $filename . '"');
356352
}

0 commit comments

Comments
 (0)