Skip to content

Indentation of string concatenation fails inside closure #555

Closed
@cweiske

Description

@cweiske

When a string is concatenated on multiple lines inside a closure, the indentation is wrong on the second line if the first line contains a concatenating dot:

<?php
someClosureHandling(
    function () {
        return 'a' . 'b'
                   . 'c';
    }
);

. 'c'; should be indented 4 characters relative to return, and not on the same position as the dot in the line above.

Should be:

<?php
someClosureHandling(
    function () {
        return 'a' . 'b'
            . 'c';
    }
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions