Skip to content

RequireMultiLineCall: Fix when multiline call exactly fits into the line length limit #1748

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

Merged
merged 1 commit into from
May 1, 2025

Conversation

maryo
Copy link
Contributor

@maryo maryo commented Apr 29, 2025

Fixing reporting error for a multiline call that exactly fits into the line length limit.

$array = array_map(['a loooooooooooooooooong value that exactly fits into the line length limit'], function (): string {
    return 'foo';
});

Here, $lineStart would be $array = array_map(.
Previously, $lineEnd was (['a loooooooooooooooooong value that exactly fits into the line length limit'], function (): string {.
It was including the opening parenthesis ( again, so $lineLength of this line was 121 instead of 120.

…multiline call which exactly fits into line length limit
@maryo maryo changed the title SlevomatCodingStandard.Functions.RequireMultiLineCall: Fix RequireMultiLineCall: Fix when multiline call exactly fits into the line length limit Apr 29, 2025
@kukulich
Copy link
Contributor

kukulich commented May 1, 2025

Thanks.

@kukulich kukulich merged commit c2eab04 into slevomat:master May 1, 2025
35 checks passed
@maryo maryo deleted the fork branch May 23, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants