We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -55,7 +55,7 @@ |
||
55 | 55 | */ |
56 | 56 | public function settings() |
57 | 57 | { |
58 | - return array_sort($this->settings, function ($value, $key) { |
|
58 | + return array_sort($this->settings, function($value, $key) { |
|
59 | 59 | return $key; |
60 | 60 | }); |
61 | 61 | } |
@@ -38,7 +38,7 @@ discard block |
||
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 |
||
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 | } |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | { |
204 | 204 | // If the default Page Length isn't in the menu's values, Add it the beginnin and resort all to show a croissant list. |
205 | 205 | // assume both arrays are the same length. |
206 | - if (! in_array($this->getDefaultPageLength(), $this->getOperationSetting('pageLengthMenu')[0])) { |
|
206 | + if (!in_array($this->getDefaultPageLength(), $this->getOperationSetting('pageLengthMenu')[0])) { |
|
207 | 207 | // Loop through 2 arrays of prop. pageLengthMenu |
208 | 208 | foreach ($this->getOperationSetting('pageLengthMenu') as $key => &$page_length_choices) { |
209 | 209 | // This is a condition that should be always true. |
@@ -33,11 +33,11 @@ discard block |
||
33 | 33 | |
34 | 34 | $saveOptions = collect($permissions) |
35 | 35 | // Restrict list to allowed actions. |
36 | - ->filter(function ($action, $permission) { |
|
36 | + ->filter(function($action, $permission) { |
|
37 | 37 | return $this->hasAccess($permission); |
38 | 38 | }) |
39 | 39 | // Generate list of possible actions. |
40 | - ->mapWithKeys(function ($action, $permission) { |
|
40 | + ->mapWithKeys(function($action, $permission) { |
|
41 | 41 | return [$action => $this->getSaveActionButtonName($action)]; |
42 | 42 | }) |
43 | 43 | ->all(); |
@@ -73,8 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | public function setSaveAction($forceSaveAction = null) |
75 | 75 | { |
76 | - $saveAction = $forceSaveAction ?: |
|
77 | - \Request::input('save_action', $this->getSaveActionDefaultForCurrentOperation()); |
|
76 | + $saveAction = $forceSaveAction ?: \Request::input('save_action', $this->getSaveActionDefaultForCurrentOperation()); |
|
78 | 77 | |
79 | 78 | $showBubble = $this->getOperationSetting('showSaveActionChange') ?? config('backpack.crud.operations.'.$this->getCurrentOperation().'.showSaveActionChange') ?? true; |
80 | 79 |
@@ -12,12 +12,12 @@ discard block |
||
12 | 12 | */ |
13 | 13 | public function setFromDb() |
14 | 14 | { |
15 | - if (! $this->driverIsMongoDb()) { |
|
15 | + if (!$this->driverIsMongoDb()) { |
|
16 | 16 | $this->setDoctrineTypesMapping(); |
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), |
@@ -29,11 +29,11 @@ discard block |
||
29 | 29 | 'autoset' => true, |
30 | 30 | ]; |
31 | 31 | |
32 | - if (! isset($this->fields()[$field])) { |
|
32 | + if (!isset($this->fields()[$field])) { |
|
33 | 33 | $this->addField($new_field); |
34 | 34 | } |
35 | 35 | |
36 | - if (! in_array($field, $this->model->getHidden()) && ! in_array($field, $this->columns())) { |
|
36 | + if (!in_array($field, $this->model->getHidden()) && !in_array($field, $this->columns())) { |
|
37 | 37 | $this->addColumn([ |
38 | 38 | 'name' => $field, |
39 | 39 | 'label' => $this->makeLabel($field), |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $types = ['enum' => 'string']; |
172 | 172 | $platform = $this->getSchema()->getConnection()->getDoctrineConnection()->getDatabasePlatform(); |
173 | 173 | foreach ($types as $type_key => $type_value) { |
174 | - if (! $platform->hasDoctrineTypeMappingFor($type_key)) { |
|
174 | + if (!$platform->hasDoctrineTypeMappingFor($type_key)) { |
|
175 | 175 | $platform->registerDoctrineTypeMapping($type_key, $type_value); |
176 | 176 | } |
177 | 177 | } |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | // Automatically-set columns should be both in the database, and in the $fillable variable on the Eloquent Model |
231 | 231 | $columns = $this->model->getConnection()->getSchemaBuilder()->getColumnListing($this->model->getTable()); |
232 | 232 | |
233 | - if (! empty($fillable)) { |
|
233 | + if (!empty($fillable)) { |
|
234 | 234 | $columns = array_intersect($columns, $fillable); |
235 | 235 | } |
236 | 236 | } |
@@ -29,11 +29,11 @@ |
||
29 | 29 | { |
30 | 30 | $this->crud->allowAccess('delete'); |
31 | 31 | |
32 | - $this->crud->operation('delete', function () { |
|
32 | + $this->crud->operation('delete', function() { |
|
33 | 33 | $this->crud->loadDefaultOperationSettingsFromConfig(); |
34 | 34 | }); |
35 | 35 | |
36 | - $this->crud->operation(['list', 'show'], function () { |
|
36 | + $this->crud->operation(['list', 'show'], function() { |
|
37 | 37 | $this->crud->addButton('line', 'delete', 'view', 'crud::buttons.delete', 'end'); |
38 | 38 | }); |
39 | 39 | } |
@@ -29,11 +29,11 @@ |
||
29 | 29 | { |
30 | 30 | $this->crud->allowAccess('clone'); |
31 | 31 | |
32 | - $this->crud->operation('clone', function () { |
|
32 | + $this->crud->operation('clone', function() { |
|
33 | 33 | $this->crud->loadDefaultOperationSettingsFromConfig(); |
34 | 34 | }); |
35 | 35 | |
36 | - $this->crud->operation(['list', 'show'], function () { |
|
36 | + $this->crud->operation(['list', 'show'], function() { |
|
37 | 37 | $this->crud->addButton('line', 'clone', 'view', 'crud::buttons.clone', 'end'); |
38 | 38 | }); |
39 | 39 | } |
@@ -30,11 +30,11 @@ |
||
30 | 30 | $this->crud->allowAccess('show'); |
31 | 31 | $this->crud->setOperationSetting('setFromDb', true); |
32 | 32 | |
33 | - $this->crud->operation('show', function () { |
|
33 | + $this->crud->operation('show', function() { |
|
34 | 34 | $this->crud->loadDefaultOperationSettingsFromConfig(); |
35 | 35 | }); |
36 | 36 | |
37 | - $this->crud->operation('list', function () { |
|
37 | + $this->crud->operation('list', function() { |
|
38 | 38 | $this->crud->addButton('line', 'show', 'view', 'crud::buttons.show', 'beginning'); |
39 | 39 | }); |
40 | 40 | } |
@@ -36,11 +36,11 @@ discard block |
||
36 | 36 | // allow access to the operation |
37 | 37 | $this->crud->allowAccess('revisions'); |
38 | 38 | |
39 | - $this->crud->operation('revisions', function () { |
|
39 | + $this->crud->operation('revisions', function() { |
|
40 | 40 | $this->crud->loadDefaultOperationSettingsFromConfig(); |
41 | 41 | }); |
42 | 42 | |
43 | - $this->crud->operation(['list', 'show'], function () { |
|
43 | + $this->crud->operation(['list', 'show'], function() { |
|
44 | 44 | // add a button in the line stack |
45 | 45 | $this->crud->addButton('line', 'revisions', 'view', 'crud::buttons.revisions', 'end'); |
46 | 46 | }); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $this->crud->hasAccessOrFail('revisions'); |
89 | 89 | |
90 | 90 | $revisionId = \Request::input('revision_id', false); |
91 | - if (! $revisionId) { |
|
91 | + if (!$revisionId) { |
|
92 | 92 | abort(500, 'Can\'t restore revision without revision_id'); |
93 | 93 | } else { |
94 | 94 | $this->crud->restoreRevision($id, $revisionId); // do the update |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | { |
42 | 42 | $this->crud->allowAccess('update'); |
43 | 43 | |
44 | - $this->crud->operation('update', function () { |
|
44 | + $this->crud->operation('update', function() { |
|
45 | 45 | $this->crud->loadDefaultOperationSettingsFromConfig(); |
46 | 46 | |
47 | 47 | if ($this->crud->getModel()->translationEnabled()) { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | } |
54 | 54 | }); |
55 | 55 | |
56 | - $this->crud->operation(['list', 'show'], function () { |
|
56 | + $this->crud->operation(['list', 'show'], function() { |
|
57 | 57 | $this->crud->addButton('line', 'update', 'view', 'crud::buttons.update', 'end'); |
58 | 58 | }); |
59 | 59 | } |