Passed
Push — master ( c71b41...7ad944 )
by Viacheslav
02:47
created
src/Cli/Diff.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,13 +54,13 @@
 block discarded – undo
54 54
     {
55 55
         $originalJson = file_get_contents($this->originalPath);
56 56
         if (!$originalJson) {
57
-            $this->response->error('Unable to read ' . $this->originalPath);
57
+            $this->response->error('Unable to read '.$this->originalPath);
58 58
             return;
59 59
         }
60 60
 
61 61
         $newJson = file_get_contents($this->newPath);
62 62
         if (!$newJson) {
63
-            $this->response->error('Unable to read ' . $this->newPath);
63
+            $this->response->error('Unable to read '.$this->newPath);
64 64
             return;
65 65
         }
66 66
 
Please login to merge, or discard this patch.
src/JsonProcessor.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
                 && !is_int($key)
23 23
                 && false === filter_var($key, FILTER_VALIDATE_INT)
24 24
             ) {
25
-                $key = (string)$key;
25
+                $key = (string) $key;
26 26
                 $ref = new \stdClass();
27 27
                 $ref = &$ref->{$key};
28 28
             } else {
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
         if (array_key_exists($key, $a)) {
38 38
             return true;
39 39
         }
40
-        $key = (string)$key;
40
+        $key = (string) $key;
41 41
         foreach ($a as $k => $v) {
42
-            if ((string)$k === $key) {
42
+            if ((string) $k === $key) {
43 43
                 return true;
44 44
             }
45 45
         }
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 
49 49
     private static function arrayGet($key, array $a)
50 50
     {
51
-        $key = (string)$key;
51
+        $key = (string) $key;
52 52
         foreach ($a as $k => $v) {
53
-            if ((string)$k === $key) {
53
+            if ((string) $k === $key) {
54 54
                 return $v;
55 55
             }
56 56
         }
@@ -68,17 +68,17 @@  discard block
 block discarded – undo
68 68
         while (null !== $key = array_shift($pathItems)) {
69 69
             $key = urldecode($key);
70 70
             if ($ref instanceof \stdClass) {
71
-                $vars = (array)$ref;
71
+                $vars = (array) $ref;
72 72
                 if (self::arrayKeyExists($key, $vars)) {
73 73
                     $ref = self::arrayGet($key, $vars);
74 74
                 } else {
75
-                    throw new Exception('Key not found: ' . $key);
75
+                    throw new Exception('Key not found: '.$key);
76 76
                 }
77 77
             } else {
78 78
                 if (self::arrayKeyExists($key, $ref)) {
79 79
                     $ref = $ref[$key];
80 80
                 } else {
81
-                    throw new Exception('Key not found: ' . $key);
81
+                    throw new Exception('Key not found: '.$key);
82 82
                 }
83 83
             }
84 84
         }
@@ -100,13 +100,13 @@  discard block
 block discarded – undo
100 100
                 if (property_exists($ref, $key)) {
101 101
                     $ref = &$ref->$key;
102 102
                 } else {
103
-                    throw new Exception('Key not found: ' . $key);
103
+                    throw new Exception('Key not found: '.$key);
104 104
                 }
105 105
             } else {
106 106
                 if (array_key_exists($key, $ref)) {
107 107
                     $ref = &$ref[$key];
108 108
                 } else {
109
-                    throw new Exception('Key not found: ' . $key);
109
+                    throw new Exception('Key not found: '.$key);
110 110
                 }
111 111
             }
112 112
         }
Please login to merge, or discard this patch.
src/JsonDiff.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 
189 189
         foreach ($originalKeys as $key => $originalValue) {
190 190
             $path = $this->path;
191
-            $this->path .= '/' . urlencode($key);
191
+            $this->path .= '/'.urlencode($key);
192 192
 
193 193
             if (array_key_exists($key, $newArray)) {
194 194
                 $newOrdered[$key] = $this->process($originalValue, $newArray[$key]);
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         // additions
208 208
         foreach ($newArray as $key => $value) {
209 209
             $newOrdered[$key] = $value;
210
-            $path = $this->path . '/' . urlencode($key);
210
+            $path = $this->path.'/'.urlencode($key);
211 211
             JsonProcessor::pushByPath($this->added, $path, $value);
212 212
             $this->addedCnt++;
213 213
             $this->addedPaths [] = $path;
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
             }
217 217
         }
218 218
 
219
-        return is_array($new) ? $newOrdered : (object)$newOrdered;
219
+        return is_array($new) ? $newOrdered : (object) $newOrdered;
220 220
     }
221 221
 
222 222
     private function rearrangeArray(array $original, array $new)
Please login to merge, or discard this patch.