Skip to content

Commit

Permalink
Use more specific node-type
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored and ondrejmirtes committed Dec 17, 2024
1 parent 11d4235 commit 72a6721
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/Rules/PHPUnit/AssertSameBooleanExpectedRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<NodeAbstract>
* @implements Rule<CallLike>
*/
class AssertSameBooleanExpectedRule implements Rule
{

public function getNodeType(): string
{
return NodeAbstract::class;
return CallLike::class;
}

public function processNode(Node $node, Scope $scope): array
Expand Down
6 changes: 3 additions & 3 deletions src/Rules/PHPUnit/AssertSameNullExpectedRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<NodeAbstract>
* @implements Rule<CallLike>
*/
class AssertSameNullExpectedRule implements Rule
{

public function getNodeType(): string
{
return NodeAbstract::class;
return CallLike::class;
}

public function processNode(Node $node, Scope $scope): array
Expand Down
6 changes: 3 additions & 3 deletions src/Rules/PHPUnit/AssertSameWithCountRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@

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;
use PHPStan\Type\ObjectType;
use function count;

/**
* @implements Rule<NodeAbstract>
* @implements Rule<CallLike>
*/
class AssertSameWithCountRule implements Rule
{

public function getNodeType(): string
{
return NodeAbstract::class;
return CallLike::class;
}

public function processNode(Node $node, Scope $scope): array
Expand Down

0 comments on commit 72a6721

Please sign in to comment.