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

NoUnsetCastFixer - Test for higher-precedence operators #4316

Merged
merged 1 commit into from
Mar 18, 2019
Merged

NoUnsetCastFixer - Test for higher-precedence operators #4316

merged 1 commit into from
Mar 18, 2019

Conversation

SpacePossum
Copy link
Contributor

closes #4241

@SpacePossum SpacePossum modified the milestones: 2.14.2, 2.14.3 Feb 17, 2019
@@ -70,6 +70,11 @@ private function fixUnsetCast(Tokens $tokens, $index)
return;
}

$afterVar = $tokens->getNextMeaningfulToken($varIndex);
if (null === $varIndex || !$tokens[$afterVar]->equalsAny([';', [T_CLOSE_TAG]])) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be null === $afterVar probably?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh yes, copy-paste eror 🤦‍♂️

@SpacePossum SpacePossum added waiting review RTM Ready To Merge and removed waiting review RTM Ready To Merge labels Mar 14, 2019
@SpacePossum SpacePossum merged commit 217d2b0 into PHP-CS-Fixer:2.14 Mar 18, 2019
SpacePossum added a commit that referenced this pull request Mar 18, 2019
…acePossum)

This PR was squashed before being merged into the 2.14 branch (closes #4316).

Discussion
----------

NoUnsetCastFixer - Test for higher-precedence operators

closes #4241

Commits
-------

217d2b0 NoUnsetCastFixer - Test for higher-precedence operators
@SpacePossum SpacePossum deleted the 2_12_bug_4241_NoUnsetCastFixer branch March 18, 2019 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NoUnsetCastFixer - breaks higher-precedence operators and some side effects
2 participants