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

YodaStyleFixer - fix for assignment operators #5693

Merged
merged 1 commit into from
Jul 30, 2021
Merged

YodaStyleFixer - fix for assignment operators #5693

merged 1 commit into from
Jul 30, 2021

Conversation

kubawerlos
Copy link
Contributor

@julienfalque
Copy link
Member

Is this correct? < and > have a greater precedence than +=.

@kubawerlos
Copy link
Contributor Author

Good point 😄

Yet, the problem exists as the referenced code breaks PHP syntax.

@julienfalque
Copy link
Member

Not sure what you mean. The referenced code and the code in your tests in valid syntax-wise. Some code may be broken logically, but is it related to PHP CS Fixer?

@kubawerlos
Copy link
Contributor Author

@julienfalque when you try to fix:

if (0x80 > $c %= 0x200000) {
    return chr($c);
}

with

'yoda_style' => [
    'equal' => false,
    'identical' => false,
    'less_and_greater' => false,
],

there is a syntax error.

@coveralls
Copy link

coveralls commented Jul 5, 2021

Coverage Status

Coverage increased (+0.002%) to 91.561% when pulling ac14f61 on kubawerlos:fix_YodaStyleFixer into 5ad0853 on FriendsOfPHP:2.19.

@kubawerlos kubawerlos marked this pull request as ready for review July 5, 2021 14:33
@SpacePossum SpacePossum added the RTM Ready To Merge label Jul 28, 2021
@SpacePossum SpacePossum added this to the 2.19.1 milestone Jul 28, 2021
@keradus keradus added RTM Ready To Merge and removed RTM Ready To Merge labels Jul 29, 2021
@keradus
Copy link
Member

keradus commented Jul 29, 2021

@kubawerlos can you rebase to solve conflict, pls?

@keradus keradus removed the RTM Ready To Merge label Jul 29, 2021
@SpacePossum SpacePossum added the RTM Ready To Merge label Jul 30, 2021
@keradus keradus removed the RTM Ready To Merge label Jul 30, 2021
@keradus
Copy link
Member

keradus commented Jul 30, 2021

Thank you @kubawerlos.

@keradus keradus merged commit d7c4564 into PHP-CS-Fixer:2.19 Jul 30, 2021
@kubawerlos kubawerlos deleted the fix_YodaStyleFixer branch July 30, 2021 11:23
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.

None yet

5 participants