-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Cleaned up duplicate variable assignments in the same line #28085
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
Cleaned up duplicate variable assignments in the same line #28085
Conversation
Hi @bgorski. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
Hello @bgorski thank you for your contribution! Can you please take a look at the failed static test report to check what's wrong with it? I'm pretty sure the test doesn't fail because of your changes but because of legacy code. If you can apply suggested cleanup it would be very useful. Thank you! |
@aleron75 thank you for assigning yourself to this PR. All those issues were indeed legacy code that just happened to be in the same files I edited.
Those would require some refactoring that I haven't exactly had in mind when creating this simple contribution - and as you suspected they're not new things generated by code changes from this PR. Do you think leaving them would be an issue? |
it is indeed because if tests don't pass the PR can't be merged. Do you think you can fix those failing tests? Best. |
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.
Hi @bgorski. Thanks for collaboration. Can you please fix failed tests?
Hi @bgorski, I'm closing this PR now due to inactivity. |
Hi @bgorski, thank you for your contribution! |
I'm not sure how to reopen this. I'll create a new PR. |
Description (*)
This is a simple cleanup of two assignments to the same variable occurring in the same line.
Created by using the following regex:
($.*) = \1 = (with space before to exclude things like self::$loader = $loader = new \Composer\Autoload\ClassLoader(); and with space after to make sure it's an assignment and not anything else like ===)
And replacing with:
$1 = (also with space before and after to keep the formatting right)
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
none required
Questions or comments
Contribution checklist (*)