Skip to content
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

Prevent UnionTypes rule from removing @param static in favor fo self-typed $argument #1667

Merged
merged 2 commits into from
Jan 12, 2022

Conversation

simPod
Copy link
Contributor

@simPod simPod commented Jan 12, 2022

No description provided.


namespace Rector\Tests\Php80\Rector\FunctionLike\UnionTypesRector\Fixture;

class SkipStaticParam
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By convention, the "Skip" fixtures cannot have any changed content. That's how we know if the file should be untouched or not.

In this case, it would be more useful to have only single static param and test no change here.
Then have another fixture including the removed 2 lines from doc block.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nailed it, thank you 👍

@TomasVotruba
Copy link
Member

Looks good 👍

@TomasVotruba TomasVotruba merged commit a82a18e into rectorphp:main Jan 12, 2022
@simPod simPod deleted the static branch January 12, 2022 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants