-
-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Php74] Mirror comment on Closure return to ArrowFunction expr on ClosureToArrowFunctionRector #1677
Conversation
# Failing Test for ClosureToArrowFunctionRector Based on https://getrector.org/demo/1ec6e7f1-7c0f-684e-9843-a7cd56252edf
40705ea
to
9897a9b
Compare
*/ | ||
// something | ||
// @psalm-suppress UndefinedFunction | ||
ff(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this tweak on BetterStandardPrinter::p()
currently make duplicate comment for existing arrow function:
*/
// something
// @psalm-suppress UndefinedFunction
- ff();
+ /**
+ * comment
+ */
+// something
+// @psalm-suppress UndefinedFunction
which incorrect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved by add new AttributeKey to flag if comment is mirrored 6f29de7
eea7956
to
b75c112
Compare
----- | ||
<?php | ||
|
||
fn() => /** @psalm-suppress UndefinedFunction */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep start comment on current line is on purpose to avoid make creating a tab spaces which will fail on compare in test.
All checks have passed 🎉 @TomasVotruba it is ready for review. |
Thank you 👍 |
Closes #1641
Fixes rectorphp/rector#6916