From 5c54e5832192eb633a90b4bb4c750c0c255d9fb0 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 7 Jan 2007 06:59:14 +0000 Subject: [PATCH] don't mix braced and non-braced blocks; it's ugly and error-prone --- includes/SpecialVersion.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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]})"; } -- 2.20.1