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 (#1935)
by Cristian
04:14 queued 02:00
created
src/app/Library/CrudPanel/Traits/Tabs.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     {
115 115
         $all_fields = $this->getCurrentFields();
116 116
 
117
-        $fields_without_a_tab = collect($all_fields)->filter(function ($value, $key) {
117
+        $fields_without_a_tab = collect($all_fields)->filter(function($value, $key) {
118 118
             return !isset($value['tab']);
119 119
         });
120 120
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         if ($this->tabExists($label)) {
132 132
             $all_fields = $this->getCurrentFields();
133 133
 
134
-            $fields_for_current_tab = collect($all_fields)->filter(function ($value, $key) use ($label) {
134
+            $fields_for_current_tab = collect($all_fields)->filter(function($value, $key) use ($label) {
135 135
                 return isset($value['tab']) && $value['tab'] == $label;
136 136
             });
137 137
 
@@ -150,10 +150,10 @@  discard block
 block discarded – undo
150 150
         $fields = $this->getCurrentFields();
151 151
 
152 152
         $fields_with_tabs = collect($fields)
153
-            ->filter(function ($value, $key) {
153
+            ->filter(function($value, $key) {
154 154
                 return isset($value['tab']);
155 155
             })
156
-            ->each(function ($value, $key) use (&$tabs) {
156
+            ->each(function($value, $key) use (&$tabs) {
157 157
                 if (!in_array($value['tab'], $tabs)) {
158 158
                     $tabs[] = $value['tab'];
159 159
                 }
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Fields.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function afterField($targetFieldName)
91 91
     {
92
-        $this->transformFields(function ($fields) use ($targetFieldName) {
92
+        $this->transformFields(function($fields) use ($targetFieldName) {
93 93
             return $this->moveField($fields, $targetFieldName, false);
94 94
         });
95 95
     }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function beforeField($targetFieldName)
104 104
     {
105
-        $this->transformFields(function ($fields) use ($targetFieldName) {
105
+        $this->transformFields(function($fields) use ($targetFieldName) {
106 106
             return $this->moveField($fields, $targetFieldName, true);
107 107
         });
108 108
     }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function removeField($name)
147 147
     {
148
-        $this->transformFields(function ($fields) use ($name) {
148
+        $this->transformFields(function($fields) use ($name) {
149 149
             array_forget($fields, $name);
150 150
 
151 151
             return $fields;
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
      */
276 276
     public function orderFields($order)
277 277
     {
278
-        $this->transformFields(function ($fields) use ($order) {
278
+        $this->transformFields(function($fields) use ($order) {
279 279
             return $this->applyOrderToFields($fields, $order);
280 280
         });
281 281
     }
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
     public function hasUploadFields()
339 339
     {
340 340
         $fields = $this->getFields();
341
-        $upload_fields = array_where($fields, function ($value, $key) {
341
+        $upload_fields = array_where($fields, function($value, $key) {
342 342
             return isset($value['upload']) && $value['upload'] == true;
343 343
         });
344 344
 
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Filters.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@
 block discarded – undo
216 216
 
217 217
     public function removeFilter($name)
218 218
     {
219
-        $strippedFiltersCollection = $this->filters()->reject(function ($filter) use ($name) {
219
+        $strippedFiltersCollection = $this->filters()->reject(function($filter) use ($name) {
220 220
             return $filter->name == $name;
221 221
         });
222 222
 
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Search.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function applySearchTerm($searchTerm)
24 24
     {
25
-        return $this->query->where(function ($query) use ($searchTerm) {
25
+        return $this->query->where(function($query) use ($searchTerm) {
26 26
             foreach ($this->columns() as $column) {
27 27
                 if (!isset($column['type'])) {
28 28
                     abort(400, 'Missing column type when trying to apply search term.');
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
                 case 'select':
84 84
                 case 'select_multiple':
85
-                    $query->orWhereHas($column['entity'], function ($q) use ($column, $searchTerm) {
85
+                    $query->orWhereHas($column['entity'], function($q) use ($column, $searchTerm) {
86 86
                         $q->where($column['attribute'], 'like', '%'.$searchTerm.'%');
87 87
                     });
88 88
                     break;
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Update.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
     {
87 87
         if (isset($field['entity'])) {
88 88
             $relationArray = explode('.', $field['entity']);
89
-            $relatedModel = array_reduce(array_splice($relationArray, 0, -1), function ($obj, $method) {
89
+            $relatedModel = array_reduce(array_splice($relationArray, 0, -1), function($obj, $method) {
90 90
                 return $obj->{$method} ? $obj->{$method} : $obj;
91 91
             }, $model);
92 92
 
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Columns.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -187,8 +187,7 @@  discard block
 block discarded – undo
187 187
         $columnsArray = $this->columns();
188 188
 
189 189
         if (array_key_exists($targetColumnName, $columnsArray)) {
190
-            $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) :
191
-                array_search($targetColumnName, array_keys($columnsArray)) + 1;
190
+            $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) : array_search($targetColumnName, array_keys($columnsArray)) + 1;
192 191
 
193 192
             $element = array_pop($columnsArray);
194 193
             $beginningPart = array_slice($columnsArray, 0, $targetColumnPosition, true);
@@ -334,7 +333,7 @@  discard block
 block discarded – undo
334 333
     {
335 334
         $columns = $this->columns();
336 335
 
337
-        return collect($columns)->pluck('entity')->reject(function ($value, $key) {
336
+        return collect($columns)->pluck('entity')->reject(function($value, $key) {
338 337
             return $value == null;
339 338
         })->toArray();
340 339
     }
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
     {
82 82
         $all_relation_fields = $this->getRelationFields();
83 83
 
84
-        return array_where($all_relation_fields, function ($value, $key) {
84
+        return array_where($all_relation_fields, function($value, $key) {
85 85
             return isset($value['pivot']) && $value['pivot'];
86 86
         });
87 87
     }
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/AutoSet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
             $this->getDbColumnTypes();
18 18
         }
19 19
 
20
-        array_map(function ($field) {
20
+        array_map(function($field) {
21 21
             $new_field = [
22 22
                 'name'       => $field,
23 23
                 'label'      => $this->makeLabel($field),
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/CrudPanel.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
      */
245 245
     public function getFirstOfItsTypeInArray($type, $array)
246 246
     {
247
-        return array_first($array, function ($item) use ($type) {
247
+        return array_first($array, function($item) use ($type) {
248 248
             return $item['type'] == $type;
249 249
         });
250 250
     }
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
     public function sync($type, $fields, $attributes)
263 263
     {
264 264
         if (!empty($this->{$type})) {
265
-            $this->{$type} = array_map(function ($field) use ($fields, $attributes) {
265
+            $this->{$type} = array_map(function($field) use ($fields, $attributes) {
266 266
                 if (in_array($field['name'], (array) $fields)) {
267 267
                     $field = array_merge($field, $attributes);
268 268
                 }
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
             $model = $this->model;
302 302
         }
303 303
 
304
-        $result = array_reduce(array_splice($relationArray, 0, $length), function ($obj, $method) {
304
+        $result = array_reduce(array_splice($relationArray, 0, $length), function($obj, $method) {
305 305
             return $obj->$method()->getRelated();
306 306
         }, $model);
307 307
 
Please login to merge, or discard this patch.