We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -48,7 +48,7 @@ |
||
48 | 48 | $separator = $config['separator']; |
49 | 49 | $attribute = $attribute.'->'.$this->getLocale(); |
50 | 50 | |
51 | - return $query->where(function (Builder $q) use ($attribute, $slug, $separator) { |
|
51 | + return $query->where(function(Builder $q) use ($attribute, $slug, $separator) { |
|
52 | 52 | $q->where($attribute, '=', $slug) |
53 | 53 | ->orWhere($attribute, 'LIKE', $slug.$separator.'%') |
54 | 54 | // Fixes issues with Json data types in MySQL where data is sourrounded by " |
@@ -49,7 +49,7 @@ |
||
49 | 49 | */ |
50 | 50 | protected function makeSlugUnique(string $slug, array $config, string $attribute): string |
51 | 51 | { |
52 | - if (! $config['unique']) { |
|
52 | + if (!$config['unique']) { |
|
53 | 53 | return $slug; |
54 | 54 | } |
55 | 55 |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $conn->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('json', 'json_array'); |
70 | 70 | $conn->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('jsonb', 'json_array'); |
71 | 71 | |
72 | - return ! $conn->getDoctrineColumn($table, $column_name)->getNotnull(); |
|
72 | + return !$conn->getDoctrineColumn($table, $column_name)->getNotnull(); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /* |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | public function addFakes($columns = ['extras']) |
87 | 87 | { |
88 | 88 | foreach ($columns as $key => $column) { |
89 | - if (! isset($this->attributes[$column])) { |
|
89 | + if (!isset($this->attributes[$column])) { |
|
90 | 90 | continue; |
91 | 91 | } |
92 | 92 | |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | */ |
135 | 135 | public function shouldDecodeFake($column) |
136 | 136 | { |
137 | - return ! in_array($column, array_keys($this->casts)); |
|
137 | + return !in_array($column, array_keys($this->casts)); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | /** |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public function shouldEncodeFake($column) |
147 | 147 | { |
148 | - return ! in_array($column, array_keys($this->casts)); |
|
148 | + return !in_array($column, array_keys($this->casts)); |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | /* |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | public function uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path) |
220 | 220 | { |
221 | 221 | $request = \Request::instance(); |
222 | - if (! is_array($this->{$attribute_name})) { |
|
222 | + if (!is_array($this->{$attribute_name})) { |
|
223 | 223 | $attribute_value = json_decode($this->{$attribute_name}, true) ?? []; |
224 | 224 | } else { |
225 | 225 | $attribute_value = $this->{$attribute_name}; |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | if ($files_to_clear) { |
232 | 232 | foreach ($files_to_clear as $key => $filename) { |
233 | 233 | \Storage::disk($disk)->delete($filename); |
234 | - $attribute_value = array_where($attribute_value, function ($value, $key) use ($filename) { |
|
234 | + $attribute_value = array_where($attribute_value, function($value, $key) use ($filename) { |
|
235 | 235 | return $value != $filename; |
236 | 236 | }); |
237 | 237 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | $button = $this->buttons()->firstWhere('name', $name); |
94 | 94 | |
95 | - if (! $button) { |
|
95 | + if (!$button) { |
|
96 | 96 | abort(500, 'CRUD Button "'.$name.'" not found. Please check the button exists before you modify it.'); |
97 | 97 | } |
98 | 98 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | public function removeButton($name, $stack = null) |
115 | 115 | { |
116 | - $this->setOperationSetting('buttons', $this->buttons()->reject(function ($button) use ($name, $stack) { |
|
116 | + $this->setOperationSetting('buttons', $this->buttons()->reject(function($button) use ($name, $stack) { |
|
117 | 117 | return $stack == null ? $button->name == $name : ($button->stack == $stack) && ($button->name == $name); |
118 | 118 | })); |
119 | 119 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | public function removeButtons($names, $stack = null) |
126 | 126 | { |
127 | - if (! empty($names)) { |
|
127 | + if (!empty($names)) { |
|
128 | 128 | foreach ($names as $name) { |
129 | 129 | $this->removeButton($name, $stack); |
130 | 130 | } |
@@ -138,14 +138,14 @@ discard block |
||
138 | 138 | |
139 | 139 | public function removeAllButtonsFromStack($stack) |
140 | 140 | { |
141 | - $this->setOperationSetting('buttons', $this->buttons()->reject(function ($button) use ($stack) { |
|
141 | + $this->setOperationSetting('buttons', $this->buttons()->reject(function($button) use ($stack) { |
|
142 | 142 | return $button->stack == $stack; |
143 | 143 | })); |
144 | 144 | } |
145 | 145 | |
146 | 146 | public function removeButtonFromStack($name, $stack) |
147 | 147 | { |
148 | - $this->setOperationSetting('buttons', $this->buttons()->reject(function ($button) use ($name, $stack) { |
|
148 | + $this->setOperationSetting('buttons', $this->buttons()->reject(function($button) use ($name, $stack) { |
|
149 | 149 | return $button->name == $name && $button->stack == $stack; |
150 | 150 | })); |
151 | 151 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | */ |
50 | 50 | public function settings() |
51 | 51 | { |
52 | - return \Arr::sort($this->settings, function ($value, $key) { |
|
52 | + return \Arr::sort($this->settings, function($value, $key) { |
|
53 | 53 | return $key; |
54 | 54 | }); |
55 | 55 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | $revisionDate = date('Y-m-d', strtotime((string) $history->created_at)); |
22 | 22 | |
23 | 23 | // Be sure to instantiate the initial grouping array |
24 | - if (! array_key_exists($revisionDate, $revisions)) { |
|
24 | + if (!array_key_exists($revisionDate, $revisions)) { |
|
25 | 25 | $revisions[$revisionDate] = []; |
26 | 26 | } |
27 | 27 |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | */ |
22 | 22 | public function getTitle($action = false) |
23 | 23 | { |
24 | - if (! $action) { |
|
24 | + if (!$action) { |
|
25 | 25 | $action = $this->getActionMethod(); |
26 | 26 | } |
27 | 27 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public function setTitle($string, $action = false) |
40 | 40 | { |
41 | - if (! $action) { |
|
41 | + if (!$action) { |
|
42 | 42 | $action = $this->getActionMethod(); |
43 | 43 | } |
44 | 44 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function getHeading($action = false) |
60 | 60 | { |
61 | - if (! $action) { |
|
61 | + if (!$action) { |
|
62 | 62 | $action = $this->getActionMethod(); |
63 | 63 | } |
64 | 64 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function setHeading($string, $action = false) |
77 | 77 | { |
78 | - if (! $action) { |
|
78 | + if (!$action) { |
|
79 | 79 | $action = $this->getActionMethod(); |
80 | 80 | } |
81 | 81 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | public function getSubheading($action = false) |
97 | 97 | { |
98 | - if (! $action) { |
|
98 | + if (!$action) { |
|
99 | 99 | $action = $this->getActionMethod(); |
100 | 100 | } |
101 | 101 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public function setSubheading($string, $action = false) |
114 | 114 | { |
115 | - if (! $action) { |
|
115 | + if (!$action) { |
|
116 | 116 | $action = $this->getActionMethod(); |
117 | 117 | } |
118 | 118 |
@@ -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 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | { |
200 | 200 | // If the default Page Length isn't in the menu's values, Add it the beginnin and resort all to show a croissant list. |
201 | 201 | // assume both arrays are the same length. |
202 | - if (! in_array($this->getDefaultPageLength(), $this->getOperationSetting('pageLengthMenu')[0])) { |
|
202 | + if (!in_array($this->getDefaultPageLength(), $this->getOperationSetting('pageLengthMenu')[0])) { |
|
203 | 203 | // Loop through 2 arrays of prop. page_length_menu |
204 | 204 | foreach ($this->getOperationSetting('pageLengthMenu') as $key => &$page_length_choices) { |
205 | 205 | // This is a condition that should be always true. |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | public function getPageLengthMenu() |
231 | 231 | { |
232 | 232 | // if already set, use that |
233 | - if (! $this->getOperationSetting('pageLengthMenu')) { |
|
233 | + if (!$this->getOperationSetting('pageLengthMenu')) { |
|
234 | 234 | // try to get the menu settings from the config file |
235 | 235 | $this->setOperationSetting('pageLengthMenu', config('backpack.crud.page_length_menu') ?? [[10, 25, 50, 100, -1], [10, 25, 50, 100, 'backpack::crud.all']]); |
236 | 236 |
@@ -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($column['attribute'], 'like', '%'.$searchTerm.'%'); |
87 | 87 | }); |
88 | 88 | break; |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | */ |
275 | 275 | private function renderCellView($view, $column, $entry, $rowNumber = false) |
276 | 276 | { |
277 | - if (! view()->exists($view)) { |
|
277 | + if (!view()->exists($view)) { |
|
278 | 278 | $view = 'crud::columns.text'; // fallback to text column |
279 | 279 | } |
280 | 280 |