Skip to content
On this page

ControlStructureSpacing

Checks that control structures have the correct spacing around brackets.

Scope

PSR2.ControlStructures.ControlStructureSpacing

Description

Control Structures should have 0 spaces after opening parentheses and 0 spaces before closing parentheses.

Properties

Property NameTypeDefaultAvailable Since
requiredSpacesAfterOpenint01.5.2
requiredSpacesBeforeCloseint01.5.2

Usage

xml
<rule ref="PSR2.ControlStructures.ControlStructureSpacing">
    <properties>
        <property name="requiredSpacesAfterOpen" value="1" />
        <property name="requiredSpacesBeforeClose" value="1" />
    </properties>
</rule>

Examples

No Examples Available

Please edit this page through Github to add examples.

Released under the MIT License.