Passed
Pull Request — master (#42)
by Viacheslav
02:53 queued 10s
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|array $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;
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
                         $diff = new JsonDiff($operation->value, $value,
171 171
                             JsonDiff::STOP_ON_DIFF);
172 172
                         if ($diff->getDiffCnt() !== 0) {
173
-                            throw new Exception('Test operation ' . json_encode($operation, JSON_UNESCAPED_SLASHES)
174
-                                . ' failed: ' . json_encode($value));
173
+                            throw new Exception('Test operation '.json_encode($operation, JSON_UNESCAPED_SLASHES)
174
+                                . ' failed: '.json_encode($value));
175 175
                         }
176 176
                         break;
177 177
                 }
Please login to merge, or discard this patch.
tests/src/DiffTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@
 block discarded – undo
23 23
      */
24 24
     public function testSkipPatch()
25 25
     {
26
-        $original = (object)(array("root" => (object)array("a" => 1, "b" => 2)));
27
-        $new = (object)(array("root" => (object)array("b" => 3, "c" => 4)));
26
+        $original = (object) (array("root" => (object) array("a" => 1, "b" => 2)));
27
+        $new = (object) (array("root" => (object) array("b" => 3, "c" => 4)));
28 28
 
29 29
         $diff = new JsonDiff($original, $new, JsonDiff::SKIP_JSON_PATCH);
30 30
         $this->assertSame(null, $diff->getPatch());
Please login to merge, or discard this patch.
tests/src/RearrangeArrayTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -282,8 +282,8 @@  discard block
 block discarded – undo
282 282
 
283 283
         $this->assertEmpty($missingItems, json_encode($ex2r, JSON_UNESCAPED_SLASHES));
284 284
         $this->assertEquals(
285
-            json_encode($ex1, JSON_UNESCAPED_SLASHES+JSON_PRETTY_PRINT),
286
-            json_encode($ex2r, JSON_UNESCAPED_SLASHES+JSON_PRETTY_PRINT)
285
+            json_encode($ex1, JSON_UNESCAPED_SLASHES + JSON_PRETTY_PRINT),
286
+            json_encode($ex2r, JSON_UNESCAPED_SLASHES + JSON_PRETTY_PRINT)
287 287
         );
288 288
     }
289 289
 
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
         "]2000,5000]"
381 381
     ]
382 382
 }',
383
-            json_encode($ex2r, JSON_UNESCAPED_SLASHES+JSON_PRETTY_PRINT)
383
+            json_encode($ex2r, JSON_UNESCAPED_SLASHES + JSON_PRETTY_PRINT)
384 384
         );
385 385
     }
386 386
 
Please login to merge, or discard this patch.