@@ -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 | } |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | { |
| 185 | 185 | if ($is_EO) { |
| 186 | 186 | $embedObj = $this->$method; |
| 187 | - if (! is_null($embedObj)) { |
|
| 187 | + if (!is_null($embedObj)) { |
|
| 188 | 188 | $target_id = $embedObj->ref_id; |
| 189 | 189 | $this->handleSubTarget($target_id, $modelTarget, $methodOnTarget, $is_EO_target, $is_EM_target); |
| 190 | 190 | } |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | if ($is_EM_target) { |
| 208 | 208 | $target = new $modelTarget; |
| 209 | 209 | $target = $target->all()->where('id', $target_id)->first(); |
| 210 | - if (! is_null($target)) { |
|
| 210 | + if (!is_null($target)) { |
|
| 211 | 211 | $new_values = []; |
| 212 | 212 | foreach ($target->$methodOnTarget as $temp) { |
| 213 | 213 | if ($temp->ref_id !== $this->getId()) { |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | $EOitems = $embedObj->getItems(); |
| 242 | 242 | //Current Obj Create |
| 243 | 243 | foreach ($EOitems as $EOkey => $item) { |
| 244 | - if (! is_null($obj)) { |
|
| 244 | + if (!is_null($obj)) { |
|
| 245 | 245 | $is_ML = isML($item); |
| 246 | 246 | $is_MD = isMD($item); |
| 247 | 247 | $this->checkPropertyExistence($obj, $EOkey, $method, $model); |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | private function processEmbedOnTargetCollection($modelTarget, $obj, $methodOnTarget, $modelOnTarget, $is_EO_target, $is_EM_target) |
| 291 | 291 | { |
| 292 | 292 | $modelToBeSync = $this->getModelTobeSync($modelTarget, $obj); |
| 293 | - if (! is_null($modelToBeSync)) { |
|
| 293 | + if (!is_null($modelToBeSync)) { |
|
| 294 | 294 | $miniModel = $this->getEmbedModel($modelOnTarget); |
| 295 | 295 | $modelToBeSync->updateRelationWithSync($miniModel, $methodOnTarget, $is_EO_target, $is_EM_target); |
| 296 | 296 | //TODO:Sync target on level > 1 |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | */ |
| 120 | 120 | public function checkPropertyExistence($obj, string $EOkey, $method = '', $model = '') |
| 121 | 121 | { |
| 122 | - if (! property_exists($obj, $EOkey)) { |
|
| 122 | + if (!property_exists($obj, $EOkey)) { |
|
| 123 | 123 | $msg = 'Error - '.$EOkey.' attribute not found on obj '.json_encode($obj).' during save of model: '.$model.' and attribute: '.$method; |
| 124 | 124 | throw new Exception($msg); |
| 125 | 125 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | public function checkArrayExistence($arr, string $key) |
| 134 | 134 | { |
| 135 | - if (! Arr::has($arr, $key)) { |
|
| 135 | + if (!Arr::has($arr, $key)) { |
|
| 136 | 136 | $msg = ('Error - '.$key.' attribute not found on obj '.json_encode($arr)); |
| 137 | 137 | throw new Exception($msg); |
| 138 | 138 | } |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | */ |
| 146 | 146 | private function checkRequestExistence(Request $request, string $key) |
| 147 | 147 | { |
| 148 | - if (! $request->has($key)) { |
|
| 148 | + if (!$request->has($key)) { |
|
| 149 | 149 | $msg = ('Error - '.$key.' attribute not found in Request '.json_encode($request->all())); |
| 150 | 150 | throw new Exception($msg); |
| 151 | 151 | } |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | */ |
| 159 | 159 | public function getIsSkippable($request_has_key, $hasTarget = false) |
| 160 | 160 | { |
| 161 | - return ! $request_has_key && $this->getHasPartialRequest() && ! $hasTarget; |
|
| 161 | + return !$request_has_key && $this->getHasPartialRequest() && !$hasTarget; |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | /** |