We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function wasNotApplied() |
86 | 86 | { |
87 | - return ! $this->applied; |
|
87 | + return !$this->applied; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | $input = $input ?? new ParameterBag($this->crud()->getRequest()->all()); |
107 | 107 | |
108 | - if (! $input->has($this->name)) { |
|
108 | + if (!$input->has($this->name)) { |
|
109 | 109 | // if fallback logic was supplied and is a closure |
110 | 110 | if (is_callable($this->fallbackLogic)) { |
111 | 111 | return ($this->fallbackLogic)(); |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | */ |
286 | 286 | public function values($value) |
287 | 287 | { |
288 | - $this->values = (! is_string($value) && is_callable($value)) ? $value() : $value; |
|
288 | + $this->values = (!is_string($value) && is_callable($value)) ? $value() : $value; |
|
289 | 289 | |
290 | 290 | return $this->save(); |
291 | 291 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('addresses', function (Blueprint $table) { |
|
16 | + Schema::create('addresses', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->integer('account_details_id')->unsigned(); |
19 | 19 | $table->string('city')->nullable(); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | $app['router']->get('admin/users', "$controller@index")->name('admin.users.index'); |
28 | 28 | |
29 | - $app->singleton('crud', function ($app) { |
|
29 | + $app->singleton('crud', function($app) { |
|
30 | 30 | return new CrudPanel($app); |
31 | 31 | }); |
32 | 32 |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('account_details', function (Blueprint $table) { |
|
16 | + Schema::create('account_details', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->integer('user_id')->unsigned(); |
19 | 19 | $table->string('nickname'); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $table = $instance->getTableWithPrefix(); |
73 | 73 | |
74 | 74 | // MongoDB columns are alway nullable |
75 | - if (! in_array($conn->getConfig()['driver'], CRUD::getSqlDriverList())) { |
|
75 | + if (!in_array($conn->getConfig()['driver'], CRUD::getSqlDriverList())) { |
|
76 | 76 | return true; |
77 | 77 | } |
78 | 78 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | // check for NOT NULL |
83 | 83 | $notNull = $column->getNotnull(); |
84 | 84 | // return the value of nullable (aka the inverse of NOT NULL) |
85 | - return ! $notNull; |
|
85 | + return !$notNull; |
|
86 | 86 | } catch (\Exception $e) { |
87 | 87 | return true; |
88 | 88 | } |
@@ -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 | } |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | // we will apply the same labels as the values to the menu if developer didn't |
245 | 245 | $this->abortIfInvalidPageLength($menu[0]); |
246 | 246 | |
247 | - if (! isset($menu[1]) || ! is_array($menu[1])) { |
|
247 | + if (!isset($menu[1]) || !is_array($menu[1])) { |
|
248 | 248 | $menu[1] = $menu[0]; |
249 | 249 | } |
250 | 250 | } else { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | return collect($this->fields()) |
62 | 62 | ->where('model') |
63 | 63 | ->whereIn('relation_type', $relation_types) |
64 | - ->filter(function ($item) { |
|
64 | + ->filter(function($item) { |
|
65 | 65 | $related_model = get_class($this->model->{Arr::first(explode('.', $item['entity']))}()->getRelated()); |
66 | 66 | |
67 | 67 | return Str::contains($item['entity'], '.') && $item['model'] !== $related_model ? false : true; |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | |
214 | 214 | $related_method = Arr::last($entity_array); |
215 | 215 | |
216 | - if (! method_exists($relation_model, $related_method)) { |
|
216 | + if (!method_exists($relation_model, $related_method)) { |
|
217 | 217 | if (count($entity_array) <= 1) { |
218 | 218 | return $relation_field['entity']; |
219 | 219 | } else { |
@@ -41,7 +41,7 @@ discard block |
||
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 | } |
@@ -116,12 +116,12 @@ discard block |
||
116 | 116 | $table = $this->crud->model->getTable(); |
117 | 117 | $key = $this->crud->model->getKeyName(); |
118 | 118 | |
119 | - $hasOrderByPrimaryKey = collect($orderBy)->some(function ($item) use ($key, $table) { |
|
119 | + $hasOrderByPrimaryKey = collect($orderBy)->some(function($item) use ($key, $table) { |
|
120 | 120 | return (isset($item['column']) && $item['column'] === $key) |
121 | 121 | || (isset($item['sql']) && str_contains($item['sql'], "$table.$key")); |
122 | 122 | }); |
123 | 123 | |
124 | - if (! $hasOrderByPrimaryKey) { |
|
124 | + if (!$hasOrderByPrimaryKey) { |
|
125 | 125 | $this->crud->orderByWithPrefix($this->crud->model->getKeyName(), 'DESC'); |
126 | 126 | } |
127 | 127 |
@@ -22,9 +22,9 @@ discard block |
||
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 | - if (! isset($column['type'])) { |
|
27 | + if (!isset($column['type'])) { |
|
28 | 28 | abort(400, 'Missing column type when trying to apply search term.'); |
29 | 29 | } |
30 | 30 | |
@@ -82,7 +82,7 @@ discard block |
||
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($this->getColumnWithTableNamePrefixed($q, $column['attribute']), 'like', '%'.$searchTerm.'%'); |
87 | 87 | }); |
88 | 88 | break; |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | */ |
289 | 289 | private function renderCellView($view, $column, $entry, $rowNumber = false) |
290 | 290 | { |
291 | - if (! view()->exists($view)) { |
|
291 | + if (!view()->exists($view)) { |
|
292 | 292 | $view = 'crud::columns.text'; // fallback to text column |
293 | 293 | } |
294 | 294 |