Completed
Push — master ( 53c412...203014 )
by Viacheslav
15:11 queued 05:20
created
src/JsonPatch.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         foreach ($data as $operation) {
58 58
             /** @var OpPath|OpPathValue|OpPathFrom $operation */
59 59
             if (is_array($operation)) {
60
-                $operation = (object)$operation;
60
+                $operation = (object) $operation;
61 61
             }
62 62
 
63 63
             if (!isset($operation->op)) {
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
                     $op = new Test();
89 89
                     break;
90 90
                 default:
91
-                    throw new Exception('Unknown "op": ' . $operation->op);
91
+                    throw new Exception('Unknown "op": '.$operation->op);
92 92
             }
93 93
             $op->path = $operation->path;
94 94
             if ($op instanceof OpPathValue) {
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     {
113 113
         $result = array();
114 114
         foreach ($patch->operations as $operation) {
115
-            $result[] = (object)(array)$operation;
115
+            $result[] = (object) (array) $operation;
116 116
         }
117 117
 
118 118
         return $result;
@@ -169,8 +169,8 @@  discard block
 block discarded – undo
169 169
                         $diff = new JsonDiff($operation->value, $value,
170 170
                             JsonDiff::STOP_ON_DIFF);
171 171
                         if ($diff->getDiffCnt() !== 0) {
172
-                            throw new Exception('Test operation ' . json_encode($operation, JSON_UNESCAPED_SLASHES)
173
-                                . ' failed: ' . json_encode($value));
172
+                            throw new Exception('Test operation '.json_encode($operation, JSON_UNESCAPED_SLASHES)
173
+                                . ' failed: '.json_encode($value));
174 174
                         }
175 175
                         break;
176 176
                 }
Please login to merge, or discard this patch.
src/JsonDiff.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -262,11 +262,11 @@  discard block
 block discarded – undo
262 262
 
263 263
         if ($this->options & self::TOLERATE_ASSOCIATIVE_ARRAYS) {
264 264
             if (is_array($original) && !empty($original) && !array_key_exists(0, $original)) {
265
-                $original = (object)$original;
265
+                $original = (object) $original;
266 266
             }
267 267
 
268 268
             if (is_array($new) && !empty($new) && !array_key_exists(0, $new)) {
269
-                $new = (object)$new;
269
+                $new = (object) $new;
270 270
             }
271 271
         }
272 272
 
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
             JsonPointer::add($this->merge, $this->pathItems, $new);
323 323
         }
324 324
 
325
-        $isUriFragment = (bool)($this->options & self::JSON_URI_FRAGMENT_ID);
325
+        $isUriFragment = (bool) ($this->options & self::JSON_URI_FRAGMENT_ID);
326 326
         foreach ($originalKeys as $key => $originalValue) {
327 327
             if ($this->options & self::STOP_ON_DIFF) {
328 328
                 if ($this->modifiedCnt || $this->addedCnt || $this->removedCnt) {
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
             if ($isArray && is_int($actualKey)) {
337 337
                 $actualKey -= $removedOffset;
338 338
             }
339
-            $this->path .= '/' . JsonPointer::escapeSegment((string)$actualKey, $isUriFragment);
339
+            $this->path .= '/'.JsonPointer::escapeSegment((string) $actualKey, $isUriFragment);
340 340
             $this->pathItems[] = $actualKey;
341 341
 
342 342
             if (array_key_exists($key, $newArray)) {
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
                 return null;
374 374
             }
375 375
             $newOrdered[$key] = $value;
376
-            $path = $this->path . '/' . JsonPointer::escapeSegment($key, $isUriFragment);
376
+            $path = $this->path.'/'.JsonPointer::escapeSegment($key, $isUriFragment);
377 377
             $pathItems = $this->pathItems;
378 378
             $pathItems[] = $key;
379 379
             JsonPointer::add($this->added, $pathItems, $value);
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 
390 390
         }
391 391
 
392
-        return is_array($new) ? $newOrdered : (object)$newOrdered;
392
+        return is_array($new) ? $newOrdered : (object) $newOrdered;
393 393
     }
394 394
 
395 395
     /**
Please login to merge, or discard this patch.