-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Generic.Formatting.MultipleStatementAlignment.NotSame doesn't parse short list properly after upgrading to 3.2.3 #1988
Comments
@lcobucci Hi Luís, #1870, #1848, #1924 are all related to this, but I'm surprised you are seeing the message as your example code looks to use blank lines between the lines and that would "break" a multi-statement block. So, this should trigger the notice: <?php
declare(strict_types=1);
$payload = $message->getPayload();
[$userInput, $errors] = $this->normalizeUserInput($payload); This should not: <?php
declare(strict_types=1);
$payload = $message->getPayload();
[$userInput, $errors] = $this->normalizeUserInput($payload); |
Just ran some tests which confirm what I said above. |
@jrfnl the code is exactly the way I've posted (with the line in between), which indeed surprised me. It can sure be an influence of another sniff but I'm afraid it wouldn't have that output while only analysing the code. |
@jrfnl let me try it with |
@jrfnl it's indeed fixed in |
You're welcome. |
After updating to
v3.2.3
this sniff is complaining about incorrect spacing regarding this code:Output:
And it doesn't complain anymore if we use
list()
instead of[]
, like:Output:
The text was updated successfully, but these errors were encountered: