From a20881190e60d346a3c353435e64b30767c1d68e Mon Sep 17 00:00:00 2001 From: dvlpp Date: Fri, 8 Nov 2024 12:51:55 +0000 Subject: [PATCH] CS fix --- .../Eloquent/Relationships/BelongsToManyRelationUpdater.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Form/Eloquent/Relationships/BelongsToManyRelationUpdater.php b/src/Form/Eloquent/Relationships/BelongsToManyRelationUpdater.php index 091d54b48..b11305dd9 100644 --- a/src/Form/Eloquent/Relationships/BelongsToManyRelationUpdater.php +++ b/src/Form/Eloquent/Relationships/BelongsToManyRelationUpdater.php @@ -12,7 +12,7 @@ public function update(object $instance, string $attribute, array $value, ?array $instance->$attribute()->sync( $collection ->map(function ($item) use ($instance, $attribute, $keyName) { - if (!is_null($item[$keyName])) { + if (! is_null($item[$keyName])) { return $item; } @@ -25,7 +25,7 @@ public function update(object $instance, string $attribute, array $value, ?array $sortConfiguration, fn ($collection) => $collection ->mapWithKeys(fn ($item, $k) => [ - $item[$keyName] => [$sortConfiguration['orderAttribute'] => ($k + 1)] + $item[$keyName] => [$sortConfiguration['orderAttribute'] => ($k + 1)], ]), fn ($collection) => $collection->pluck($keyName) )