Skip to content

Commit

Permalink
Error identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Nov 28, 2023
1 parent cebb509 commit 2956cf7
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public function processNode(Node $node, Scope $scope): array
$returnType = ParserNodeTypeToPHPStanType::resolve($node->returnType, $scope->isInClass() ? $scope->getClassReflection() : null);
if ($returnType instanceof NonAcceptingNeverType) {
$messages[] = RuleErrorBuilder::message('Never return type in arrow function is supported only on PHP 8.2 and later.')
->identifier('return.neverTypeNotSupported')
->nonIgnorable()
->build();
}
Expand Down

0 comments on commit 2956cf7

Please sign in to comment.