We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | public function addColumn($column) |
55 | 55 | { |
56 | 56 | // if a string was passed, not an array, change it to an array |
57 | - if (! is_array($column)) { |
|
57 | + if (!is_array($column)) { |
|
58 | 58 | $column = ['name' => $column]; |
59 | 59 | } |
60 | 60 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $column_with_details = $this->addDefaultLabel($column); |
63 | 63 | |
64 | 64 | // make sure the column has a name |
65 | - if (! array_key_exists('name', $column_with_details)) { |
|
65 | + if (!array_key_exists('name', $column_with_details)) { |
|
66 | 66 | $column_with_details['name'] = 'anonymous_column_'.str_random(5); |
67 | 67 | } |
68 | 68 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | // if this is a relation type field and no corresponding model was specified, get it from the relation method |
72 | 72 | // defined in the main model |
73 | - if (isset($column_with_details['entity']) && ! isset($column_with_details['model'])) { |
|
73 | + if (isset($column_with_details['entity']) && !isset($column_with_details['model'])) { |
|
74 | 74 | $column_with_details['model'] = $this->getRelationModel($column_with_details['entity']); |
75 | 75 | } |
76 | 76 | |
@@ -124,8 +124,7 @@ discard block |
||
124 | 124 | $targetColumnName = is_array($targetColumn) ? $targetColumn['name'] : $targetColumn; |
125 | 125 | |
126 | 126 | if (array_key_exists($targetColumnName, $this->columns)) { |
127 | - $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($this->columns)) : |
|
128 | - array_search($targetColumnName, array_keys($this->columns)) + 1; |
|
127 | + $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($this->columns)) : array_search($targetColumnName, array_keys($this->columns)) + 1; |
|
129 | 128 | |
130 | 129 | $element = array_pop($this->columns); |
131 | 130 | $beginningPart = array_slice($this->columns, 0, $targetColumnPosition, true); |
@@ -159,7 +158,7 @@ discard block |
||
159 | 158 | */ |
160 | 159 | public function addDefaultLabel($array) |
161 | 160 | { |
162 | - if (! array_key_exists('label', (array) $array) && array_key_exists('name', (array) $array)) { |
|
161 | + if (!array_key_exists('label', (array) $array) && array_key_exists('name', (array) $array)) { |
|
163 | 162 | $array = array_merge(['label' => ucfirst($this->makeLabel($array['name']))], $array); |
164 | 163 | |
165 | 164 | return $array; |
@@ -185,7 +184,7 @@ discard block |
||
185 | 184 | */ |
186 | 185 | public function removeColumns($columns) |
187 | 186 | { |
188 | - if (! empty($columns)) { |
|
187 | + if (!empty($columns)) { |
|
189 | 188 | foreach ($columns as $columnName) { |
190 | 189 | $this->removeColumn($columnName); |
191 | 190 | } |
@@ -206,8 +205,8 @@ discard block |
||
206 | 205 | */ |
207 | 206 | public function remove($entity, $fields) |
208 | 207 | { |
209 | - return array_values(array_filter($this->{$entity}, function ($field) use ($fields) { |
|
210 | - return ! in_array($field['name'], (array) $fields); |
|
208 | + return array_values(array_filter($this->{$entity}, function($field) use ($fields) { |
|
209 | + return !in_array($field['name'], (array) $fields); |
|
211 | 210 | })); |
212 | 211 | } |
213 | 212 | |
@@ -258,7 +257,7 @@ discard block |
||
258 | 257 | { |
259 | 258 | $columns = $this->getColumns(); |
260 | 259 | |
261 | - return collect($columns)->pluck('entity')->reject(function ($value, $key) { |
|
260 | + return collect($columns)->pluck('entity')->reject(function($value, $key) { |
|
262 | 261 | return $value == null; |
263 | 262 | })->toArray(); |
264 | 263 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $conn->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('json', 'json_array'); |
55 | 55 | $conn->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('jsonb', 'json_array'); |
56 | 56 | |
57 | - return ! $conn->getDoctrineColumn($table, $column_name)->getNotnull(); |
|
57 | + return !$conn->getDoctrineColumn($table, $column_name)->getNotnull(); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /* |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | foreach ($columns as $key => $column) { |
74 | 74 | $column_contents = $this->{$column}; |
75 | 75 | |
76 | - if (! is_object($this->{$column})) { |
|
76 | + if (!is_object($this->{$column})) { |
|
77 | 77 | $column_contents = json_decode($this->{$column}); |
78 | 78 | } |
79 | 79 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | { |
97 | 97 | $model = '\\'.get_class($this); |
98 | 98 | |
99 | - if (! count($columns)) { |
|
99 | + if (!count($columns)) { |
|
100 | 100 | $columns = (property_exists($model, 'fakeColumns')) ? $this->fakeColumns : ['extras']; |
101 | 101 | } |
102 | 102 | |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $attribute_value = (array) $this->{$attribute_name}; |
186 | 186 | foreach ($files_to_clear as $key => $filename) { |
187 | 187 | \Storage::disk($disk)->delete($filename); |
188 | - $attribute_value = array_where($attribute_value, function ($value, $key) use ($filename) { |
|
188 | + $attribute_value = array_where($attribute_value, function($value, $key) use ($filename) { |
|
189 | 189 | return $value != $filename; |
190 | 190 | }); |
191 | 191 | } |
@@ -13,13 +13,13 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('roles', function (Blueprint $table) { |
|
16 | + Schema::create('roles', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->string('name')->unique(); |
19 | 19 | $table->timestamps(); |
20 | 20 | }); |
21 | 21 | |
22 | - Schema::create('user_role', function (Blueprint $table) { |
|
22 | + Schema::create('user_role', function(Blueprint $table) { |
|
23 | 23 | $table->integer('user_id')->length(10)->unsigned(); |
24 | 24 | $table->integer('role_id')->length(10)->unsigned(); |
25 | 25 | $table->timestamps(); |
@@ -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')->length(10)->unsigned(); |
19 | 19 | $table->string('city'); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('articles', function ($table) { |
|
15 | + Schema::create('articles', function($table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->integer('user_id')->length(10)->unsigned(); |
18 | 18 | $table->string('content'); |
@@ -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')->length(10)->unsigned(); |
19 | 19 | $table->string('nickname'); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('users', function (Blueprint $table) { |
|
16 | + Schema::create('users', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->string('name'); |
19 | 19 | $table->string('email')->unique(); |
@@ -15,7 +15,7 @@ |
||
15 | 15 | // uncomment the next statement to map strings to enum types in doctrine and get over the 'Unknown database type enum' DBAL error |
16 | 16 | // Schema::getConnection()->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string'); |
17 | 17 | |
18 | - Schema::create('column_types', function ($table) { |
|
18 | + Schema::create('column_types', function($table) { |
|
19 | 19 | $table->bigInteger('bigIntegerCol'); |
20 | 20 | $table->binary('binaryCol'); |
21 | 21 | $table->boolean('booleanCol'); |
@@ -217,7 +217,7 @@ |
||
217 | 217 | |
218 | 218 | private function getButtonByName($name) |
219 | 219 | { |
220 | - return $this->crudPanel->buttons->first(function ($value) use ($name) { |
|
220 | + return $this->crudPanel->buttons->first(function($value) use ($name) { |
|
221 | 221 | return $value->name == $name; |
222 | 222 | }); |
223 | 223 | } |