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.
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.
PSR-2
PHP_CodeSniffer PSR-2
Rules
LinebreakStyle eslint
options:
"unix"(default) enforces the usage of Unix line endings:\nfor LF."windows"enforces the usage of Windows line endings:\r\nfor CRLF.EolLast eslint
options:
"always"(default) enforces that files end with a newline"never"enforces that files do not end with a newlineNoTrailingSpaces eslint
options:
{"skipBlankLines": false}(default) disallows trailing whitespace on empty lines{"skipBlankLines": true}allows trailing whitespace on empty linesNoMultipleEmptyLines eslint
options:
"max"(default: 2) enforces a maximum number of consecutive empty lines.Files
Line