Skip to content

Commit 865e85b

Browse files
committed
cs
1 parent 736935e commit 865e85b

File tree

5 files changed

+10
-18
lines changed

5 files changed

+10
-18
lines changed

rules-tests/CodingStyle/Rector/Enum_/EnumCaseToPascalCaseRector/config/with_autoload_configured_rule.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@
77

88
return RectorConfig::configure()
99
->withRules([EnumCaseToPascalCaseRector::class])
10-
->withAutoloadPaths([
11-
__DIR__ . '/../Source'
12-
]);
10+
->withAutoloadPaths([__DIR__ . '/../Source']);

rules-tests/Renaming/Rector/MethodCall/RenameMethodRector/config/configured_rule.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,12 @@
3030
new MethodCallRename(NewInterface::class, 'some_old', 'some_new'),
3131
new MethodCallRename(DifferentInterface::class, 'renameMe', 'toNewVersion'),
3232

33-
// reflection method name
3433
new MethodCallRename(ReflectionFunctionAbstract::class, 'getTentativeReturnType', 'getReturnType'),
3534

36-
// with array key
3735
new MethodCallRenameWithArrayKey('Nette\Utils\Html', 'addToArray', 'addToHtmlArray', 'hey'),
38-
// never types
3936
new MethodCallRename('Symfony\\Component\\Workflow\\DefinitionBuilder', 'reset', 'clear'),
4037

41-
// enum method
4238
new MethodCallRename(SomeEnumWithMethod::class, 'oldEnumMethod', 'newEnumMethod'),
43-
44-
// trait method
4539
new MethodCallRename(SomeTrait::class, '_test', 'test'),
4640
]);
4741
};

rules/CodingStyle/ClassNameImport/ClassNameImportSkipVoter/ReservedClassNameImportSkipVoter.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ public function shouldSkip(File $file, FullyQualifiedObjectType $fullyQualifiedO
3838
{
3939
$shortName = $fullyQualifiedObjectType->getShortNameLowered();
4040

41-
return in_array(
42-
$shortName,
43-
self::RESERVED_CLASS_NAMES,
44-
true
45-
);
41+
return in_array($shortName, self::RESERVED_CLASS_NAMES, true);
4642
}
4743
}

rules/TypeDeclaration/Rector/ClassMethod/AddReturnTypeDeclarationRector.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ private function processClassMethodNodeWithTypehints(
146146
return;
147147
}
148148

149-
if ($newType instanceof SimpleStaticType && $classMethod->returnType instanceof Name && $this->isName($classMethod->returnType, 'static')) {
149+
if ($newType instanceof SimpleStaticType && $classMethod->returnType instanceof Name && $this->isName(
150+
$classMethod->returnType,
151+
'static'
152+
)) {
150153
return;
151154
}
152155

src/Reporting/MissConfigurationReporter.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ public function reportSkippedNeverRegisteredRules(): void
2626
$neverRegisteredSkippedRules = array_unique(array_diff($skippedRules, $registeredRules));
2727

2828
// remove special PostRectorInterface rules, they are registered in a different way
29-
$neverRegisteredSkippedRules = array_filter($neverRegisteredSkippedRules, function ($skippedRule) {
30-
return ! is_a($skippedRule, PostRectorInterface::class, true);
31-
});
29+
$neverRegisteredSkippedRules = array_filter(
30+
$neverRegisteredSkippedRules,
31+
fn ($skippedRule): bool => ! is_a($skippedRule, PostRectorInterface::class, true)
32+
);
3233

3334
if ($neverRegisteredSkippedRules === []) {
3435
return;

0 commit comments

Comments
 (0)