Skip to content

Commit bb855f0

Browse files
committed
fix
1 parent 34a0a0e commit bb855f0

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/Rules/PHPUnit/DataProviderDataRule.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use PhpParser\Node;
66
use PHPStan\Analyser\Scope;
77
use PHPStan\Node\Expr\TypeExpr;
8-
use PHPStan\Reflection\Php\PhpMethodFromParserNodeReflection;
98
use PHPStan\Rules\Rule;
109
use PHPStan\Type\Constant\ConstantArrayType;
1110
use PHPStan\Type\ObjectType;
@@ -84,12 +83,11 @@ public function processNode(Node $node, Scope $scope): array
8483
}
8584

8685
$method = $scope->getFunction();
87-
if (!$method instanceof PhpMethodFromParserNodeReflection) {
86+
if ($method === null) {
8887
return [];
8988
}
9089

9190
$classReflection = $scope->getClassReflection();
92-
9391
if (
9492
$classReflection === null
9593
|| !$classReflection->is(TestCase::class)

tests/Rules/PHPUnit/DataProviderDataRuleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php declare(strict_types=1);
22

3-
namespace Rules\PHPUnit;
3+
namespace PHPStan\Rules\PHPUnit;
44

55
use PHPStan\Testing\CompositeRule;
66
use PHPStan\Rules\Methods\CallMethodsRule;

0 commit comments

Comments
 (0)