aik099 / CodingStandard

The PHP_CodeSniffer coding standard I'm using on all of my projects
BSD 3-Clause "New" or "Revised" License
5 stars 2 forks source link

IF sniff false-positive inside a "switch" #107

Open aik099 opened 1 year ago

aik099 commented 1 year ago

When "IF" statement is inside a switch then it reports:

No blank line found after "if" control structure

for this code:

switch ( $var ) {
    case 5:
        $a = 3;

        if ( $var == 3 ) {
            $b = 4;
        }
        break;
}