Passed
Pull Request — master (#55)
by
unknown
08:16
created
src/JsonPatch.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,11 +57,11 @@  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 (!is_object($operation)) {
64
-                throw new Exception( 'Invalid patch operation - should be a JSON object' );
64
+                throw new Exception('Invalid patch operation - should be a JSON object');
65 65
             }
66 66
 
67 67
             if (!isset($operation->op)) {
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
                     $op = new Test();
93 93
                     break;
94 94
                 default:
95
-                    throw new InvalidOperationException($operation, 'Invalid "op": ' . $operation->op);
95
+                    throw new InvalidOperationException($operation, 'Invalid "op": '.$operation->op);
96 96
             }
97 97
             $op->path = $operation->path;
98 98
             if ($op instanceof OpPathValue) {
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     {
117 117
         $result = array();
118 118
         foreach ($patch->operations as $operation) {
119
-            $result[] = (object)(array)$operation;
119
+            $result[] = (object) (array) $operation;
120 120
         }
121 121
 
122 122
         return $result;
@@ -174,8 +174,8 @@  discard block
 block discarded – undo
174 174
                         $diff = new JsonDiff($operation->value, $value,
175 175
                             JsonDiff::STOP_ON_DIFF);
176 176
                         if ($diff->getDiffCnt() !== 0) {
177
-                            throw new PatchTestOperationFailedException('Test operation ' . json_encode($operation, JSON_UNESCAPED_SLASHES)
178
-                                . ' failed: ' . json_encode($value));
177
+                            throw new PatchTestOperationFailedException('Test operation '.json_encode($operation, JSON_UNESCAPED_SLASHES)
178
+                                . ' failed: '.json_encode($value));
179 179
                         }
180 180
                         break;
181 181
                 }
Please login to merge, or discard this patch.