From: Jack Phoenix Date: Sat, 15 May 2010 10:39:41 +0000 (+0000) Subject: coding style tweaks X-Git-Tag: 1.31.0-rc.0~36847 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=4bc6efd5bec0b770a60e5663fcbef6a5fb25f058;hp=bcee7c223859d57d643de628494b371d55d408a6;p=lhc%2Fweb%2Fwiklou.git coding style tweaks --- 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 );