You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$r =newRuleDefinition('Replace calls to get_class() and get_parent_class() without arguments with self::class and parent::class.', [newCodeSample(<<<'OLD_CODE_SAMPLE'
23
+
returnnewRuleDefinition('Replace calls to get_class() and get_parent_class() without arguments with self::class and parent::class.', [newCodeSample(<<<'OLD_CODE_SAMPLE'
20
24
class Example extends StdClass {
21
25
public function whoAreYou() {
22
26
return get_class() . ' daughter of ' . get_parent_class();
@@ -31,17 +35,16 @@ public function whoAreYou() {
31
35
}
32
36
NEW_CODE_SAMPLE
33
37
)]);
34
-
return$r;
35
38
}
36
39
/**
37
40
* @return array<class-string<Node>>
38
41
*/
39
42
publicfunctiongetNodeTypes() : array
40
43
{
41
-
return [Node\Expr\FuncCall::class];
44
+
return [FuncCall::class];
42
45
}
43
46
/**
44
-
* @param Node\Expr\FuncCall $node
47
+
* @param FuncCall $node
45
48
*/
46
49
publicfunctionrefactor(Node$node) : ?Node
47
50
{
@@ -59,7 +62,7 @@ public function refactor(Node $node) : ?Node
0 commit comments