Skip to content

psr Preset

Rules under this preset:

brace-stylefixable

Ensure that opening and closing braces have consistent style

file-closing-tagfixable

Ensure that PHP files do not end with a closing tag

file-end-linefixable

Check that a PHP file does not end with a blank line

indentfixable

Ensure that the indentation is consistent

keywords-lowercasefixable

Ensure that PHP keywords are lowercase

line-limit

Ensure that lines do not exceed a given limit

trailing-spacefixable

Ensure that there is no trailing whitespace at the end of each line

linebreak-stylefixable

Enforce consistent linebreak style

name-casefixable

Ensure that the name case is correct

new-class-parenthesesfixable

Ensure that class instantiations are followed by parentheses

no-content-after-bracefixable

Ensure there is no comment or a statement after a brace on the same line

one-declaration-per-file

Discurage including more than one declaration per file

prefix-underscorefixable

Ensure that identifiers are not prefixed with an underscore

property-limit

Ensure that only one property declared per statement

property-no-var

Ensure that property is not declared with var

method.default-last

Ensure that default paramters are sorted last in the paramters list

method.visibility

Ensure that methods visibility is set

spacing.accessorfixable

Ensure consistent accessor -> spacing.

spacing.assignmentfixable

Ensure that assignment operator has consistent spacing

spacing.bracefixable

Ensure consistent brace spacing

spacing.bracketfixable

Ensure that square brackets [] have consistent spacing

spacing.operatorsfixable

Ensure consistent operators spacing

spacing.pairfixable

Ensure that pair operator => have consistent spacing

spacing.parenfixable

Ensure consistent parentheses spacing

spacing.separationfixable

Ensure consistent instruction spacing (comma, semicolon, etc.)

spacing.typesfixable

Ensure consistent types spacing.

Released under the MIT License.