From 72a6721c9b64b3e4c9db55abbc38f790b318267e Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Fri, 13 Dec 2024 11:48:43 +0100 Subject: [PATCH] Use more specific node-type --- src/Rules/PHPUnit/AssertSameBooleanExpectedRule.php | 6 +++--- src/Rules/PHPUnit/AssertSameNullExpectedRule.php | 6 +++--- src/Rules/PHPUnit/AssertSameWithCountRule.php | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Rules/PHPUnit/AssertSameBooleanExpectedRule.php b/src/Rules/PHPUnit/AssertSameBooleanExpectedRule.php index 969f7b3..308f514 100644 --- a/src/Rules/PHPUnit/AssertSameBooleanExpectedRule.php +++ b/src/Rules/PHPUnit/AssertSameBooleanExpectedRule.php @@ -3,22 +3,22 @@ namespace PHPStan\Rules\PHPUnit; use PhpParser\Node; +use PhpParser\Node\Expr\CallLike; use PhpParser\Node\Expr\ConstFetch; -use PhpParser\NodeAbstract; use PHPStan\Analyser\Scope; use PHPStan\Rules\Rule; use PHPStan\Rules\RuleErrorBuilder; use function count; /** - * @implements Rule + * @implements Rule */ class AssertSameBooleanExpectedRule implements Rule { public function getNodeType(): string { - return NodeAbstract::class; + return CallLike::class; } public function processNode(Node $node, Scope $scope): array diff --git a/src/Rules/PHPUnit/AssertSameNullExpectedRule.php b/src/Rules/PHPUnit/AssertSameNullExpectedRule.php index a2d0cfa..363fa57 100644 --- a/src/Rules/PHPUnit/AssertSameNullExpectedRule.php +++ b/src/Rules/PHPUnit/AssertSameNullExpectedRule.php @@ -3,22 +3,22 @@ namespace PHPStan\Rules\PHPUnit; use PhpParser\Node; +use PhpParser\Node\Expr\CallLike; use PhpParser\Node\Expr\ConstFetch; -use PhpParser\NodeAbstract; use PHPStan\Analyser\Scope; use PHPStan\Rules\Rule; use PHPStan\Rules\RuleErrorBuilder; use function count; /** - * @implements Rule + * @implements Rule */ class AssertSameNullExpectedRule implements Rule { public function getNodeType(): string { - return NodeAbstract::class; + return CallLike::class; } public function processNode(Node $node, Scope $scope): array diff --git a/src/Rules/PHPUnit/AssertSameWithCountRule.php b/src/Rules/PHPUnit/AssertSameWithCountRule.php index 38fdf9a..3c3ada4 100644 --- a/src/Rules/PHPUnit/AssertSameWithCountRule.php +++ b/src/Rules/PHPUnit/AssertSameWithCountRule.php @@ -4,7 +4,7 @@ use Countable; use PhpParser\Node; -use PhpParser\NodeAbstract; +use PhpParser\Node\Expr\CallLike; use PHPStan\Analyser\Scope; use PHPStan\Rules\Rule; use PHPStan\Rules\RuleErrorBuilder; @@ -12,14 +12,14 @@ use function count; /** - * @implements Rule + * @implements Rule */ class AssertSameWithCountRule implements Rule { public function getNodeType(): string { - return NodeAbstract::class; + return CallLike::class; } public function processNode(Node $node, Scope $scope): array