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

Completed
Pull Request — master (#1997)
by Cristian
09:43
created
src/PanelTraits/Read.php 2 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      * Upload fields are the ones that have "upload" => true defined on them.
128 128
      *
129 129
      * @param  string   $form create/update/both - defaults to 'both'
130
-     * @param  bool|int $id   id of the entity - defaults to false
130
+     * @param  integer $id   id of the entity - defaults to false
131 131
      *
132 132
      * @return bool
133 133
      */
@@ -162,6 +162,7 @@  discard block
 block discarded – undo
162 162
 
163 163
     /**
164 164
      * Set the number of rows that should be show on the list view.
165
+     * @param integer $value
165 166
      */
166 167
     public function setDefaultPageLength($value)
167 168
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     {
39 39
         $id = $this->getCurrentEntryId();
40 40
 
41
-        if (! $id) {
41
+        if (!$id) {
42 42
             return false;
43 43
         }
44 44
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function getEntry($id)
56 56
     {
57
-        if (! $this->entry) {
57
+        if (!$this->entry) {
58 58
             $this->entry = $this->model->findOrFail($id);
59 59
             $this->entry = $this->entry->withFakes();
60 60
         }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     public function hasUploadFields($form, $id = false)
144 144
     {
145 145
         $fields = $this->getFields($form, $id);
146
-        $upload_fields = array_where($fields, function ($value, $key) {
146
+        $upload_fields = array_where($fields, function($value, $key) {
147 147
             return isset($value['upload']) && $value['upload'] == true;
148 148
         });
149 149
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
     {
244 244
         // If the default Page Length isn't in the menu's values, Add it the beginnin and resort all to show a croissant list.
245 245
         // assume both arrays are the same length.
246
-        if (! in_array($this->getDefaultPageLength(), $this->get('list.pageLengthMenu')[0])) {
246
+        if (!in_array($this->getDefaultPageLength(), $this->get('list.pageLengthMenu')[0])) {
247 247
             // Loop through 2 arrays of prop. page_length_menu
248 248
             foreach ($this->get('list.pageLengthMenu') as $key => &$page_length_choices) {
249 249
                 // This is a condition that should be always true.
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
     public function getPageLengthMenu()
275 275
     {
276 276
         // if already set, use that
277
-        if (! $this->get('list.pageLengthMenu')) {
277
+        if (!$this->get('list.pageLengthMenu')) {
278 278
             // try to get the menu settings from the config file
279 279
             $this->set('list.pageLengthMenu', config('backpack.crud.page_length_menu') ?? [[10, 25, 50, 100, -1], [10, 25, 50, 100, 'backpack::crud.all']]);
280 280
 
Please login to merge, or discard this patch.
tests/Unit/CrudPanel/CrudPanelTabsTest.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Backpack\CRUD\Tests\Unit\CrudPanel;
4 4
 
5
-use Illuminate\Support\Facades\DB;
6 5
 use Backpack\CRUD\Tests\Unit\Models\Article;
6
+use Illuminate\Support\Facades\DB;
7 7
 
8 8
 class CrudPanelTabsTest extends BaseDBCrudPanelTest
9 9
 {
Please login to merge, or discard this patch.
src/PanelTraits/Tabs.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function tabsDisabled()
37 37
     {
38
-        return ! $this->tabsEnabled;
38
+        return !$this->tabsEnabled;
39 39
     }
40 40
 
41 41
     public function setTabsType($type)
@@ -116,8 +116,8 @@  discard block
 block discarded – undo
116 116
     {
117 117
         $all_fields = $this->getCurrentFields();
118 118
 
119
-        $fields_without_a_tab = collect($all_fields)->filter(function ($value, $key) {
120
-            return ! isset($value['tab']);
119
+        $fields_without_a_tab = collect($all_fields)->filter(function($value, $key) {
120
+            return !isset($value['tab']);
121 121
         });
122 122
 
123 123
         return $fields_without_a_tab;
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         if ($this->tabExists($label)) {
134 134
             $all_fields = $this->getCurrentFields();
135 135
 
136
-            $fields_for_current_tab = collect($all_fields)->filter(function ($value, $key) use ($label) {
136
+            $fields_for_current_tab = collect($all_fields)->filter(function($value, $key) use ($label) {
137 137
                 return isset($value['tab']) && $value['tab'] == $label;
138 138
             });
139 139
 
@@ -152,11 +152,11 @@  discard block
 block discarded – undo
152 152
         $fields = $this->getCurrentFields();
153 153
 
154 154
         $fields_with_tabs = collect($fields)
155
-            ->filter(function ($value, $key) {
155
+            ->filter(function($value, $key) {
156 156
                 return isset($value['tab']);
157 157
             })
158
-            ->each(function ($value, $key) use (&$tabs) {
159
-                if (! in_array($value['tab'], $tabs)) {
158
+            ->each(function($value, $key) use (&$tabs) {
159
+                if (!in_array($value['tab'], $tabs)) {
160 160
                     $tabs[] = $value['tab'];
161 161
                 }
162 162
             });
Please login to merge, or discard this patch.
src/resources/views/fields/select2_nested.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 <div @include('crud::inc.field_wrapper_attributes') >
3 3
     <label>{!! $field['label'] !!}</label>
4 4
     @include('crud::inc.field_translatable_icon')
5
-    <?php $entity_model = $crud->getRelationModel($field['entity'],  - 1); ?>
5
+    <?php $entity_model = $crud->getRelationModel($field['entity'], - 1); ?>
6 6
     <select
7 7
         name="{{ $field['name'] }}"
8 8
         style="width: 100%"
Please login to merge, or discard this patch.
src/resources/views/fields/video.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 
6 6
 // if attribute casting is used, convert to JSON
7 7
 if (is_array($value)) {
8
-    $value = json_encode((object)$value);
8
+    $value = json_encode((object) $value);
9 9
 } elseif (is_object($value)) {
10 10
     $value = json_encode($value);
11 11
 } else {
Please login to merge, or discard this patch.
src/PanelTraits/Query.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
      * Order results of the query in a custom way.
63 63
      *
64 64
      * @param  array $column           Column array with all attributes
65
-     * @param  string $column_direction ASC or DESC
65
+     * @param  string $columnDirection ASC or DESC
66 66
      *
67 67
      * @return \Illuminate\Database\Eloquent\Builder
68 68
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
      */
69 69
     public function customOrderBy($column, $columnDirection = 'asc')
70 70
     {
71
-        if (! isset($column['orderLogic'])) {
71
+        if (!isset($column['orderLogic'])) {
72 72
             return $this->query;
73 73
         }
74 74
 
Please login to merge, or discard this patch.
src/app/Http/Controllers/Operations/ReorderOperation.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
         $this->crud->hasAccessOrFail('reorder');
17 17
         $this->crud->setOperation('reorder');
18 18
 
19
-        if (! $this->crud->isReorderEnabled()) {
19
+        if (!$this->crud->isReorderEnabled()) {
20 20
             abort(403, 'Reorder is disabled.');
21 21
         }
22 22
 
Please login to merge, or discard this patch.
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
     /**
10 10
      * Define which routes are needed for this operation.
11 11
      *
12
-     * @param  string $name       Name of the current entity (singular). Used as first URL segment.
13 12
      * @param  string $routeName    Prefix of the route name.
14 13
      * @param  string $controller Name of the current CrudController.
15 14
      */
Please login to merge, or discard this patch.
src/app/Http/Controllers/Operations/RevisionsOperation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         $this->crud->setOperation('revisions');
47 47
 
48 48
         $revisionId = \Request::input('revision_id', false);
49
-        if (! $revisionId) {
49
+        if (!$revisionId) {
50 50
             abort(500, 'Can\'t restore revision without revision_id');
51 51
         } else {
52 52
             $this->crud->restoreRevision($id, $revisionId); // do the update
Please login to merge, or discard this patch.
src/resources/views/columns/array_count.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 
6 6
 <span>
7 7
     <?php
8
-    $suffix = isset($column['suffix'])?$column['suffix']:'items';
8
+    $suffix = isset($column['suffix']) ? $column['suffix'] : 'items';
9 9
 
10 10
     // the value should be an array wether or not attribute casting is used
11 11
     if (!is_array($array)) {
Please login to merge, or discard this patch.