From: Brion Vibber Date: Sun, 7 Jan 2007 06:59:14 +0000 (+0000) Subject: don't mix braced and non-braced blocks; it's ugly and error-prone X-Git-Tag: 1.31.0-rc.0~54611 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=5c54e5832192eb633a90b4bb4c750c0c255d9fb0;p=lhc%2Fweb%2Fwiklou.git don't mix braced and non-braced blocks; it's ugly and error-prone --- diff --git a/includes/SpecialVersion.php b/includes/SpecialVersion.php index 3adb50ba80..c7ccf57f79 100644 --- a/includes/SpecialVersion.php +++ b/includes/SpecialVersion.php @@ -235,12 +235,12 @@ class SpecialVersion { function listToText( $list ) { $cnt = count( $list ); - if ( $cnt == 1 ) + if ( $cnt == 1 ) { // Enforce always returning a string return (string)$this->arrayToString( $list[0] ); - elseif ( $cnt == 0 ) + } elseif ( $cnt == 0 ) { return ''; - else { + } else { $t = array_slice( $list, 0, $cnt - 1 ); $one = array_map( array( &$this, 'arrayToString' ), $t ); $two = $this->arrayToString( $list[$cnt - 1] ); @@ -257,9 +257,9 @@ class SpecialVersion { * @return mixed */ function arrayToString( $list ) { - if ( ! is_array( $list ) ) + if ( ! is_array( $list ) ) { return $list; - else { + } else { $class = get_class( $list[0] ); return "($class, {$list[1]})"; }