Passed
Pull Request — master (#1412)
by Marcin
02:24
created
src/JsonSerializationVisitor.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
                 }
110 110
             }
111 111
 
112
-           return $rs;
112
+            return $rs;
113 113
         }, $data, $type);
114 114
     }
115 115
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     public function visitDouble(float $data, array $type)
72 72
     {
73 73
         $percision = $type['params'][0] ?? null;
74
-        if (!is_int($percision)) {
74
+        if ( ! is_int($percision)) {
75 75
             return $data;
76 76
         }
77 77
 
@@ -89,10 +89,10 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function visitArray(array $data, array $type)
91 91
     {
92
-        return new LazyObject(function(array $data, array $type){
92
+        return new LazyObject(function(array $data, array $type) {
93 93
             $rs = isset($type['params'][1]) ? new \ArrayObject() : [];
94 94
 
95
-            $isList = isset($type['params'][0]) && !isset($type['params'][1]);
95
+            $isList = isset($type['params'][0]) && ! isset($type['params'][1]);
96 96
 
97 97
             $elType = $this->getElementType($type);
98 98
             foreach ($data as $k => $v) {
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         }
151 151
 
152 152
         if ($metadata->inline) {
153
-            if($v instanceof LazyObject) {
153
+            if ($v instanceof LazyObject) {
154 154
                 $v = $v->jsonSerialize();
155 155
             }
156 156
             if (\is_array($v) || ($v instanceof \ArrayObject)) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
      */
90 90
     public function visitArray(array $data, array $type)
91 91
     {
92
-        return new LazyObject(function(array $data, array $type){
92
+        return new LazyObject(function(array $data, array $type) {
93 93
             $rs = isset($type['params'][1]) ? new \ArrayObject() : [];
94 94
 
95 95
             $isList = isset($type['params'][0]) && !isset($type['params'][1]);
Please login to merge, or discard this patch.