浏览代码

Fix indent

Augusto 12 年之前
父节点
当前提交
fa04c3f7b9
共有 1 个文件被更改,包括 15 次插入15 次删除
  1. 15 15
      Model/Behavior/JsonableBehavior.php

+ 15 - 15
Model/Behavior/JsonableBehavior.php

@@ -47,15 +47,15 @@ class JsonableBehavior extends ModelBehavior {
 		'sort' => false, // only for list
 		'sort' => false, // only for list
 		'unique' => true, // only for list (autoclean values on insert),
 		'unique' => true, // only for list (autoclean values on insert),
 		'map' => array(), // map on a different DB field
 		'map' => array(), // map on a different DB field
-        'encodeParams' => array( // params for json_encode 
-            'options' => 0,
-            'depth' => 512,
-        ),
+		'encodeParams' => array( // params for json_encode 
+			'options' => 0,
+			'depth' => 512,
+		),
 		'decodeParams' => array( // params for json_decode
 		'decodeParams' => array( // params for json_decode
-            'assoc' => false, // useful when working with multidimensional arrays
-            'depth' => 512,
-            'options' => 0
-        )
+			'assoc' => false, // useful when working with multidimensional arrays
+			'depth' => 512,
+			'options' => 0
+		)
 	);
 	);
 
 
 	public function setup(Model $Model, $config = array()) {
 	public function setup(Model $Model, $config = array()) {
@@ -187,13 +187,13 @@ class JsonableBehavior extends ModelBehavior {
 	 * @return mixed
 	 * @return mixed
 	 */
 	 */
 	public function _decode(Model $Model, $val) {
 	public function _decode(Model $Model, $val) {
-	    // $options param added in php 5.4
-        if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
-            $decoded = json_decode($val, $this->settings[$Model->alias]['decodeParams']['assoc'], $this->settings[$Model->alias]['decodeParams']['depth'], $this->settings[$Model->alias]['decodeParams']['options']); 
-        } 
-        else {
-            $decoded = json_decode($val, $this->settings[$Model->alias]['decodeParams']['assoc'], $this->settings[$Model->alias]['decodeParams']['depth']); 
-        }
+		// $options param added in php 5.4
+		if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
+		    $decoded = json_decode($val, $this->settings[$Model->alias]['decodeParams']['assoc'], $this->settings[$Model->alias]['decodeParams']['depth'], $this->settings[$Model->alias]['decodeParams']['options']); 
+		} 
+		else {
+		    $decoded = json_decode($val, $this->settings[$Model->alias]['decodeParams']['assoc'], $this->settings[$Model->alias]['decodeParams']['depth']); 
+		}
         
         
 		if ($decoded === false) {
 		if ($decoded === false) {
 			return false;
 			return false;