-
-
Notifications
You must be signed in to change notification settings - Fork 683
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
[CodeQuality] Add DateTimeToDateTimeInterfaceRector #4791
[CodeQuality] Add DateTimeToDateTimeInterfaceRector #4791
Conversation
rules/code-quality/src/Rector/ClassMethod/DateTimeToDateTimeInterfaceRector.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
*/ | ||
final class DateTimeToDateTimeInterfaceRector extends AbstractRector | ||
{ | ||
private const METHODS_MAP = [ |
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.
What kind of map is this? Excluded, included or ...?
More specific naming could help
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.
I've renamed it to METHODS_RETURNING_CLASS_INSTANCE_MAP
.
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.
Very clean work 👍
rules/code-quality/src/Rector/ClassMethod/DateTimeToDateTimeInterfaceRector.php
Show resolved
Hide resolved
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.
I've left few comments. After they get resolved, it's ready to merge 👍
Thank you 👍 |
rectorphp/rector-src@685fe90 Make SimplifyUselessVariableRector run without scope (#4791)
Closes #4478