We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -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()) && ! isset($this->columns[$field])) { |
|
36 | + if (!in_array($field, $this->model->getHidden()) && !isset($this->columns[$field])) { |
|
37 | 37 | $this->addColumn([ |
38 | 38 | 'name' => $field, |
39 | 39 | 'label' => $this->makeLabel($field), |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $types = ['enum' => 'string']; |
164 | 164 | $platform = $this->getSchema()->getConnection()->getDoctrineConnection()->getDatabasePlatform(); |
165 | 165 | foreach ($types as $type_key => $type_value) { |
166 | - if (! $platform->hasDoctrineTypeMappingFor($type_key)) { |
|
166 | + if (!$platform->hasDoctrineTypeMappingFor($type_key)) { |
|
167 | 167 | $platform->registerDoctrineTypeMapping($type_key, $type_value); |
168 | 168 | } |
169 | 169 | } |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | // Automatically-set columns should be both in the database, and in the $fillable variable on the Eloquent Model |
223 | 223 | $columns = $this->model->getConnection()->getSchemaBuilder()->getColumnListing($this->model->getTable()); |
224 | 224 | |
225 | - if (! empty($fillable)) { |
|
225 | + if (!empty($fillable)) { |
|
226 | 226 | $columns = array_intersect($columns, $fillable); |
227 | 227 | } |
228 | 228 | } |
@@ -247,7 +247,7 @@ |
||
247 | 247 | |
248 | 248 | private function getButtonByName($name) |
249 | 249 | { |
250 | - return $this->crudPanel->buttons()->first(function ($value) use ($name) { |
|
250 | + return $this->crudPanel->buttons()->first(function($value) use ($name) { |
|
251 | 251 | return $value->name == $name; |
252 | 252 | }); |
253 | 253 | } |
@@ -110,14 +110,14 @@ |
||
110 | 110 | // if there was an order set, this will be the last one (after all others were applied) |
111 | 111 | $orderBy = $this->crud->query->getQuery()->orders; |
112 | 112 | $hasOrderByPrimaryKey = false; |
113 | - collect($orderBy)->each(function ($item, $key) use ($hasOrderByPrimaryKey) { |
|
113 | + collect($orderBy)->each(function($item, $key) use ($hasOrderByPrimaryKey) { |
|
114 | 114 | if ($item['column'] == $this->crud->model->getKeyName()) { |
115 | 115 | $hasOrderByPrimaryKey = true; |
116 | 116 | |
117 | 117 | return false; |
118 | 118 | } |
119 | 119 | }); |
120 | - if (! $hasOrderByPrimaryKey) { |
|
120 | + if (!$hasOrderByPrimaryKey) { |
|
121 | 121 | $this->crud->query->orderByDesc($this->crud->model->getKeyName()); |
122 | 122 | } |
123 | 123 |
@@ -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 | } |
@@ -102,7 +102,7 @@ |
||
102 | 102 | * Defaults to the current operation. |
103 | 103 | * |
104 | 104 | * @param string $key Has no operation prepended. (ex: exportButtons) |
105 | - * @return mixed [description] |
|
105 | + * @return boolean [description] |
|
106 | 106 | */ |
107 | 107 | public function hasOperationSetting(string $key, $operation = null) |
108 | 108 | { |
@@ -88,7 +88,6 @@ |
||
88 | 88 | * for the given operation. |
89 | 89 | * |
90 | 90 | * @param string $inputKey Field or input name. |
91 | - * @param string $operation create / update |
|
92 | 91 | * |
93 | 92 | * @return bool |
94 | 93 | */ |
@@ -94,7 +94,7 @@ |
||
94 | 94 | */ |
95 | 95 | public function isRequired($inputKey) |
96 | 96 | { |
97 | - if (! $this->hasOperationSetting('requiredFields')) { |
|
97 | + if (!$this->hasOperationSetting('requiredFields')) { |
|
98 | 98 | return false; |
99 | 99 | } |
100 | 100 |