Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Mar 16, 2024
1 parent 79aed74 commit 6512a84
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Rules/FunctionDefinitionCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,13 +385,11 @@ private function checkRequiredParameterAfterOptional(array $parameterNodes): arr
$errors[] = RuleErrorBuilder::message(
sprintf(
'Deprecated in PHP %s: Required parameter $%s follows optional parameter $%s.',
$targetPhpVersion ??= '8.0',
$targetPhpVersion ?? '8.0',
$parameterName,
$optionalParameter,
),
)->line($parameterNode->getStartLine())->build();

$targetPhpVersion = null;
continue;
}
if ($parameterNode->default === null) {
Expand Down

0 comments on commit 6512a84

Please sign in to comment.