We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| @@ 65-71 (lines=7) @@ | ||
| 62 | $model = new static(); |
|
| 63 | ||
| 64 | // do the actual saving |
|
| 65 | foreach ($attributes as $attribute => $value) { |
|
| 66 | if ($model->isTranslatableAttribute($attribute)) { // the attribute is translatable |
|
| 67 | $model->setTranslation($attribute, $locale, $value); |
|
| 68 | } else { // the attribute is NOT translatable |
|
| 69 | $non_translatable[$attribute] = $value; |
|
| 70 | } |
|
| 71 | } |
|
| 72 | $model->fill($non_translatable)->save(); |
|
| 73 | ||
| 74 | return $model; |
|
| @@ 95-101 (lines=7) @@ | ||
| 92 | $non_translatable = []; |
|
| 93 | ||
| 94 | // do the actual saving |
|
| 95 | foreach ($attributes as $attribute => $value) { |
|
| 96 | if ($this->isTranslatableAttribute($attribute)) { // the attribute is translatable |
|
| 97 | $this->setTranslation($attribute, $locale, $value); |
|
| 98 | } else { // the attribute is NOT translatable |
|
| 99 | $non_translatable[$attribute] = $value; |
|
| 100 | } |
|
| 101 | } |
|
| 102 | ||
| 103 | return $this->fill($non_translatable)->save($options); |
|
| 104 | } |
|