@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | $is_embeds_has_to_be_updated = $request->has($key); |
63 | 63 | |
64 | - if (! is_null($value) && ! ($value == '') && ! ($value == '[]')) { |
|
64 | + if (!is_null($value) && !($value == '') && !($value == '[]')) { |
|
65 | 65 | $objs = json_decode($value); |
66 | 66 | } else { |
67 | 67 | $objs = getArrayWithEmptyObj($model, $is_EO, $is_EM); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | } |
82 | 82 | } |
83 | 83 | |
84 | - if (! empty($objs)) { |
|
84 | + if (!empty($objs)) { |
|
85 | 85 | if ($is_EM) { |
86 | 86 | $this->tempEM = []; |
87 | 87 | } |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | if ($is_EM_target) { |
133 | 133 | $new_values = []; |
134 | 134 | throw_if( |
135 | - ! isset($this->$method_on_target), |
|
135 | + !isset($this->$method_on_target), |
|
136 | 136 | new Exception( |
137 | 137 | 'Error during target update. Remember to init the attribute '.$method_on_target. |
138 | 138 | ' on collection '.$this->getCollection() |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | 'EmbedsMany relationship on model '.get_class($this) |
147 | 147 | ) |
148 | 148 | ); |
149 | - if (! is_null($temp)) { |
|
149 | + if (!is_null($temp)) { |
|
150 | 150 | $new_values[] = $temp->attributes; |
151 | 151 | } |
152 | 152 | } |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | { |
212 | 212 | if ($is_EO) { |
213 | 213 | $embedObj = $this->$method; |
214 | - if (! is_null($embedObj)) { |
|
214 | + if (!is_null($embedObj)) { |
|
215 | 215 | $target_id = $embedObj->ref_id; |
216 | 216 | $this->handleSubTarget($target_id, $modelTarget, $methodOnTarget, $is_EO_target, $is_EM_target); |
217 | 217 | } |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | if ($is_EM_target) { |
235 | 235 | $target = new $modelTarget; |
236 | 236 | $target = $target->all()->where('id', $target_id)->first(); |
237 | - if (! is_null($target)) { |
|
237 | + if (!is_null($target)) { |
|
238 | 238 | $new_values = []; |
239 | 239 | foreach ($target->$methodOnTarget as $temp) { |
240 | 240 | if ($temp->ref_id !== $this->getId()) { |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | $EOitems = $embedObj->getItems(); |
272 | 272 | //Current Obj Create |
273 | 273 | foreach ($EOitems as $EOkey => $item) { |
274 | - if (! is_null($obj)) { |
|
274 | + if (!is_null($obj)) { |
|
275 | 275 | $is_ML = isML($item); |
276 | 276 | $is_MD = isMD($item); |
277 | 277 | $this->checkPropertyExistence($obj, $EOkey, $method, $model); |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | private function processEmbedOnTargetCollection($modelTarget, $obj, $methodOnTarget, $modelOnTarget, bool $is_EO_target, bool $is_EM_target) |
322 | 322 | { |
323 | 323 | $modelToBeSync = $this->getModelTobeSync($modelTarget, $obj); |
324 | - if (! is_null($modelToBeSync)) { |
|
324 | + if (!is_null($modelToBeSync)) { |
|
325 | 325 | $miniModel = $this->getEmbedModel($modelOnTarget); |
326 | 326 | $modelToBeSync->updateRelationWithSync($miniModel, $methodOnTarget, $is_EO_target, $is_EM_target); |
327 | 327 | //TODO:Sync target on level > 1 |