Symfony-coding-standard icon indicating copy to clipboard operation
Symfony-coding-standard copied to clipboard

ReturnOrThrowSniff false positive

Open kick-the-bucket opened this issue 5 years ago • 0 comments

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.

kick-the-bucket avatar Dec 31 '19 07:12 kick-the-bucket