Skip to content

Commit 8ed3104

Browse files
hans-thomasgithub-actions[bot]
authored andcommitted
apply phpcbf formatting
1 parent cb5778e commit 8ed3104

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Relations/MorphToMany.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
use Illuminate\Database\Eloquent\Model;
1010
use Illuminate\Database\Eloquent\Relations\MorphToMany as EloquentMorphToMany;
1111
use Illuminate\Support\Arr;
12-
1312
use MongoDB\BSON\ObjectId;
13+
1414
use function array_diff;
1515
use function array_key_exists;
1616
use function array_keys;
@@ -219,7 +219,7 @@ public function attach($id, array $attributes = [], $touch = true)
219219
$this->morphType => $model->getMorphClass(),
220220
],
221221
], true);
222-
}else{
222+
} else {
223223
$this->addIdToParentRelationData($id);
224224
}
225225

@@ -237,7 +237,7 @@ public function attach($id, array $attributes = [], $touch = true)
237237
// Attach the new ids to the parent model.
238238
if ($this->parent instanceof \MongoDB\Laravel\Eloquent\Model) {
239239
$this->parent->push($this->relatedPivotKey, (array) $id, true);
240-
}else{
240+
} else {
241241
$this->addIdToParentRelationData($id);
242242
}
243243
}
@@ -450,7 +450,6 @@ public function extractIds(array $data, ?string $relatedPivotKey = null)
450450
}, []);
451451
}
452452

453-
454453
/**
455454
* Add the given id to the relation's data of the current parent instance.
456455
* It helps to keep up-to-date the sql model instances in hybrid relationships.

0 commit comments

Comments
 (0)