Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Test Failed
Push — allow-customization-of-reorder... ( 60c105 )
by Pedro
30:53
created
src/app/Http/Controllers/Operations/ReorderOperation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         $this->crud->set('reorder.enabled', true);
37 37
         $this->crud->allowAccess('reorder');
38 38
 
39
-        $this->crud->operation('reorder', function () {
39
+        $this->crud->operation('reorder', function() {
40 40
             $this->crud->loadDefaultOperationSettingsFromConfig();
41 41
             $this->crud->setOperationSetting('reorderColumnNames', [
42 42
                 'parent_id' => 'parent_id',
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             ]);
47 47
         });
48 48
 
49
-        $this->crud->operation('list', function () {
49
+        $this->crud->operation('list', function() {
50 50
             $this->crud->addButton('top', 'reorder', 'view', 'crud::buttons.reorder');
51 51
         });
52 52
     }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         $this->crud->hasAccessOrFail('reorder');
64 64
 
65
-        if (! $this->crud->isReorderEnabled()) {
65
+        if (!$this->crud->isReorderEnabled()) {
66 66
             abort(403, 'Reorder is disabled.');
67 67
         }
68 68
 
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Reorder.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
         $itemKeys = $this->model->query()->select($primaryKey)->get()->pluck($primaryKey);
29 29
 
30 30
         // filter the items that are not in the database and map the request
31
-        $reorderItems = collect($request)->filter(function ($item) use ($itemKeys) {
31
+        $reorderItems = collect($request)->filter(function($item) use ($itemKeys) {
32 32
             return $item['item_id'] !== '' && $item['item_id'] !== null && $itemKeys->contains($item['item_id']);
33
-        })->map(function ($item) use ($primaryKey, $columns) {
33
+        })->map(function($item) use ($primaryKey, $columns) {
34 34
             $item[$primaryKey] = $item['item_id'];
35 35
             $item[$columns['parent_id']] = empty($item['parent_id']) ? null : $item['parent_id'];
36 36
             $item[$columns['depth']] = empty($item['depth']) ? null : (int) $item['depth'];
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
             $item[$columns['rgt']] = empty($item['right']) ? null : (int) $item['right'];
39 39
             
40 40
             // unset mapped items properties.
41
-            if($columns['parent_id'] !== 'parent_id') { unset($item['parent_id']); };
42
-            if($columns['depth'] !== 'depth') { unset($item['depth']); }
43
-            if($columns['lft'] !== 'left') { unset($item['left']); }
44
-            if($columns['rgt'] !== 'right') { unset($item['right']); }
41
+            if ($columns['parent_id'] !== 'parent_id') { unset($item['parent_id']); };
42
+            if ($columns['depth'] !== 'depth') { unset($item['depth']); }
43
+            if ($columns['lft'] !== 'left') { unset($item['left']); }
44
+            if ($columns['rgt'] !== 'right') { unset($item['right']); }
45 45
             
46 46
             // unset the item_id property
47 47
             unset($item['item_id']);
@@ -51,12 +51,12 @@  discard block
 block discarded – undo
51 51
 
52 52
         $sentIds = array_column($reorderItems, $primaryKey);
53 53
 
54
-        $itemKeys = $itemKeys->filter(function ($id) use ($sentIds) {
54
+        $itemKeys = $itemKeys->filter(function($id) use ($sentIds) {
55 55
             return in_array($id, $sentIds);
56 56
         });
57 57
 
58 58
         // wrap the queries in a transaction to avoid partial updates
59
-        DB::connection($this->model->getConnectionName())->transaction(function () use ($reorderItems, $primaryKey, $itemKeys, $columns) {
59
+        DB::connection($this->model->getConnectionName())->transaction(function() use ($reorderItems, $primaryKey, $itemKeys, $columns) {
60 60
             // create a string of ?,?,?,? to use as bind placeholders for item keys
61 61
             $reorderItemsBindString = implode(',', array_fill(0, count($reorderItems), '?'));
62 62
 
Please login to merge, or discard this patch.