Skip to content

Files

Latest commit

 

History

History
23 lines (15 loc) · 696 Bytes

PSR2.ControlStructures.SwitchDeclaration.md

File metadata and controls

23 lines (15 loc) · 696 Bytes

Pattern: Malformed switch declaration

Issue: -

Description

Ensures all switch statements are defined correctly.

Configuration

By default, this rule ensures that the statement is indented 4 spaces from the case or default keyword, but you can change the size of the indent by setting the indent property.

<rule ref="PSR2.ControlStructures.SwitchDeclaration">
    <properties>
        <property name="indent" value="2" />
    </properties>
</rule>

Further Reading