Passed
Push — master ( f2e88d...3da52d )
by
unknown
01:48 queued 13s
created
src/Traits/RelationshipMongoTrait.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
             $is_embeds_has_to_be_updated = $request->has($key);
67 67
 
68
-            if (! is_null($value) && ! ($value == '') && ! ($value == '[]')) {
68
+            if (!is_null($value) && !($value == '') && !($value == '[]')) {
69 69
                 $objs = json_decode($value);
70 70
             } else {
71 71
                 $objs = getArrayWithEmptyObj($model, $is_EO, $is_EM);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                     }
86 86
                 }
87 87
 
88
-                if (! empty($objs)) {
88
+                if (!empty($objs)) {
89 89
                     if ($is_EM) {
90 90
                         $this->tempEM = [];
91 91
                     }
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         if ($is_EM_target) {
137 137
             $new_values = [];
138 138
             throw_if(
139
-                ! isset($this->$method_on_target),
139
+                !isset($this->$method_on_target),
140 140
                 new Exception(
141 141
                     'Error during target update. Remember to init the attribute '.$method_on_target.
142 142
                     ' on collection '.$this->getCollection()
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
                     )
154 154
                 );
155 155
 
156
-                if (! is_null($temp)) {
156
+                if (!is_null($temp)) {
157 157
                     if ($this->getIsPartialRequest()) {
158 158
                         if (Arr::get($temp->attributes, 'ref_id') !== Arr::get($mini_model->attributes, 'ref_id')) {
159 159
                             $new_values[] = $temp->attributes;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
                 }
168 168
             }
169 169
 
170
-            if (! $is_update_operation) {
170
+            if (!$is_update_operation) {
171 171
                 $new_values[] = $mini_model->attributes;
172 172
             }
173 173
         } elseif ($is_EO_target) {
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
     {
231 231
         if ($is_EO) {
232 232
             $embedObj = $this->$method;
233
-            if (! is_null($embedObj)) {
233
+            if (!is_null($embedObj)) {
234 234
                 $target_id = $embedObj->ref_id;
235 235
                 $this->handleSubTarget($target_id, $modelTarget, $methodOnTarget, $is_EO_target, $is_EM_target);
236 236
             }
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
         if ($is_EM_target) {
254 254
             $target = new $modelTarget;
255 255
             $target = $target->all()->where('id', $target_id)->first();
256
-            if (! is_null($target)) {
256
+            if (!is_null($target)) {
257 257
                 $new_values = [];
258 258
                 foreach ($target->$methodOnTarget as $temp) {
259 259
                     if ($temp->ref_id !== $this->getId()) {
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
         $EOitems = $embedObj->getItems();
291 291
         //Current Obj Create
292 292
         foreach ($EOitems as $EOkey => $item) {
293
-            if (! is_null($obj)) {
293
+            if (!is_null($obj)) {
294 294
                 $is_ML = isML($item);
295 295
                 $is_MD = isMD($item);
296 296
                 $this->checkPropertyExistence($obj, $EOkey, $method, $model);
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
     private function processEmbedOnTargetCollection($modelTarget, $obj, $methodOnTarget, $modelOnTarget, bool $is_EO_target, bool $is_EM_target)
341 341
     {
342 342
         $modelToBeSync = $this->getModelTobeSync($modelTarget, $obj);
343
-        if (! is_null($modelToBeSync)) {
343
+        if (!is_null($modelToBeSync)) {
344 344
             $miniModel = $this->getEmbedModel($modelOnTarget);
345 345
             $modelToBeSync->setIsPartialRequest([], $this->getIsPartialRequest());
346 346
             $modelToBeSync->updateRelationWithSync($miniModel, $methodOnTarget, $is_EO_target, $is_EM_target);
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
 
357 357
     public function setIsPartialRequest(array $options, $is_partial_request = null): void
358 358
     {
359
-        if (! is_null($is_partial_request)) {
359
+        if (!is_null($is_partial_request)) {
360 360
             $this->is_partial_request = $is_partial_request;
361 361
 
362 362
             return;
Please login to merge, or discard this patch.