Skip to content

Commit 091db2f

Browse files
s/s/, ->yes
1 parent e7a5174 commit 091db2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Rules/FunctionDefinitionCheck.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public function checkAnonymousFunction(
204204
return $errors;
205205
}
206206
if ($returnTypeNode instanceof FullyQualified && $returnTypeNode->name === 'void') {
207-
foreach ($attribGroupss as $attribGroup) {
207+
foreach ($attribGroups as $attribGroup) {
208208
foreach ($attribGroup->attrs as $attrib) {
209209
if (strtolower($attrib->name) === 'nodiscard') {
210210
$errors[] = RuleErrorBuilder::message($noDiscardVoidReturnMessage)
@@ -495,7 +495,7 @@ private function checkParametersAcceptor(
495495
->build();
496496
}
497497
}
498-
if ($parametersAcceptor->hasNoDiscardAttribute()) {
498+
if ($parametersAcceptor->hasNoDiscardAttribute()->yes()) {
499499
$returnType = $functionNode->getReturnType();
500500
if ($returnType instanceof FullyQualified
501501
&& $returnType->name === 'void'

0 commit comments

Comments
 (0)