File tree 1 file changed +6
-11
lines changed
1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,9 @@ class ProxyCallVisitor extends NodeVisitorAbstract
37
37
/**
38
38
* Define the proxy handler trait here.
39
39
*/
40
- private array $ proxyTraits
41
- = [
42
- ProxyTrait::class,
43
- ];
40
+ private array $ proxyTraits = [
41
+ ProxyTrait::class,
42
+ ];
44
43
45
44
private bool $ shouldRewrite = false ;
46
45
@@ -73,11 +72,7 @@ public function enterNode(Node $node)
73
72
{
74
73
switch ($ node ) {
75
74
case $ node instanceof ClassMethod:
76
- if ($ this ->shouldRewrite ($ node )) {
77
- $ this ->shouldRewrite = true ;
78
- } else {
79
- $ this ->shouldRewrite = false ;
80
- }
75
+ $ this ->shouldRewrite = $ this ->shouldRewrite ($ node );
81
76
break ;
82
77
}
83
78
@@ -213,9 +208,9 @@ private function getMagicConst(): Node\Scalar\MagicConst
213
208
};
214
209
}
215
210
216
- private function shouldRewrite (ClassMethod $ node )
211
+ private function shouldRewrite (ClassMethod $ node ): bool
217
212
{
218
- if (in_array ( $ this ->visitorMetadata ->classLike , [ Node \Stmt \Interface_::class]) ) {
213
+ if ($ this ->visitorMetadata ->classLike == Node \Stmt \Interface_::class) {
219
214
return false ;
220
215
}
221
216
You can’t perform that action at this time.
0 commit comments