Wrapping shortcode content in a span or link

Get out of the switch block before placing the final return statement.

if you place return at the end of the switch block that way, the switch block already ends before it gets to the return statement (because of the previous matching break statements).

The correct CODE will be:

// just in case $summary is not defined out side of the switch block
$summary = '';
switch ( $weather['icon'] ) {

    case 'clear-day':
    case 'clear-night': 
        $summary = 'sunny'; 
        break;
    case 'wind': 
        $summary = 'breezy'; 
        break;
    case 'rain': 
        $summary = 'drizzly'; 
        break;              
    case 'fog': 
        $summary = 'foggy'; 
        break;
    case 'cloudy': 
        $summary = 'murky'; 
        break;
    case 'partly-cloudy-day': case 'partly-cloudy-night': 
        $summary = 'cloudy'; 
        break;
    case 'snow': case 'sleet':
        $summary = 'snowy'; 
        break;
    default: 
        $summary = 'beautiful'; 
        break;

} // end switch

return '<span class="weather">'.$summary.'</span>';