We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
array_any
1 parent 3ede29a commit 21199b3Copy full SHA for 21199b3
src/NodeAnalyzer/TestsNodeAnalyzer.php
@@ -59,12 +59,10 @@ public function isTestClassMethod(ClassMethod $classMethod): bool
59
}
60
61
foreach ($classMethod->getAttrGroups() as $attrGroup) {
62
- $hasTestAttribute = array_any(
63
- $attrGroup->attrs,
64
- static fn($attribute): bool => $attribute->name->toString() === 'PHPUnit\\Framework\\Attributes\\Test'
65
- );
66
- if ($hasTestAttribute) {
67
- return \true;
+ foreach ($attrGroup->attrs as $attribute) {
+ if($attribute->name->toString() === 'PHPUnit\\Framework\\Attributes\\Test'){
+ return true;
+ }
68
69
70
0 commit comments