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

[CodeQuality] Skip Variable may be immutable via New_ or Clone_ on SimplifyUselessVariableRector #1060

Merged
merged 15 commits into from
Oct 26, 2021

Conversation

samsonasik
Copy link
Member

Closes #1059 Fixes rectorphp/rector#6769 Always check variable is assigned with New_ or Clone_ to ensure the assigned value is not immutable.

@samsonasik
Copy link
Member Author

There is strange error in test for different rule:

1) Rector\Tests\PSR4\Rector\FileWithoutNamespace\NormalizeNamespaceByPSR4ComposerAutoloadRector\NormalizeNamespaceByPSR4ComposerAutoloadRectorTest::test with data set #4 (Symplify\SmartFileSystem\SmartFileInfo Object (...))
69
Undefined array key 29

@samsonasik
Copy link
Member Author

The error in NormalizeNamespaceByPSR4ComposerAutoloadRectorTest is unrelated @TomasVotruba it is ready for review.

@samsonasik
Copy link
Member Author

rebased.

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba it is ready for review.

@samsonasik
Copy link
Member Author

rebased.

@samsonasik
Copy link
Member Author

I am merging it ;)

@samsonasik samsonasik merged commit ade120e into main Oct 26, 2021
@samsonasik samsonasik deleted the patch-1 branch October 26, 2021 09:14
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.

Rector wants to remove assigning to the property when working with DateTimeImmutable
3 participants