Skip to content

Commit 89b9dfc

Browse files
committed
[ci-review] Rector Rectify
1 parent 15a3acc commit 89b9dfc

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

rules-tests/CodeQuality/Rector/Attribute/SortAttributeNamedArgsRector/config/configured_rule.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
declare(strict_types=1);
44

5+
use Rector\CodeQuality\Rector\Attribute\SortAttributeNamedArgsRector;
56
use Rector\Config\RectorConfig;
67

78
return RectorConfig::configure()
8-
->withRules([\Rector\CodeQuality\Rector\Attribute\SortAttributeNamedArgsRector::class]);
9+
->withRules([SortAttributeNamedArgsRector::class]);

rules/CodeQuality/Rector/Attribute/SortAttributeNamedArgsRector.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Rector\CodeQuality\Rector\Attribute;
66

7+
use PhpParser\Node\Attribute;
78
use PhpParser\Node;
89
use PHPStan\Reflection\MethodReflection;
910
use Rector\CodeQuality\NodeManipulator\NamedArgsSorter;
@@ -32,13 +33,13 @@ public function getRuleDefinition(): RuleDefinition
3233

3334
public function getNodeTypes(): array
3435
{
35-
return [Node\Attribute::class];
36+
return [Attribute::class];
3637
}
3738

3839
/**
3940
* @param Node\Attribute $node
4041
*/
41-
public function refactor(Node $node)
42+
public function refactor(Node $node): ?Node
4243
{
4344
$args = $node->args;
4445
if (count($args) <= 1) {

rules/CodingStyle/Guard/ArrowFunctionAndClosureFirstClassCallableGuard.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ private function isChainedCall(FuncCall|MethodCall|StaticCall $callLike): bool
196196
{
197197
if ($callLike instanceof MethodCall) {
198198
return $callLike->var instanceof CallLike;
199-
} elseif ($callLike instanceof StaticCall) {
199+
}
200+
if ($callLike instanceof StaticCall) {
200201
return $callLike->class instanceof CallLike;
201202
}
202203

0 commit comments

Comments
 (0)