We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -5,24 +5,24 @@ |
||
5 | 5 | |
6 | 6 | <span> |
7 | 7 | <?php |
8 | - if ($values !== null) { |
|
9 | - if (is_array($values)) { |
|
10 | - $array_of_values = []; |
|
8 | + if ($values !== null) { |
|
9 | + if (is_array($values)) { |
|
10 | + $array_of_values = []; |
|
11 | 11 | |
12 | - foreach ($values as $key => $value) { |
|
13 | - $array_of_values[] = $column['options'][$value]; |
|
14 | - } |
|
12 | + foreach ($values as $key => $value) { |
|
13 | + $array_of_values[] = $column['options'][$value]; |
|
14 | + } |
|
15 | 15 | |
16 | - if (count($array_of_values) > 1) { |
|
17 | - echo implode(', ', $array_of_values); |
|
18 | - } else { |
|
19 | - echo $array_of_values; |
|
20 | - } |
|
21 | - } else { |
|
22 | - echo $column['options'][$values]; |
|
23 | - } |
|
24 | - } else { |
|
25 | - echo "-"; |
|
26 | - } |
|
27 | - ?> |
|
16 | + if (count($array_of_values) > 1) { |
|
17 | + echo implode(', ', $array_of_values); |
|
18 | + } else { |
|
19 | + echo $array_of_values; |
|
20 | + } |
|
21 | + } else { |
|
22 | + echo $column['options'][$values]; |
|
23 | + } |
|
24 | + } else { |
|
25 | + echo "-"; |
|
26 | + } |
|
27 | + ?> |
|
28 | 28 | </span> |
29 | 29 | \ No newline at end of file |
@@ -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 = \DB::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 | } |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Backpack\CRUD\app\Http\Controllers\Operations; |
4 | 4 | |
5 | -use Illuminate\Support\Facades\Route; |
|
6 | 5 | use Illuminate\Http\Request as StoreRequest; |
6 | +use Illuminate\Support\Facades\Route; |
|
7 | 7 | |
8 | 8 | trait CreateOperation |
9 | 9 | { |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Backpack\CRUD\app\Http\Controllers\Operations; |
4 | 4 | |
5 | -use Illuminate\Support\Facades\Route; |
|
6 | 5 | use Illuminate\Http\Request as UpdateRequest; |
6 | +use Illuminate\Support\Facades\Route; |
|
7 | 7 | |
8 | 8 | trait UpdateOperation |
9 | 9 | { |
@@ -88,13 +88,13 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function register() |
90 | 90 | { |
91 | - $this->app->bind('CRUD', function ($app) { |
|
91 | + $this->app->bind('CRUD', function($app) { |
|
92 | 92 | return new CRUD($app); |
93 | 93 | }); |
94 | 94 | |
95 | 95 | // load a macro for Route, |
96 | 96 | // for developers to be able to load all routes for a CRUD resource in one line |
97 | - if (! Route::hasMacro('crudResource')) { |
|
97 | + if (!Route::hasMacro('crudResource')) { |
|
98 | 98 | $this->addRouteMacro(); |
99 | 99 | } |
100 | 100 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $this->commands($this->commands); |
106 | 106 | |
107 | 107 | // map the elfinder prefix |
108 | - if (! \Config::get('elfinder.route.prefix')) { |
|
108 | + if (!\Config::get('elfinder.route.prefix')) { |
|
109 | 109 | \Config::set('elfinder.route.prefix', \Config::get('backpack.base.route_prefix').'/elfinder'); |
110 | 110 | } |
111 | 111 | } |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | private function addRouteMacro() |
120 | 120 | { |
121 | - Route::macro('crud', function ($router, $name, $controller, array $options = []) { |
|
121 | + Route::macro('crud', function($router, $name, $controller, array $options = []) { |
|
122 | 122 | $groupStack = $router->hasGroupStack() ? $router->getGroupStack()[0]['namespace'].'\\' : 'App\\'; |
123 | 123 | $namespacedController = $groupStack.$controller; |
124 | 124 | $controllerInstance = new $namespacedController; |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | { |
146 | 146 | $crudPubPath = public_path('vendor/backpack/crud'); |
147 | 147 | |
148 | - if (! is_dir($crudPubPath)) { |
|
148 | + if (!is_dir($crudPubPath)) { |
|
149 | 149 | return true; |
150 | 150 | } |
151 | 151 |