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
[BinaryOperatorSpacesFixer] Fix align of =
inside calls of methods
#6112
Conversation
@SpacePossum @keradus Hi, would you have time to take a look to this fix ? Does something need to be improved ? |
Friendly ping @keradus @SpacePossum. Is something wrong/missing with my PR ? |
Friendly ping @keradus @SpacePossum ; would you mind taking a look at this bugfix ? :) |
Hi and thanks for the PR! This rule is kind of notorious complex and a good candidate for complete rewrite some day. As such, reviewing is also complex.
Can you update the sample to the more simple one: [
'<?php
m(
function ()
{
$d["a"] = 1;
$d["abc"] = 2;
}
);
',
'<?php
m(
function ()
{
$d["a"] = 1;
$d["abc"] = 2;
}
);
',
], we also need a test with I need some more time to check some cases |
Sure, done.
I don't understand what should be tested. |
Thanks for updating/simplify the sample, much appreciated 👍 I'm thinking along these lines,
it will get fixed to: --- test.php
+++ test.php
@@ -13,4 +13,4 @@
fn ($x = 1) => $x + 3;
-$f = 123;
+$f = 123; which I think is not correct The change to |
a033d82
to
e35eb8b
Compare
You were right, it was fixing. I added the test and the fix. |
e35eb8b
to
f7750fd
Compare
Thank you @VincentLanglet , apologies for the long wait, PR is much appreciated 👍 |
No problem, I know it's not always easy to find time to maintain such a big project. |
This seems to "break" (in my projects) on 2 fronts: if ($tenant !== null) {
- $tenantUrl = $tenant->url;
+ $tenantUrl = $tenant->url;
} elseif (!empty($sessionTenantUrl = session('tenant.url'))) {
- $tenantUrl = $sessionTenantUrl;
+ $tenantUrl = $sessionTenantUrl;
} The above seems to be fixed by #6333, the other case is: - $parser = new QueryParser(
+ $parser = new QueryParser(
$query = 'modifier:single'
); So I think this was a good change but missed some edge cases it looks like. Happy to help where I can but thought to report it here first 👍 |
@stayallive #6333 and #6334 are doing some fixes. If the second PR is still not fixing your use case, please report it |
Hi. I found a bug when using align/align_with_space_minimal for
=
.Before, any time a
(
was found, the check was skipped until the)
.Now, I do this only for
(
for function definition and for/foreach/if/while/...So
aligns the
=
.It fix my personal issue (I added a test), and I think it will fix the issue #5667