Passed
Push — master ( 7a981c...2773c2 )
by stéphane
04:34
created
yaml/Compact.php 3 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,18 +8,18 @@  discard block
 block discarded – undo
8 8
  */
9 9
 class Compact extends \ArrayIterator implements \JsonSerializable
10 10
 {
11
-	// private static $value;
12
- //    public function __construct($argument)
13
- //    {
14
- //    	self::$value = $argument;
15
- //        // if ($argument instanceof \Countable && count($argument) > 0) {
16
- //        //     # it's an array-like
17
- //        // } else {
18
- //        //     //it's an object-like
19
- //        // }
20
- //    }
21
-	//
22
-	public function __construct()
11
+    // private static $value;
12
+    //    public function __construct($argument)
13
+    //    {
14
+    //    	self::$value = $argument;
15
+    //        // if ($argument instanceof \Countable && count($argument) > 0) {
16
+    //        //     # it's an array-like
17
+    //        // } else {
18
+    //        //     //it's an object-like
19
+    //        // }
20
+    //    }
21
+    //
22
+    public function __construct()
23 23
     {
24 24
         parent::__construct([], 1);//1 = Array indices can be accessed as properties in read/write.
25 25
     }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
     public static function wrap($arrayOrObject)
35 35
     {
36
-    	//
37
-    	return $this;
36
+        //
37
+        return $this;
38 38
     }
39 39
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 	//
22 22
 	public function __construct()
23 23
     {
24
-        parent::__construct([], 1);//1 = Array indices can be accessed as properties in read/write.
24
+        parent::__construct([], 1); //1 = Array indices can be accessed as properties in read/write.
25 25
     }
26 26
 
27 27
     public function jsonSerialize()
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,12 @@
 block discarded – undo
27 27
     public function jsonSerialize()
28 28
     {
29 29
         $prop = get_object_vars($this);
30
-        if (count($prop) > 0) return $prop;
31
-        if (count($this) > 0) return iterator_to_array($this);
30
+        if (count($prop) > 0) {
31
+            return $prop;
32
+        }
33
+        if (count($this) > 0) {
34
+            return iterator_to_array($this);
35
+        }
32 36
     }
33 37
 
34 38
     public static function wrap($arrayOrObject)
Please login to merge, or discard this patch.