djoos / Symfony-coding-standard

Development repository for the Symfony coding standard
MIT License
401 stars 102 forks source link

ReturnOrThrowSniff false positive #178

Open kick-the-bucket opened 4 years ago

kick-the-bucket commented 4 years ago
switch ($a) {
    case 'a':
        switch ($b) {
            case 'b':
                return 'c';
        }
        break;
}

The sniff is triggered on the return, but I think it shouldn't be, since a switch without a default: is not guaranteed to return something.