We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -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 | } |
@@ -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 |
@@ -33,12 +33,12 @@ |
||
33 | 33 | |
34 | 34 | public function __construct() |
35 | 35 | { |
36 | - if (! $this->crud) { |
|
36 | + if (!$this->crud) { |
|
37 | 37 | $this->crud = app()->make(CrudPanel::class); |
38 | 38 | |
39 | 39 | // call the setup function inside this closure to also have the request there |
40 | 40 | // this way, developers can use things stored in session (auth variables, etc) |
41 | - $this->middleware(function ($request, $next) { |
|
41 | + $this->middleware(function($request, $next) { |
|
42 | 42 | $this->request = $request; |
43 | 43 | $this->crud->request = $request; |
44 | 44 | $this->setup(); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $fakeFieldKey = isset($field['store_in']) ? $field['store_in'] : 'extras'; |
30 | 30 | $this->addCompactedField($requestInput, $field['name'], $fakeFieldKey); |
31 | 31 | |
32 | - if (! in_array($fakeFieldKey, $compactedFakeFields)) { |
|
32 | + if (!in_array($fakeFieldKey, $compactedFakeFields)) { |
|
33 | 33 | $compactedFakeFields[] = $fakeFieldKey; |
34 | 34 | } |
35 | 35 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | // json_encode all fake_value columns if applicable in the database, so they can be properly stored and interpreted |
39 | 39 | foreach ($compactedFakeFields as $value) { |
40 | - if (! (property_exists($this->model, 'translatable') && in_array($value, $this->model->getTranslatableAttributes(), true)) && $this->model->shouldEncodeFake($value)) { |
|
40 | + if (!(property_exists($this->model, 'translatable') && in_array($value, $this->model->getTranslatableAttributes(), true)) && $this->model->shouldEncodeFake($value)) { |
|
41 | 41 | $requestInput[$value] = json_encode($requestInput[$value]); |
42 | 42 | } |
43 | 43 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $conn->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('json', 'json_array'); |
58 | 58 | $conn->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('jsonb', 'json_array'); |
59 | 59 | |
60 | - return ! $conn->getDoctrineColumn($table, $column_name)->getNotnull(); |
|
60 | + return !$conn->getDoctrineColumn($table, $column_name)->getNotnull(); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /* |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | foreach ($columns as $key => $column) { |
77 | 77 | $column_contents = $this->{$column}; |
78 | 78 | |
79 | - if (! is_object($this->{$column})) { |
|
79 | + if (!is_object($this->{$column})) { |
|
80 | 80 | $column_contents = json_decode($this->{$column}); |
81 | 81 | } |
82 | 82 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | { |
100 | 100 | $model = '\\'.get_class($this); |
101 | 101 | |
102 | - if (! count($columns)) { |
|
102 | + if (!count($columns)) { |
|
103 | 103 | $columns = (property_exists($model, 'fakeColumns')) ? $this->fakeColumns : ['extras']; |
104 | 104 | } |
105 | 105 | |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function shouldEncodeFake($column) |
118 | 118 | { |
119 | - return ! in_array($column, array_keys($this->casts)); |
|
119 | + return !in_array($column, array_keys($this->casts)); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | /* |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $attribute_value = (array) $this->{$attribute_name}; |
200 | 200 | foreach ($files_to_clear as $key => $filename) { |
201 | 201 | \Storage::disk($disk)->delete($filename); |
202 | - $attribute_value = array_where($attribute_value, function ($value, $key) use ($filename) { |
|
202 | + $attribute_value = array_where($attribute_value, function($value, $key) use ($filename) { |
|
203 | 203 | return $value != $filename; |
204 | 204 | }); |
205 | 205 | } |
@@ -22,11 +22,11 @@ discard block |
||
22 | 22 | |
23 | 23 | $saveOptions = collect($permissions) |
24 | 24 | // Restrict list to allowed actions. |
25 | - ->filter(function ($action, $permission) { |
|
25 | + ->filter(function($action, $permission) { |
|
26 | 26 | return $this->crud->hasAccess($permission); |
27 | 27 | }) |
28 | 28 | // Generate list of possible actions. |
29 | - ->mapWithKeys(function ($action, $permission) { |
|
29 | + ->mapWithKeys(function($action, $permission) { |
|
30 | 30 | return [$action => $this->getSaveActionButtonName($action)]; |
31 | 31 | }) |
32 | 32 | ->all(); |
@@ -61,8 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function setSaveAction($forceSaveAction = null) |
63 | 63 | { |
64 | - $saveAction = $forceSaveAction ?: |
|
65 | - \Request::input('save_action', config('backpack.crud.default_save_action', 'save_and_back')); |
|
64 | + $saveAction = $forceSaveAction ?: \Request::input('save_action', config('backpack.crud.default_save_action', 'save_and_back')); |
|
66 | 65 | |
67 | 66 | if (config('backpack.crud.show_save_action_change', true) && |
68 | 67 | session('save_action', 'save_and_back') !== $saveAction) { |