From 4bc6efd5bec0b770a60e5663fcbef6a5fb25f058 Mon Sep 17 00:00:00 2001 From: Jack Phoenix Date: Sat, 15 May 2010 10:39:41 +0000 Subject: [PATCH 1/1] coding style tweaks --- includes/json/FormatJson.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/includes/json/FormatJson.php b/includes/json/FormatJson.php index 9a1f57fd88..cacf6680fc 100644 --- a/includes/json/FormatJson.php +++ b/includes/json/FormatJson.php @@ -1,29 +1,31 @@ encode($value, $isHtml) ; + return $json->encode( $value, $isHtml ); } else { - return json_encode($value); + return json_encode( $value ); } } - public static function decode( $value, $assoc=false ){ - if (!function_exists('json_decode') ) { + + public static function decode( $value, $assoc = false ) { + if ( !function_exists( 'json_decode' ) ) { $json = new Services_JSON(); $jsonDec = $json->decode( $value ); - if( $assoc ) + if( $assoc ) { $jsonDec = wfObjectToArray( $jsonDec ); + } return $jsonDec; } else { return json_decode( $value, $assoc ); -- 2.20.1