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 2e1e9cc commit f914c84Copy full SHA for f914c84
rules/Php74/Rector/Closure/ClosureToArrowFunctionRector.php
@@ -89,7 +89,7 @@ public function refactor(Node $node): ?Node
89
$comments = $node->stmts[0]->getAttribute(AttributeKey::COMMENTS) ?? [];
90
if ($comments !== []) {
91
$this->mirrorComments($arrowFunction->expr, $node->stmts[0]);
92
- $arrowFunction->setAttribute(AttributeKey::COMMENTS, true);
+ $arrowFunction->setAttribute(AttributeKey::COMMENTS, $node->stmts[0]->getComments());
93
}
94
95
return $arrowFunction;
0 commit comments