Skip to content

Commit

Permalink
CS fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dvlpp authored and github-actions[bot] committed Nov 8, 2024
1 parent 504b799 commit a208811
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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)
)
Expand Down

0 comments on commit a208811

Please sign in to comment.