Completed
Push — master ( 67f2ac...4554ad )
by Viacheslav
02:21
created
src/JsonPatch.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         foreach ($data as $operation) {
34 34
             /** @var OpPath|OpPathValue|OpPathFrom $operation */
35 35
             if (is_array($operation)) {
36
-                $operation = (object)$operation;
36
+                $operation = (object) $operation;
37 37
             }
38 38
 
39 39
             if (!isset($operation->op)) {
@@ -64,11 +64,11 @@  discard block
 block discarded – undo
64 64
                     $op = new Test();
65 65
                     break;
66 66
                 default:
67
-                    throw new Exception('Unknown "op": ' . $operation->op);
67
+                    throw new Exception('Unknown "op": '.$operation->op);
68 68
             }
69 69
             $op->path = $operation->path;
70 70
             if ($op instanceof OpPathValue) {
71
-                if (!array_key_exists('value', (array)$operation)) {
71
+                if (!array_key_exists('value', (array) $operation)) {
72 72
                     throw new Exception('Missing "value" in operation data');
73 73
                 }
74 74
                 $op->value = $operation->value;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     {
88 88
         $result = array();
89 89
         foreach ($patch->operations as $operation) {
90
-            $result[] = (object)(array)$operation;
90
+            $result[] = (object) (array) $operation;
91 91
         }
92 92
 
93 93
         return $result;
@@ -144,8 +144,8 @@  discard block
 block discarded – undo
144 144
                         $diff = new JsonDiff($operation->value, $value,
145 145
                             JsonDiff::STOP_ON_DIFF);
146 146
                         if ($diff->getDiffCnt() !== 0) {
147
-                            throw new Exception('Test operation ' . json_encode($operation, JSON_UNESCAPED_SLASHES)
148
-                                . ' failed: ' . json_encode($value));
147
+                            throw new Exception('Test operation '.json_encode($operation, JSON_UNESCAPED_SLASHES)
148
+                                . ' failed: '.json_encode($value));
149 149
                         }
150 150
                         break;
151 151
                 }
Please login to merge, or discard this patch.