We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -3,11 +3,11 @@ |
||
3 | 3 | <?php |
4 | 4 | // if the column has been cast to Carbon or Date (using attribute casting) |
5 | 5 | // get the value as a date string |
6 | - if (isset($field['value']) && ( $field['value'] instanceof \Carbon\CarbonInterface )) { |
|
6 | + if (isset($field['value']) && ($field['value'] instanceof \Carbon\CarbonInterface)) { |
|
7 | 7 | $field['value'] = $field['value']->format('Y-m-d'); |
8 | 8 | } |
9 | 9 | |
10 | - $field_language = isset($field['date_picker_options']['language'])?$field['date_picker_options']['language']:\App::getLocale(); |
|
10 | + $field_language = isset($field['date_picker_options']['language']) ? $field['date_picker_options']['language'] : \App::getLocale(); |
|
11 | 11 | |
12 | 12 | if (!isset($field['attributes']['style'])) { |
13 | 13 | $field['attributes']['style'] = 'background-color: white!important;'; |
@@ -3,7 +3,7 @@ |
||
3 | 3 | <?php |
4 | 4 | // if the column has been cast to Carbon or Date (using attribute casting) |
5 | 5 | // get the value as a date string |
6 | -if (isset($field['value']) && ( $field['value'] instanceof \Carbon\CarbonInterface )) { |
|
6 | +if (isset($field['value']) && ($field['value'] instanceof \Carbon\CarbonInterface)) { |
|
7 | 7 | $field['value'] = $field['value']->toDateString(); |
8 | 8 | } |
9 | 9 | ?> |
@@ -3,11 +3,11 @@ |
||
3 | 3 | <?php |
4 | 4 | // if the column has been cast to Carbon or Date (using attribute casting) |
5 | 5 | // get the value as a date string |
6 | -if (isset($field['value']) && ( $field['value'] instanceof \Carbon\CarbonInterface )) { |
|
6 | +if (isset($field['value']) && ($field['value'] instanceof \Carbon\CarbonInterface)) { |
|
7 | 7 | $field['value'] = $field['value']->format('Y-m-d H:i:s'); |
8 | 8 | } |
9 | 9 | |
10 | - $field_language = isset($field['datetime_picker_options']['language'])?$field['datetime_picker_options']['language']:\App::getLocale(); |
|
10 | + $field_language = isset($field['datetime_picker_options']['language']) ? $field['datetime_picker_options']['language'] : \App::getLocale(); |
|
11 | 11 | ?> |
12 | 12 | |
13 | 13 | <div @include('crud::inc.field_wrapper_attributes') > |
@@ -17,12 +17,12 @@ discard block |
||
17 | 17 | */ |
18 | 18 | public function setFromDb() |
19 | 19 | { |
20 | - if (! $this->driverIsMongoDb()) { |
|
20 | + if (!$this->driverIsMongoDb()) { |
|
21 | 21 | $this->setDoctrineTypesMapping(); |
22 | 22 | $this->getDbColumnTypes(); |
23 | 23 | } |
24 | 24 | |
25 | - array_map(function ($field) { |
|
25 | + array_map(function($field) { |
|
26 | 26 | $new_field = [ |
27 | 27 | 'name' => $field, |
28 | 28 | 'label' => $this->makeLabel($field), |
@@ -33,14 +33,14 @@ discard block |
||
33 | 33 | 'attributes' => [], |
34 | 34 | 'autoset' => true, |
35 | 35 | ]; |
36 | - if (! isset($this->create_fields[$field])) { |
|
36 | + if (!isset($this->create_fields[$field])) { |
|
37 | 37 | $this->create_fields[$field] = $new_field; |
38 | 38 | } |
39 | - if (! isset($this->update_fields[$field])) { |
|
39 | + if (!isset($this->update_fields[$field])) { |
|
40 | 40 | $this->update_fields[$field] = $new_field; |
41 | 41 | } |
42 | 42 | |
43 | - if (! in_array($field, $this->model->getHidden()) && ! isset($this->columns[$field])) { |
|
43 | + if (!in_array($field, $this->model->getHidden()) && !isset($this->columns[$field])) { |
|
44 | 44 | $this->addColumn([ |
45 | 45 | 'name' => $field, |
46 | 46 | 'label' => $this->makeLabel($field), |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | */ |
97 | 97 | public function getFieldTypeFromDbColumnType($field) |
98 | 98 | { |
99 | - if (! array_key_exists($field, $this->db_column_types)) { |
|
99 | + if (!array_key_exists($field, $this->db_column_types)) { |
|
100 | 100 | return 'text'; |
101 | 101 | } |
102 | 102 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | $types = ['enum' => 'string']; |
163 | 163 | $platform = $this->getSchema()->getConnection()->getDoctrineConnection()->getDatabasePlatform(); |
164 | 164 | foreach ($types as $type_key => $type_value) { |
165 | - if (! $platform->hasDoctrineTypeMappingFor($type_key)) { |
|
165 | + if (!$platform->hasDoctrineTypeMappingFor($type_key)) { |
|
166 | 166 | $platform->registerDoctrineTypeMapping($type_key, $type_value); |
167 | 167 | } |
168 | 168 | } |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | // Automatically-set columns should be both in the database, and in the $fillable variable on the Eloquent Model |
222 | 222 | $columns = $this->model->getConnection()->getSchemaBuilder()->getColumnListing($this->model->getTable()); |
223 | 223 | |
224 | - if (! empty($fillable)) { |
|
224 | + if (!empty($fillable)) { |
|
225 | 225 | $columns = array_intersect($columns, $fillable); |
226 | 226 | } |
227 | 227 | } |
@@ -21,13 +21,13 @@ |
||
21 | 21 | |
22 | 22 | public function __construct() |
23 | 23 | { |
24 | - if (! $this->crud) { |
|
24 | + if (!$this->crud) { |
|
25 | 25 | // make a new CrudPanel object, from the one stored in Laravel's service container |
26 | 26 | $this->crud = app()->make('crud'); |
27 | 27 | |
28 | 28 | // call the setup function inside this closure to also have the request there |
29 | 29 | // this way, developers can use things stored in session (auth variables, etc) |
30 | - $this->middleware(function ($request, $next) { |
|
30 | + $this->middleware(function($request, $next) { |
|
31 | 31 | $this->request = $request; |
32 | 32 | $this->crud->request = $request; |
33 | 33 | $this->setup(); |
@@ -86,13 +86,13 @@ discard block |
||
86 | 86 | public function register() |
87 | 87 | { |
88 | 88 | // Bind the CrudPanel object to Laravel's service container |
89 | - $this->app->singleton('crud', function ($app) { |
|
89 | + $this->app->singleton('crud', function($app) { |
|
90 | 90 | return new CrudPanel($app); |
91 | 91 | }); |
92 | 92 | |
93 | 93 | // load a macro for Route, |
94 | 94 | // for developers to be able to load all routes for a CRUD resource in one line |
95 | - if (! Route::hasMacro('crud')) { |
|
95 | + if (!Route::hasMacro('crud')) { |
|
96 | 96 | $this->addRouteMacro(); |
97 | 97 | } |
98 | 98 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $this->commands($this->commands); |
104 | 104 | |
105 | 105 | // map the elfinder prefix |
106 | - if (! \Config::get('elfinder.route.prefix')) { |
|
106 | + if (!\Config::get('elfinder.route.prefix')) { |
|
107 | 107 | \Config::set('elfinder.route.prefix', \Config::get('backpack.base.route_prefix').'/elfinder'); |
108 | 108 | } |
109 | 109 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | private function addRouteMacro() |
118 | 118 | { |
119 | - Route::macro('crud', function ($name, $controller) { |
|
119 | + Route::macro('crud', function($name, $controller) { |
|
120 | 120 | // put together the route name prefix, |
121 | 121 | // as passed to the Route::group() statements |
122 | 122 | $routeName = ''; |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | { |
163 | 163 | $crudPubPath = public_path('vendor/backpack/crud'); |
164 | 164 | |
165 | - if (! is_dir($crudPubPath)) { |
|
165 | + if (!is_dir($crudPubPath)) { |
|
166 | 166 | return true; |
167 | 167 | } |
168 | 168 |
@@ -24,11 +24,11 @@ discard block |
||
24 | 24 | |
25 | 25 | $saveOptions = collect($permissions) |
26 | 26 | // Restrict list to allowed actions. |
27 | - ->filter(function ($action, $permission) { |
|
27 | + ->filter(function($action, $permission) { |
|
28 | 28 | return $this->hasAccess($permission); |
29 | 29 | }) |
30 | 30 | // Generate list of possible actions. |
31 | - ->mapWithKeys(function ($action, $permission) { |
|
31 | + ->mapWithKeys(function($action, $permission) { |
|
32 | 32 | return [$action => $this->getSaveActionButtonName($action)]; |
33 | 33 | }) |
34 | 34 | ->all(); |
@@ -63,8 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function setSaveAction($forceSaveAction = null) |
65 | 65 | { |
66 | - $saveAction = $forceSaveAction ?: |
|
67 | - \Request::input('save_action', config('backpack.crud.default_save_action', 'save_and_back')); |
|
66 | + $saveAction = $forceSaveAction ?: \Request::input('save_action', config('backpack.crud.default_save_action', 'save_and_back')); |
|
68 | 67 | |
69 | 68 | if (config('backpack.crud.show_save_action_change', true) && |
70 | 69 | session('save_action', 'save_and_back') !== $saveAction) { |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Backpack\CRUD\Tests\Unit\CrudPanel; |
4 | 4 | |
5 | -use Doctrine\DBAL\DBALException; |
|
6 | 5 | use Backpack\CRUD\Tests\Unit\Models\ColumnType; |
6 | +use Doctrine\DBAL\DBALException; |
|
7 | 7 | |
8 | 8 | class MyColumnTypeWithOtherConnection extends ColumnType |
9 | 9 | { |