Skip to content

Commit 27475fc

Browse files
committed
fix: skip non-native methods
1 parent b1ab1d9 commit 27475fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rules/CodingStyle/Guard/ArrowFunctionAndClosureFirstClassCallableGuard.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use PhpParser\Node\Param;
1919
use PhpParser\NodeVisitor;
2020
use PHPStan\Analyser\Scope;
21-
use PHPStan\Reflection\Annotations\AnnotationMethodReflection;
21+
use PHPStan\Reflection\MethodReflection;
2222
use Rector\NodeNameResolver\NodeNameResolver;
2323
use Rector\NodeTypeResolver\Node\AttributeKey;
2424
use Rector\PhpDocParser\NodeTraverser\SimpleCallableNodeTraverser;
@@ -96,7 +96,7 @@ public function shouldSkip(
9696
}
9797

9898
// exists, but by @method annotation
99-
if ($reflection instanceof AnnotationMethodReflection && ! $reflection->getDeclaringClass()->hasNativeMethod(
99+
if ($reflection instanceof MethodReflection && ! $reflection->getDeclaringClass()->hasNativeMethod(
100100
$reflection->getName()
101101
)) {
102102
return true;

0 commit comments

Comments
 (0)