WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #28409


Ignore:
Timestamp:
05/30/2014 05:43:13 PM (6 years ago)
Author:
wonderboymusic
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28409 – Description

    initial v1  
    22
    33There are a variety of places in core that format `switch` statements differently. IMO, `default` should always be at the bottom. It's more consistent, and it doesn't confuse static analysis tools (we don't have to do everything that is suggested by automated tools).
     4
     5{{{
     6switch ( $var ) {
     7    case 1:
     8        $return = 'match';
     9        break;
     10    default:
     11        break;
     12}
     13}}}
     14is better than:
    415
    516{{{
     
    1223}
    1324}}}
    14 
    15 is better than:
    16 
    17 {{{
    18 switch ( $var ) {
    19     case 1:
    20         $return = 'match';
    21         break;
    22     default:
    23         break;
    24 }
    25 }}}