We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
See https://getrector.com/demo/df4a4011-49f2-4fd2-96e7-a1627ebb4eaa
<?php declare(strict_types=1); final class DemoFile { public function run(): int|string { if ($base64 = base64_encode('')) { return 5; } return '10'; } }
ExplicitBoolCompareRector
Not doubling the variable assignment. Or make the variable assignment before the condition and then using the variable.
The text was updated successfully, but these errors were encountered:
we are aware of it, just not a priority right now #8663 (comment)
Sorry, something went wrong.
Re-open, assign inside condition seems needs special check, also the ExplicitBoolCompareRector seems not using ExactCompareFactory
ExactCompareFactory
Successfully merging a pull request may close this issue.
Bug Report
Minimal PHP Code Causing Issue
See https://getrector.com/demo/df4a4011-49f2-4fd2-96e7-a1627ebb4eaa
Responsible rules
ExplicitBoolCompareRector
Expected Behavior
Not doubling the variable assignment.
Or make the variable assignment before the condition and then using the variable.
The text was updated successfully, but these errors were encountered: