Skip to content

Commit

Permalink
MethodParameterComparisonHelper - parameter $ignorable of `compare(…
Browse files Browse the repository at this point in the history
…)` method made required
  • Loading branch information
ondrejmirtes committed Sep 14, 2024
1 parent 4937527 commit f85a500
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Rules/Methods/MethodParameterComparisonHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(private PhpVersion $phpVersion, private bool $generi
/**
* @return list<IdentifierRuleError>
*/
public function compare(ExtendedMethodReflection $prototype, ClassReflection $prototypeDeclaringClass, PhpMethodFromParserNodeReflection $method, bool $ignorable = false): array
public function compare(ExtendedMethodReflection $prototype, ClassReflection $prototypeDeclaringClass, PhpMethodFromParserNodeReflection $method, bool $ignorable): array
{
/** @var list<IdentifierRuleError> $messages */
$messages = [];
Expand Down
2 changes: 1 addition & 1 deletion src/Rules/Methods/OverridingMethodRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public function processNode(Node $node, Scope $scope): array
}
}

$messages = array_merge($messages, $this->methodParameterComparisonHelper->compare($prototype, $prototypeDeclaringClass, $method));
$messages = array_merge($messages, $this->methodParameterComparisonHelper->compare($prototype, $prototypeDeclaringClass, $method, false));

if (!$prototypeVariant instanceof FunctionVariantWithPhpDocs) {
return $this->addErrors($messages, $node, $scope);
Expand Down

0 comments on commit f85a500

Please sign in to comment.