Skip to content
On this page

PSR2 Sniffs

ClassDeclaration

Checks the declaration of the class and its inheritance is correct.

PropertyDeclaration

Verifies that properties are declared correctly.

ControlStructureSpacing

Checks that control structures have the correct spacing around brackets.

ElseIfDeclaration

Verifies that there are no else if statements (elseif should be used instead).

SwitchDeclaration

Ensures all switch statements are defined correctly.

ClosingTag

Checks that the file does not end with a closing tag.

EndFileNewline

Ensures the file ends with a newline character.

FunctionCallSignature

Checks that the function call format is correct.

FunctionClosingBrace

Checks that the closing brace of a function goes directly after the body.

MethodDeclaration

Checks that the method declaration is correct.

NamespaceDeclaration

Ensures namespaces are declared correctly.

UseDeclaration

Ensures USE blocks are declared correctly.

Released under the MIT License.