Changes between Initial Version and Version 1 of Ticket #28409
- Timestamp:
- 05/30/2014 05:43:13 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28409 – Description
initial v1 2 2 3 3 There 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 {{{ 6 switch ( $var ) { 7 case 1: 8 $return = 'match'; 9 break; 10 default: 11 break; 12 } 13 }}} 14 is better than: 4 15 5 16 {{{ … … 12 23 } 13 24 }}} 14 15 is better than:16 17 {{{18 switch ( $var ) {19 case 1:20 $return = 'match';21 break;22 default:23 break;24 }25 }}}