Skip to content

Commit 7b4393c

Browse files
authored
Merge branch 'main' into feat/remove-setAccessible-rector
2 parents 4ed3b10 + fe319d7 commit 7b4393c

2 files changed

Lines changed: 12 additions & 24 deletions

File tree

rules/CodeQuality/Rector/Class_/InlineConstructorDefaultToPropertyRector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ private function refactorProperty(
191191
// remove assign
192192
unset($constructClassMethod->stmts[$key]);
193193

194-
195194
return true;
196195
}
197196
}

rules/CodingStyle/Rector/FuncCall/ClosureFromCallableToFirstClassCallableRector.php

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44

55
namespace Rector\CodingStyle\Rector\FuncCall;
66

7-
use PhpParser\Node\Expr\StaticCall;
7+
use PhpParser\Node;
88
use PhpParser\Node\Arg;
9-
use PhpParser\Node\Scalar\String_;
10-
use PhpParser\Node\Expr\FuncCall;
11-
use PhpParser\Node\VariadicPlaceholder;
9+
use PhpParser\Node\Expr;
1210
use PhpParser\Node\Expr\Array_;
13-
use PhpParser\Node\Expr\Variable;
14-
use PhpParser\Node\Expr\MethodCall;
15-
use PhpParser\Node\Name\FullyQualified;
1611
use PhpParser\Node\Expr\ClassConstFetch;
17-
use PhpParser\Node\Expr;
18-
use PhpParser\Node\Name;
12+
use PhpParser\Node\Expr\FuncCall;
13+
use PhpParser\Node\Expr\MethodCall;
14+
use PhpParser\Node\Expr\StaticCall;
15+
use PhpParser\Node\Expr\Variable;
1916
use PhpParser\Node\Identifier;
20-
use PhpParser\Node;
17+
use PhpParser\Node\Name;
18+
use PhpParser\Node\Name\FullyQualified;
19+
use PhpParser\Node\Scalar\String_;
20+
use PhpParser\Node\VariadicPlaceholder;
2121
use Rector\Rector\AbstractRector;
2222
use Rector\ValueObject\PhpVersionFeature;
2323
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
@@ -29,10 +29,6 @@
2929
*/
3030
final class ClosureFromCallableToFirstClassCallableRector extends AbstractRector implements MinPhpVersionInterface
3131
{
32-
public function __construct()
33-
{
34-
}
35-
3632
public function getRuleDefinition(): RuleDefinition
3733
{
3834
return new RuleDefinition(
@@ -72,10 +68,7 @@ public function refactor(Node $node): ?Node
7268
}
7369

7470
if ($arg->value instanceof String_) {
75-
return new FuncCall(
76-
$this->toFullyQualified($arg->value->value),
77-
[new VariadicPlaceholder()],
78-
);
71+
return new FuncCall($this->toFullyQualified($arg->value->value), [new VariadicPlaceholder()]);
7972
}
8073

8174
if ($arg->value instanceof Array_) {
@@ -109,11 +102,7 @@ public function refactor(Node $node): ?Node
109102
return null;
110103
}
111104

112-
return new StaticCall(
113-
$classNode,
114-
$arg->value->items[1]->value->value,
115-
[new VariadicPlaceholder()],
116-
);
105+
return new StaticCall($classNode, $arg->value->items[1]->value->value, [new VariadicPlaceholder()]);
117106
}
118107

119108
return $node;

0 commit comments

Comments
 (0)