Skip to content

Generic.WhiteSpace.ScopeIndent - indent follow up lines of multiline statement #3244

@MartinMystikJonas

Description

@MartinMystikJonas

Describe the bug
A clear and concise description of what the bug is.

Code sample

        $statusString =
            "Lorem ipsum dolor sit amet." .
            "Lorem ipsum dolor sit amet..";

Custom ruleset

<?xml version="1.0"?>
<ruleset name="My Custom Standard">
  <rule ref="Generic.WhiteSpace.ScopeIndent">
    <properties>
      <property name="exact" value="true"/>
    </properties>
  </rule>
</ruleset>

To reproduce
Steps to reproduce the behavior:

  1. Create a file called test.php with the code sample above...
  2. Run phpcs test.php ...
  3. See error message displayed
PHPCS output here

Expected behavior
I would like to be able to instruct this rule to indent following lines of multiline statements to have +1 indent not same indent as first line. Or at least allow not exact matching on following lines.

Versions (please complete the following information):

  • OS: Linux
  • PHP: 7.4
  • PHPCS: 3.5.8

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