Passed
Push — master ( e4aaaf...2a7d70 )
by Giacomo
14:37
created
src/Traits/RelationshipMongoTrait.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
             $is_embeds_has_to_be_updated = $request->has($key);
62 62
 
63
-            if (! is_null($value) && ! ($value == '') && ! ($value == '[]')) {
63
+            if (!is_null($value) && !($value == '') && !($value == '[]')) {
64 64
                 $objs = json_decode($value);
65 65
             } else {
66 66
                 $objs = getArrayWithEmptyObj($model, $is_EO, $is_EM);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
                     }
81 81
                 }
82 82
 
83
-                if (! empty($objs)) {
83
+                if (!empty($objs)) {
84 84
                     if ($is_EM) {
85 85
                         $this->tempEM = [];
86 86
                     }
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         if ($is_EM_target) {
130 130
             $new_values = [];
131 131
             foreach ($this->$method_on_target as $temp) {
132
-                if(!is_null($temp)){
132
+                if (!is_null($temp)) {
133 133
                     $new_values[] = $temp->attributes;
134 134
                 }
135 135
             }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
     {
187 187
         if ($is_EO) {
188 188
             $embedObj = $this->$method;
189
-            if (! is_null($embedObj)) {
189
+            if (!is_null($embedObj)) {
190 190
                 $target_id = $embedObj->ref_id;
191 191
                 $this->handleSubTarget($target_id, $modelTarget, $methodOnTarget, $is_EO_target, $is_EM_target);
192 192
             }
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
         if ($is_EM_target) {
210 210
             $target = new $modelTarget;
211 211
             $target = $target->all()->where('id', $target_id)->first();
212
-            if (! is_null($target)) {
212
+            if (!is_null($target)) {
213 213
                 $new_values = [];
214 214
                 foreach ($target->$methodOnTarget as $temp) {
215 215
                     if ($temp->ref_id !== $this->getId()) {
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
         $EOitems = $embedObj->getItems();
246 246
         //Current Obj Create
247 247
         foreach ($EOitems as $EOkey => $item) {
248
-            if (! is_null($obj)) {
248
+            if (!is_null($obj)) {
249 249
                 $is_ML = isML($item);
250 250
                 $is_MD = isMD($item);
251 251
                 $this->checkPropertyExistence($obj, $EOkey, $method, $model);
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
     private function processEmbedOnTargetCollection($modelTarget, $obj, $methodOnTarget, $modelOnTarget, bool $is_EO_target, bool $is_EM_target)
295 295
     {
296 296
         $modelToBeSync = $this->getModelTobeSync($modelTarget, $obj);
297
-        if (! is_null($modelToBeSync)) {
297
+        if (!is_null($modelToBeSync)) {
298 298
             $miniModel = $this->getEmbedModel($modelOnTarget);
299 299
             $modelToBeSync->updateRelationWithSync($miniModel, $methodOnTarget, $is_EO_target, $is_EM_target);
300 300
             //TODO:Sync target on level > 1
Please login to merge, or discard this patch.