We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -35,6 +35,9 @@ |
||
35 | 35 | return ! $this->tabsEnabled(); |
36 | 36 | } |
37 | 37 | |
38 | + /** |
|
39 | + * @param string $type |
|
40 | + */ |
|
38 | 41 | public function setTabsType($type) |
39 | 42 | { |
40 | 43 | $this->enableTabs(); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | */ |
33 | 33 | public function tabsDisabled() |
34 | 34 | { |
35 | - return ! $this->tabsEnabled(); |
|
35 | + return !$this->tabsEnabled(); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | public function setTabsType($type) |
@@ -114,8 +114,8 @@ discard block |
||
114 | 114 | { |
115 | 115 | $all_fields = $this->getCurrentFields(); |
116 | 116 | |
117 | - $fields_without_a_tab = collect($all_fields)->filter(function ($value, $key) { |
|
118 | - return ! isset($value['tab']); |
|
117 | + $fields_without_a_tab = collect($all_fields)->filter(function($value, $key) { |
|
118 | + return !isset($value['tab']); |
|
119 | 119 | }); |
120 | 120 | |
121 | 121 | return $fields_without_a_tab; |
@@ -131,7 +131,7 @@ discard block |
||
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,11 +150,11 @@ discard block |
||
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) { |
|
157 | - if (! in_array($value['tab'], $tabs)) { |
|
156 | + ->each(function($value, $key) use (&$tabs) { |
|
157 | + if (!in_array($value['tab'], $tabs)) { |
|
158 | 158 | $tabs[] = $value['tab']; |
159 | 159 | } |
160 | 160 | }); |
@@ -2,8 +2,8 @@ |
||
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 CrudPanelFakeFieldsTest extends BaseDBCrudPanelTest |
9 | 9 | { |
@@ -82,7 +82,7 @@ |
||
82 | 82 | $this->crud->applyConfigurationFromSettings('revisions'); |
83 | 83 | |
84 | 84 | $revisionId = \Request::input('revision_id', false); |
85 | - if (! $revisionId) { |
|
85 | + if (!$revisionId) { |
|
86 | 86 | abort(500, 'Can\'t restore revision without revision_id'); |
87 | 87 | } else { |
88 | 88 | $this->crud->restoreRevision($id, $revisionId); // do the update |
@@ -29,7 +29,7 @@ |
||
29 | 29 | { |
30 | 30 | $this->crud->allowAccess('bulkDelete'); |
31 | 31 | |
32 | - $this->crud->operation('list', function () { |
|
32 | + $this->crud->operation('list', function() { |
|
33 | 33 | $this->crud->enableBulkActions(); |
34 | 34 | $this->crud->addButton('bottom', 'bulk_delete', 'view', 'crud::buttons.bulk_delete'); |
35 | 35 | }); |
@@ -42,13 +42,13 @@ |
||
42 | 42 | { |
43 | 43 | $this->crud->allowAccess('create'); |
44 | 44 | |
45 | - $this->crud->operation('create', function () { |
|
45 | + $this->crud->operation('create', function() { |
|
46 | 46 | $this->crud->set('create.groupedErrors', config('backpack.crud.show_grouped_errors', true)); |
47 | 47 | $this->crud->set('create.inlineErrors', config('backpack.crud.show_inline_errors', true)); |
48 | 48 | $this->crud->set('create.autoFocusOnFirstField', true); |
49 | 49 | }); |
50 | 50 | |
51 | - $this->crud->operation('list', function () { |
|
51 | + $this->crud->operation('list', function() { |
|
52 | 52 | $this->crud->addButton('top', 'create', 'view', 'crud::buttons.create'); |
53 | 53 | }); |
54 | 54 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | { |
30 | 30 | $this->crud->allowAccess('show'); |
31 | 31 | |
32 | - $this->crud->operation('list', function () { |
|
32 | + $this->crud->operation('list', function() { |
|
33 | 33 | $this->crud->addButton('line', 'show', 'view', 'crud::buttons.show', 'beginning'); |
34 | 34 | }); |
35 | 35 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | { |
30 | 30 | $this->crud->allowAccess('delete'); |
31 | 31 | |
32 | - $this->crud->operation(['list', 'show'], function () { |
|
32 | + $this->crud->operation(['list', 'show'], function() { |
|
33 | 33 | $this->crud->addButton('line', 'delete', 'view', 'crud::buttons.delete', 'end'); |
34 | 34 | }); |
35 | 35 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | |
28 | 28 | // call the setup function inside this closure to also have the request there |
29 | 29 | // this way, developers can use things stored in session (auth variables, etc) |
30 | - $this->middleware(function ($request, $next) { |
|
30 | + $this->middleware(function($request, $next) { |
|
31 | 31 | // make a new CrudPanel object, from the one stored in Laravel's service container |
32 | 32 | $this->crud = app()->make('crud'); |
33 | 33 | $this->request = $request; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $this->enableFilters(); |
60 | 60 | |
61 | 61 | // check if another filter with the same name exists |
62 | - if (! isset($options['name'])) { |
|
62 | + if (!isset($options['name'])) { |
|
63 | 63 | abort(500, 'All your filters need names.'); |
64 | 64 | } |
65 | 65 | if ($this->filters()->contains('name', $options['name'])) { |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | { |
202 | 202 | $filter = $this->filters()->firstWhere('name', $name); |
203 | 203 | |
204 | - if (! $filter) { |
|
204 | + if (!$filter) { |
|
205 | 205 | abort(500, 'CRUD Filter "'.$name.'" not found. Please check the filter exists before you modify it.'); |
206 | 206 | } |
207 | 207 | |
@@ -216,7 +216,7 @@ discard block |
||
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 | |
@@ -278,16 +278,16 @@ discard block |
||
278 | 278 | |
279 | 279 | public function checkOptionsIntegrity($options) |
280 | 280 | { |
281 | - if (! isset($options['name'])) { |
|
281 | + if (!isset($options['name'])) { |
|
282 | 282 | abort(500, 'Please make sure all your filters have names.'); |
283 | 283 | } |
284 | - if (! isset($options['type'])) { |
|
284 | + if (!isset($options['type'])) { |
|
285 | 285 | abort(500, 'Please make sure all your filters have types.'); |
286 | 286 | } |
287 | - if (! \View::exists('crud::filters.'.$options['type'])) { |
|
287 | + if (!\View::exists('crud::filters.'.$options['type'])) { |
|
288 | 288 | abort(500, 'No filter view named "'.$options['type'].'.blade.php" was found.'); |
289 | 289 | } |
290 | - if (! isset($options['label'])) { |
|
290 | + if (!isset($options['label'])) { |
|
291 | 291 | abort(500, 'Please make sure all your filters have labels.'); |
292 | 292 | } |
293 | 293 | } |