Skip to content

Indentation false positive when closure containing nested IF conditions used as function argument #2450

@MartynasJanu

Description

@MartynasJanu
foo('bar', function () {
    if ($conditionA &&
        $conditionB
    ) {
        if ($conditionC) {
            $a = 1;
        }
    }
});

After the merge of #2414 solution, the code above started generating the following errors from Generic.WhiteSpace.ScopeIndent:
5 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
7 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions