We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | $itemKeys = $this->model->query()->select($primaryKey)->get()->pluck($primaryKey); |
27 | 27 | |
28 | 28 | // filter the items that are not in the database and map the request |
29 | - $reorderItems = collect($request)->filter(function ($item) use ($itemKeys) { |
|
29 | + $reorderItems = collect($request)->filter(function($item) use ($itemKeys) { |
|
30 | 30 | return $item['item_id'] !== '' && $item['item_id'] !== null && $itemKeys->contains($item['item_id']); |
31 | - })->map(function ($item) use ($primaryKey) { |
|
31 | + })->map(function($item) use ($primaryKey) { |
|
32 | 32 | $item[$primaryKey] = $item['item_id']; |
33 | 33 | $item['parent_id'] = empty($item['parent_id']) ? null : $item['parent_id']; |
34 | 34 | $item['depth'] = empty($item['depth']) ? null : (int) $item['depth']; |
@@ -42,12 +42,12 @@ discard block |
||
42 | 42 | |
43 | 43 | $sentIds = array_column($reorderItems, $primaryKey); |
44 | 44 | |
45 | - $itemKeys = $itemKeys->filter(function ($id) use ($sentIds) { |
|
45 | + $itemKeys = $itemKeys->filter(function($id) use ($sentIds) { |
|
46 | 46 | return in_array($id, $sentIds); |
47 | 47 | }); |
48 | 48 | |
49 | 49 | // wrap the queries in a transaction to avoid partial updates |
50 | - DB::connection($this->model->getConnectionName())->transaction(function () use ($reorderItems, $primaryKey, $itemKeys) { |
|
50 | + DB::connection($this->model->getConnectionName())->transaction(function() use ($reorderItems, $primaryKey, $itemKeys) { |
|
51 | 51 | // create a string of ?,?,?,? to use as bind placeholders for item keys |
52 | 52 | $reorderItemsBindString = implode(',', array_fill(0, count($reorderItems), '?')); |
53 | 53 |