Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jan 9, 2023
1 parent c561fe0 commit 0f05c71
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassMethodNode;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Rules\Rule;
use PHPStan\ShouldNotHappenException;
use function sprintf;

/**
Expand Down Expand Up @@ -36,11 +34,7 @@ public function processNode(Node $node, Scope $scope): array
return [];
}

/** @var MethodReflection $method */
$method = $scope->getFunction();
if (!$method instanceof MethodReflection) {
throw new ShouldNotHappenException();
}
$method = $node->getMethodReflection();
$methodSignature = ParametersAcceptorSelector::selectSingle($method->getVariants());

$errors = [];
Expand Down

0 comments on commit 0f05c71

Please sign in to comment.