We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -389,10 +389,12 @@ |
||
389 | 389 | return $this->fallbackLogic($value); |
390 | 390 | } |
391 | 391 | |
392 | - public function else($value) |
|
392 | + public function else { |
|
393 | + ($value) |
|
393 | 394 | { |
394 | 395 | return $this->fallbackLogic($value); |
395 | 396 | } |
397 | + } |
|
396 | 398 | |
397 | 399 | // --------------- |
398 | 400 | // PRIVATE METHODS |
@@ -184,15 +184,15 @@ |
||
184 | 184 | $item[$related_model->getKeyName()] = $related_model->getKey(); |
185 | 185 | $return[] = $item; |
186 | 186 | break; |
187 | - case BelongsToMany::class: |
|
188 | - case MorphToMany::class: |
|
187 | + case BelongsToMany::class: |
|
188 | + case MorphToMany::class: |
|
189 | 189 | |
190 | - $item[$field['name']] = $related_model->getKey(); |
|
191 | - //for any given related model, we get the pivot fields. |
|
192 | - foreach ($pivot_fields as $pivot_field) { |
|
193 | - $item[$pivot_field['name']] = $related_model->pivot->{$pivot_field['name']}; |
|
194 | - } |
|
195 | - $return[] = $item; |
|
190 | + $item[$field['name']] = $related_model->getKey(); |
|
191 | + //for any given related model, we get the pivot fields. |
|
192 | + foreach ($pivot_fields as $pivot_field) { |
|
193 | + $item[$pivot_field['name']] = $related_model->pivot->{$pivot_field['name']}; |
|
194 | + } |
|
195 | + $return[] = $item; |
|
196 | 196 | } |
197 | 197 | } |
198 | 198 | // we return the json encoded result as expected by repeatable field. |
@@ -265,7 +265,7 @@ |
||
265 | 265 | $related = $relationField['model']::find($relatedId); |
266 | 266 | |
267 | 267 | $item->{$this->getOnlyRelationEntity($relationField)}()->associate($related); |
268 | - }else{ |
|
268 | + } else{ |
|
269 | 269 | $item->{$this->getOnlyRelationEntity($relationField)}()->dissociate(); |
270 | 270 | } |
271 | 271 | } |