Skip to content

Commit 8b83767

Browse files
committed
Update DataProviderReturnTypeIgnoreExtension.php
1 parent a9225a6 commit 8b83767

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Type/PHPUnit/DataProviderReturnTypeIgnoreExtension.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ public function __construct(
2727

2828
public function shouldIgnore(Error $error, Node $node, Scope $scope): bool
2929
{
30-
if (!$scope->isInClass()) {
30+
if ($error->getIdentifier() !== 'missingType.iterableValue') {
3131
return false;
3232
}
3333

34-
if ($error->getIdentifier() !== 'missingType.iterableValue') {
34+
if (!$scope->isInClass()) {
3535
return false;
3636
}
37+
$classReflection = $scope->getClassReflection();
3738

3839
$methodReflection = $scope->getFunction();
3940
if ($methodReflection === null) {
4041
return false;
4142
}
4243

43-
$classReflection = $scope->getClassReflection();
4444
$testMethods = $this->testMethodsHelper->getTestMethods($classReflection, $scope);
4545
foreach ($testMethods as $testMethod) {
4646
foreach ($this->dataProviderHelper->getDataProviderMethods($scope, $testMethod, $classReflection) as [, $providerMethodName]) {

0 commit comments

Comments
 (0)