We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | // sent in the request that are not in the database |
26 | 26 | $itemKeys = $this->model->query()->select($primaryKey)->get()->pluck($primaryKey); |
27 | 27 | |
28 | - $reorderItems = collect($request)->filter(function ($item) use ($itemKeys) { |
|
28 | + $reorderItems = collect($request)->filter(function($item) use ($itemKeys) { |
|
29 | 29 | return $item['item_id'] !== '' && $item['item_id'] !== null && $itemKeys->contains($item['item_id']); |
30 | - })->map(function ($item) use ($primaryKey) { |
|
30 | + })->map(function($item) use ($primaryKey) { |
|
31 | 31 | $item[$primaryKey] = (int) $item['item_id']; |
32 | 32 | $item['parent_id'] = empty($item['parent_id']) ? null : (int) $item['parent_id']; |
33 | 33 | $item['depth'] = empty($item['depth']) ? null : (int) $item['depth']; |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | return $item; |
40 | 40 | })->toArray(); |
41 | 41 | |
42 | - DB::transaction(function () use ($reorderItems, $primaryKey, $itemKeys) { |
|
42 | + DB::transaction(function() use ($reorderItems, $primaryKey, $itemKeys) { |
|
43 | 43 | $reorderItemsBindString = implode(',', array_fill(0, count($reorderItems), '?')); |
44 | - foreach(['parent_id', 'depth', 'lft', 'rgt'] as $column) { |
|
44 | + foreach (['parent_id', 'depth', 'lft', 'rgt'] as $column) { |
|
45 | 45 | $query = ''; |
46 | 46 | $bindings = []; |
47 | 47 | $query .= "UPDATE {$this->model->getTable()} SET {$column} = CASE "; |