Skip to content

[PHP] PHP code sniffer warning Expected 1 lines after "if" #6400

@JoaquinBecerraAtValtech

Description

@JoaquinBecerraAtValtech

Apache NetBeans version

Apache NetBeans 18

What happened

When I use the autoformating function (shft + alt + f) Does not perform formatting correctly before and after IF commands:

Looks like there isn't an option on the formating tool to mark lines before and after the if statement

Correct:

        if (!$something) {
            return;
        }
        
        $var3 = 1;`

Incorrect:

        if (!$something) {
            return;
        }        
        $var3 = 1

How to reproduce

No response

Did this work correctly in an earlier version?

No / Don't know

Operating System

Linux Mint

JDK

11.0.14; OpenJDK 64-Bit Server VM 11.0.14+9-Ubuntu-0ubuntu2.20

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    PHP[ci] enable extra PHP tests (php/php.editor)kind:bugBug report or fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions