@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | |
| 142 | 142 | $is_embeds_has_to_be_updated = $request->has($key); |
| 143 | 143 | |
| 144 | - if (! is_null($value) && ! ($value == '') && ! ($value == '[]')) { |
|
| 144 | + if (!is_null($value) && !($value == '') && !($value == '[]')) { |
|
| 145 | 145 | $objs = json_decode($value); |
| 146 | 146 | } else { |
| 147 | 147 | $objs = getArrayWithEmptyObj($model, $is_EO, $is_EM); |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | } |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | - if (! empty($objs)) { |
|
| 164 | + if (!empty($objs)) { |
|
| 165 | 165 | if ($is_EM) { |
| 166 | 166 | $this->tempEM = []; |
| 167 | 167 | } |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | { |
| 285 | 285 | if ($is_EO) { |
| 286 | 286 | $embedObj = $this->$method; |
| 287 | - if (! is_null($embedObj)) { |
|
| 287 | + if (!is_null($embedObj)) { |
|
| 288 | 288 | $target_id = $embedObj->ref_id; |
| 289 | 289 | $this->handleSubTarget($target_id, $modelTarget, $methodOnTarget, $is_EO_target, $is_EM_target); |
| 290 | 290 | } |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | if ($is_EM_target) { |
| 308 | 308 | $target = new $modelTarget; |
| 309 | 309 | $target = $target->all()->where('id', $target_id)->first(); |
| 310 | - if (! is_null($target)) { |
|
| 310 | + if (!is_null($target)) { |
|
| 311 | 311 | $new_values = []; |
| 312 | 312 | foreach ($target->$methodOnTarget as $temp) { |
| 313 | 313 | if ($temp->ref_id !== $this->getId()) { |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | */ |
| 383 | 383 | public function checkPropertyExistence($obj, string $EOkey, $method = '', $model = '') |
| 384 | 384 | { |
| 385 | - if (! property_exists($obj, $EOkey)) { |
|
| 385 | + if (!property_exists($obj, $EOkey)) { |
|
| 386 | 386 | $msg = 'Error - '.$EOkey.' attribute not found on obj '.json_encode($obj).' during save of model: '.$model.' and attribute: '.$method; |
| 387 | 387 | throw new Exception($msg); |
| 388 | 388 | } |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | */ |
| 396 | 396 | public function checkArrayExistence($arr, string $key) |
| 397 | 397 | { |
| 398 | - if (! Arr::has($arr, $key)) { |
|
| 398 | + if (!Arr::has($arr, $key)) { |
|
| 399 | 399 | $msg = ('Error - '.$key.' attribute not found on obj '.json_encode($arr)); |
| 400 | 400 | throw new Exception($msg); |
| 401 | 401 | } |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | */ |
| 409 | 409 | private function checkRequestExistence(Request $request, string $key) |
| 410 | 410 | { |
| 411 | - if (! $request->has($key)) { |
|
| 411 | + if (!$request->has($key)) { |
|
| 412 | 412 | $msg = ('Error - '.$key.' attribute not found in Request '.json_encode($request->all())); |
| 413 | 413 | throw new Exception($msg); |
| 414 | 414 | } |
@@ -421,7 +421,7 @@ discard block |
||
| 421 | 421 | */ |
| 422 | 422 | public function getIsSkippable($request_has_key, $hasTarget = false) |
| 423 | 423 | { |
| 424 | - return ! $request_has_key && $this->getHasPartialRequest() && ! $hasTarget; |
|
| 424 | + return !$request_has_key && $this->getHasPartialRequest() && !$hasTarget; |
|
| 425 | 425 | } |
| 426 | 426 | |
| 427 | 427 | /** |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | $EOitems = $embedObj->getItems(); |
| 462 | 462 | //Current Obj Create |
| 463 | 463 | foreach ($EOitems as $EOkey => $item) { |
| 464 | - if (! is_null($obj)) { |
|
| 464 | + if (!is_null($obj)) { |
|
| 465 | 465 | $is_ML = isML($item); |
| 466 | 466 | $is_MD = isMD($item); |
| 467 | 467 | $this->checkPropertyExistence($obj, $EOkey, $method, $model); |
@@ -510,7 +510,7 @@ discard block |
||
| 510 | 510 | private function processEmbedOnTargetCollection($modelTarget, $obj, $methodOnTarget, $modelOnTarget, $is_EO_target, $is_EM_target) |
| 511 | 511 | { |
| 512 | 512 | $modelToBeSync = $this->getModelTobeSync($modelTarget, $obj); |
| 513 | - if (! is_null($modelToBeSync)) { |
|
| 513 | + if (!is_null($modelToBeSync)) { |
|
| 514 | 514 | $miniModel = $this->getEmbedModel($modelOnTarget); |
| 515 | 515 | $modelToBeSync->updateRelationWithSync($miniModel, $methodOnTarget, $is_EO_target, $is_EM_target); |
| 516 | 516 | //TODO:Sync target on level > 1 |