Skip to content

PSR-2 rules: file, line #3

Description

@DragorWW

PSR-2
PHP_CodeSniffer PSR-2

Rules

LinebreakStyle eslint

options:

  • "unix" (default) enforces the usage of Unix line endings: \n for LF.
  • "windows" enforces the usage of Windows line endings: \r\n for CRLF.

EolLast eslint

options:

  • "always" (default) enforces that files end with a newline
  • "never" enforces that files do not end with a newline

NoTrailingSpaces eslint

options:

  • {"skipBlankLines": false} (default) disallows trailing whitespace on empty lines
  • {"skipBlankLines": true} allows trailing whitespace on empty lines

NoMultipleEmptyLines eslint

options:

  • "max" (default: 2) enforces a maximum number of consecutive empty lines.

Files

  • The closing ?> tag MUST be omitted from files containing only PHP.

Line

  • line lenght > 120 warn
  • There MUST NOT be more than one statement per line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions