Improving many case switch statement
<p>I'm studying some code examples that I haven't written myself, and I found this function which looks to me like it's badly written, or at least not very efficient. Can you suggest ways to improve it? I was thinking this might work with an associative array, but not sure how. </p>

<p>Any other ways this can be re-written?</p>

<pre><code>    $op = '';
    switch($style) {
        case 'f':
        case 'F': {
            $op = 'f';
            break;
        }
        case 'f*':
        case 'F*': {
            $op = 'f*';
            break;
        }
        case 'B':
        case 'FD':
        case 'DF': {
            $op = 'B';
            break;
        }
        default: {
            if (!empty($default)) {
                $op = $this-&gt;dosomething($default, '');
            } else {
                $op = '';
            }
        }
    }
    return $op;
</code></pre>
