We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c5bbbf commit d3e0b85Copy full SHA for d3e0b85
src/Rules/FunctionDefinitionCheck.php
@@ -206,7 +206,7 @@ public function checkAnonymousFunction(
206
if ($returnTypeNode instanceof FullyQualified && $returnTypeNode->name === 'void') {
207
foreach ($attribGroups as $attribGroup) {
208
foreach ($attribGroup->attrs as $attrib) {
209
- if (strtolower($attrib->name) === 'nodiscard') {
+ if (strtolower($attrib->name->name) === 'nodiscard') {
210
$errors[] = RuleErrorBuilder::message($noDiscardVoidReturnMessage)
211
->line($returnTypeNode->getStartLine())
212
->identifier('attribute.target')
0 commit comments