@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | $is_embeds_has_to_be_updated = $request->has($key); |
| 64 | 64 | |
| 65 | - if (! is_null($value) && ! ($value == '') && ! ($value == '[]')) { |
|
| 65 | + if (!is_null($value) && !($value == '') && !($value == '[]')) { |
|
| 66 | 66 | $objs = json_decode($value); |
| 67 | 67 | } else { |
| 68 | 68 | $objs = getArrayWithEmptyObj($model, $is_EO, $is_EM); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | - if (! empty($objs)) { |
|
| 85 | + if (!empty($objs)) { |
|
| 86 | 86 | if ($is_EM) { |
| 87 | 87 | $this->tempEM = []; |
| 88 | 88 | } |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | if ($is_EM_target) { |
| 134 | 134 | $new_values = []; |
| 135 | 135 | throw_if( |
| 136 | - ! isset($this->$method_on_target), |
|
| 136 | + !isset($this->$method_on_target), |
|
| 137 | 137 | new Exception( |
| 138 | 138 | 'Error during target update. Remember to init the attribute '.$method_on_target. |
| 139 | 139 | ' on collection '.$this->getCollection() |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | { |
| 224 | 224 | if ($is_EO) { |
| 225 | 225 | $embedObj = $this->$method; |
| 226 | - if (! is_null($embedObj)) { |
|
| 226 | + if (!is_null($embedObj)) { |
|
| 227 | 227 | $target_id = $embedObj->ref_id; |
| 228 | 228 | $this->handleSubTarget($target_id, $modelTarget, $methodOnTarget, $is_EO_target, $is_EM_target); |
| 229 | 229 | } |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | if ($is_EM_target) { |
| 247 | 247 | $target = new $modelTarget; |
| 248 | 248 | $target = $target->all()->where('id', $target_id)->first(); |
| 249 | - if (! is_null($target)) { |
|
| 249 | + if (!is_null($target)) { |
|
| 250 | 250 | $new_values = []; |
| 251 | 251 | foreach ($target->$methodOnTarget as $temp) { |
| 252 | 252 | if ($temp->ref_id !== $this->getId()) { |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | $EOitems = $embedObj->getItems(); |
| 284 | 284 | //Current Obj Create |
| 285 | 285 | foreach ($EOitems as $EOkey => $item) { |
| 286 | - if (! is_null($obj)) { |
|
| 286 | + if (!is_null($obj)) { |
|
| 287 | 287 | $is_ML = isML($item); |
| 288 | 288 | $is_MD = isMD($item); |
| 289 | 289 | $this->checkPropertyExistence($obj, $EOkey, $method, $model); |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | private function processEmbedOnTargetCollection($modelTarget, $obj, $methodOnTarget, $modelOnTarget, bool $is_EO_target, bool $is_EM_target) |
| 334 | 334 | { |
| 335 | 335 | $modelToBeSync = $this->getModelTobeSync($modelTarget, $obj); |
| 336 | - if (! is_null($modelToBeSync)) { |
|
| 336 | + if (!is_null($modelToBeSync)) { |
|
| 337 | 337 | $miniModel = $this->getEmbedModel($modelOnTarget); |
| 338 | 338 | $modelToBeSync->updateRelationWithSync($miniModel, $methodOnTarget, $is_EO_target, $is_EM_target); |
| 339 | 339 | //TODO:Sync target on level > 1 |