Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 458 Bytes

File metadata and controls

19 lines (13 loc) · 458 Bytes

Control Structure Nesting Rule

Ensures that the nesting level of if and try-catch statements does not exceed a specified limit.

Configuration Example

    -
        class: Phauthentic\PHPStanRules\CleanCode\ControlStructureNestingRule
        arguments:
            maxNestingLevel: 2
        tags:
            - phpstan.rules.rule

Parameters

  • maxNestingLevel: Maximum allowed nesting level for control structures (required).