Skip to content

ReturnOrThrowSniff false positive #178

Open
@kick-the-bucket

Description

@kick-the-bucket
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions