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
Branch removed-laravel-5-support (d11742)
by Cristian
08:06
created
src/app/Http/Controllers/Operations/ListOperation.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     {
42 42
         $this->crud->allowAccess('list');
43 43
 
44
-        $this->crud->operation('list', function () {
44
+        $this->crud->operation('list', function() {
45 45
             $this->crud->loadDefaultOperationSettingsFromConfig();
46 46
         });
47 47
     }
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
         // if there was an order set, this will be the last one (after all others were applied)
113 113
         $orderBy = $this->crud->query->getQuery()->orders;
114 114
         $hasOrderByPrimaryKey = false;
115
-        collect($orderBy)->each(function ($item, $key) use ($hasOrderByPrimaryKey) {
116
-            if (! isset($item['column'])) {
115
+        collect($orderBy)->each(function($item, $key) use ($hasOrderByPrimaryKey) {
116
+            if (!isset($item['column'])) {
117 117
                 return false;
118 118
             }
119 119
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                 return false;
124 124
             }
125 125
         });
126
-        if (! $hasOrderByPrimaryKey) {
126
+        if (!$hasOrderByPrimaryKey) {
127 127
             $this->crud->query->orderByDesc($this->crud->model->getKeyName());
128 128
         }
129 129
 
Please login to merge, or discard this patch.
tests/Unit/Http/CrudControllerTest.php 2 patches
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\Http;
4 4
 
5
-use Backpack\CRUD\app\Library\CrudPanel\CrudPanel;
6 5
 use Backpack\CRUD\Tests\BaseTest;
6
+use Backpack\CRUD\app\Library\CrudPanel\CrudPanel;
7 7
 
8 8
 class CrudControllerTest extends BaseTest
9 9
 {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         $app['router']->get('users/{id}/edit', "$controller@edit");
22 22
         $app['router']->put('users/{id}', "$controller@update");
23 23
 
24
-        $app->singleton('crud', function ($app) {
24
+        $app->singleton('crud', function($app) {
25 25
             return new CrudPanel($app);
26 26
         });
27 27
     }
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Columns.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     /**
142 142
      * Move the most recently added column after the given target column.
143 143
      *
144
-     * @param string|array $targetColumn The target column name or array.
144
+     * @param string $targetColumn The target column name or array.
145 145
      */
146 146
     public function afterColumn($targetColumn)
147 147
     {
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
     /**
162 162
      * Move this column to be first in the columns list.
163 163
      *
164
-     * @return bool|null
164
+     * @return false|null
165 165
      */
166 166
     public function makeFirstColumn()
167 167
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     public function makeFirstColumn()
114 114
     {
115
-        if (! $this->columns()) {
115
+        if (!$this->columns()) {
116 116
             return false;
117 117
         }
118 118
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      */
158 158
     public function removeColumns($columns)
159 159
     {
160
-        if (! empty($columns)) {
160
+        if (!empty($columns)) {
161 161
             foreach ($columns as $columnKey) {
162 162
                 $this->removeColumn($columnKey);
163 163
             }
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
     {
237 237
         $columns = $this->columns();
238 238
 
239
-        return collect($columns)->pluck('entity')->reject(function ($value, $key) {
239
+        return collect($columns)->pluck('entity')->reject(function($value, $key) {
240 240
             return $value == null;
241 241
         })->toArray();
242 242
     }
Please login to merge, or discard this patch.
src/app/Console/Commands/Install.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     /**
31 31
      * Execute the console command.
32 32
      *
33
-     * @return mixed Command-line output
33
+     * @return false|null Command-line output
34 34
      */
35 35
     public function handle()
36 36
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                     $createUploadDirectoryCommand = ['mkdir', '-p', 'public/uploads'];
95 95
                     break;
96 96
                 case '\\': // windows
97
-                    if (! file_exists('public\uploads')) {
97
+                    if (!file_exists('public\uploads')) {
98 98
                         $createUploadDirectoryCommand = ['mkdir', 'public\uploads'];
99 99
                     }
100 100
                     break;
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         $command = is_string($command) ? explode(' ', $command) : $command;
148 148
 
149 149
         $process = new Process($command, null, null, null, $this->option('timeout'));
150
-        $process->run(function ($type, $buffer) {
150
+        $process->run(function($type, $buffer) {
151 151
             if (Process::ERR === $type) {
152 152
                 $this->echo('comment', $buffer);
153 153
             } else {
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         });
157 157
 
158 158
         // executes after the command finishes
159
-        if (! $process->isSuccessful()) {
159
+        if (!$process->isSuccessful()) {
160 160
             throw new ProcessFailedException($process);
161 161
         }
162 162
 
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Fields.php 2 patches
Doc Comments   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -326,8 +326,6 @@  discard block
 block discarded – undo
326 326
      * Check if the create/update form has upload fields.
327 327
      * Upload fields are the ones that have "upload" => true defined on them.
328 328
      *
329
-     * @param string   $form create/update/both - defaults to 'both'
330
-     * @param bool|int $id   id of the entity - defaults to false
331 329
      *
332 330
      * @return bool
333 331
      */
@@ -358,7 +356,7 @@  discard block
 block discarded – undo
358 356
     /**
359 357
      * Set an array of field type names as already loaded for the current operation.
360 358
      *
361
-     * @param array $fieldTypes
359
+     * @param string[] $fieldTypes
362 360
      */
363 361
     public function setLoadedFieldTypes($fieldTypes)
364 362
     {
@@ -369,7 +367,7 @@  discard block
 block discarded – undo
369 367
      * Get a namespaced version of the field type name.
370 368
      * Appends the 'view_namespace' attribute of the field to the `type', using dot notation.
371 369
      *
372
-     * @param  mixed $field
370
+     * @param  string $field
373 371
      * @return string Namespaced version of the field type name. Ex: 'text', 'custom.view.path.text'
374 372
      */
375 373
     public function getFieldTypeWithNamespace($field)
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function afterField($targetFieldName)
63 63
     {
64
-        $this->transformFields(function ($fields) use ($targetFieldName) {
64
+        $this->transformFields(function($fields) use ($targetFieldName) {
65 65
             return $this->moveField($fields, $targetFieldName, false);
66 66
         });
67 67
     }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function beforeField($targetFieldName)
75 75
     {
76
-        $this->transformFields(function ($fields) use ($targetFieldName) {
76
+        $this->transformFields(function($fields) use ($targetFieldName) {
77 77
             return $this->moveField($fields, $targetFieldName, true);
78 78
         });
79 79
     }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function removeField($name)
87 87
     {
88
-        $this->transformFields(function ($fields) use ($name) {
88
+        $this->transformFields(function($fields) use ($name) {
89 89
             Arr::forget($fields, $name);
90 90
 
91 91
             return $fields;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public function removeFields($array_of_names)
101 101
     {
102
-        if (! empty($array_of_names)) {
102
+        if (!empty($array_of_names)) {
103 103
             foreach ($array_of_names as $name) {
104 104
                 $this->removeField($name);
105 105
             }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     public function removeAllFields()
113 113
     {
114 114
         $current_fields = $this->getCurrentFields();
115
-        if (! empty($current_fields)) {
115
+        if (!empty($current_fields)) {
116 116
             foreach ($current_fields as $field) {
117 117
                 $this->removeField($field['name']);
118 118
             }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
                 $jsonCastables = ['array', 'object', 'json'];
187 187
                 $fieldCasting = $casted_attributes[$field['name']];
188 188
 
189
-                if (in_array($fieldCasting, $jsonCastables) && isset($data[$field['name']]) && ! empty($data[$field['name']]) && ! is_array($data[$field['name']])) {
189
+                if (in_array($fieldCasting, $jsonCastables) && isset($data[$field['name']]) && !empty($data[$field['name']]) && !is_array($data[$field['name']])) {
190 190
                     try {
191 191
                         $data[$field['name']] = json_decode($data[$field['name']]);
192 192
                     } catch (\Exception $e) {
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
      */
216 216
     public function orderFields($order)
217 217
     {
218
-        $this->transformFields(function ($fields) use ($order) {
218
+        $this->transformFields(function($fields) use ($order) {
219 219
             return $this->applyOrderToFields($fields, $order);
220 220
         });
221 221
     }
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
     public function hasUploadFields()
243 243
     {
244 244
         $fields = $this->getFields();
245
-        $upload_fields = Arr::where($fields, function ($value, $key) {
245
+        $upload_fields = Arr::where($fields, function($value, $key) {
246 246
             return isset($value['upload']) && $value['upload'] == true;
247 247
         });
248 248
 
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
         $alreadyLoaded = $this->getLoadedFieldTypes();
306 306
         $type = $this->getFieldTypeWithNamespace($field);
307 307
 
308
-        if (! in_array($type, $this->getLoadedFieldTypes(), true)) {
308
+        if (!in_array($type, $this->getLoadedFieldTypes(), true)) {
309 309
             $alreadyLoaded[] = $type;
310 310
             $this->setLoadedFieldTypes($alreadyLoaded);
311 311
 
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
      */
347 347
     public function fieldTypeNotLoaded($field)
348 348
     {
349
-        return ! in_array($this->getFieldTypeWithNamespace($field), $this->getLoadedFieldTypes());
349
+        return !in_array($this->getFieldTypeWithNamespace($field), $this->getLoadedFieldTypes());
350 350
     }
351 351
 
352 352
     /**
Please login to merge, or discard this patch.
src/app/Http/Controllers/Auth/LoginController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
      *
68 68
      * @param \Illuminate\Http\Request $request
69 69
      *
70
-     * @return mixed
70
+     * @return \Illuminate\Http\RedirectResponse
71 71
      */
72 72
     protected function loggedOut(Request $request)
73 73
     {
Please login to merge, or discard this patch.
src/routes/backpack/custom.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,5 +13,5 @@
 block discarded – undo
13 13
         config('backpack.base.middleware_key', 'admin'),
14 14
     ],
15 15
     'namespace'  => 'App\Http\Controllers\Admin',
16
-], function () { // custom admin routes
16
+], function() { // custom admin routes
17 17
 }); // this should be the absolute last line of this file
Please login to merge, or discard this patch.
src/routes/backpack/base.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     'middleware' => config('backpack.base.web_middleware', 'web'),
17 17
     'prefix'     => config('backpack.base.route_prefix'),
18 18
 ],
19
-function () {
19
+function() {
20 20
     // if not otherwise configured, setup the auth routes
21 21
     if (config('backpack.base.setup_auth_routes')) {
22 22
         // Authentication Routes...
Please login to merge, or discard this patch.
src/app/Http/Controllers/Operations/CreateOperation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,12 +41,12 @@
 block discarded – undo
41 41
     {
42 42
         $this->crud->allowAccess('create');
43 43
 
44
-        $this->crud->operation('create', function () {
44
+        $this->crud->operation('create', function() {
45 45
             $this->crud->loadDefaultOperationSettingsFromConfig();
46 46
             $this->crud->setupDefaultSaveActions();
47 47
         });
48 48
 
49
-        $this->crud->operation('list', function () {
49
+        $this->crud->operation('list', function() {
50 50
             $this->crud->addButton('top', 'create', 'view', 'crud::buttons.create');
51 51
         });
52 52
     }
Please login to merge, or discard this patch.