Skip to content

Conversation

samuelmaudo
Copy link
Contributor

This PR recovers a rule to forbid multi-line whitespace before the closing semicolon.

With this rule, this code:

$object->method1()
    ->method2()
    ->method(3)
    ;

becomes:

$object->method1()
    ->method2()
    ->method(3);

It was included in the PHP CS Fixer ruleset with the opposite configuration:

$object->method1()
    ->method2()
    ->method(3)
;

However, I believe that moving the semicolon to the new line for chained calls is not commong within the PHP community.

@samuelmaudo samuelmaudo self-assigned this Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant