@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | public function getDefaultFrom() |
33 | 33 | { |
34 | - if (! $this->defaultFrom) { |
|
34 | + if (!$this->defaultFrom) { |
|
35 | 35 | $this->defaultFrom = Carbon::now(); |
36 | 36 | } |
37 | 37 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function getDefaultTo() |
59 | 59 | { |
60 | - if (! $this->defaultTo) { |
|
60 | + if (!$this->defaultTo) { |
|
61 | 61 | $this->defaultTo = Carbon::now(); |
62 | 62 | } |
63 | 63 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | */ |
86 | 86 | public function setModelAttribute($value) |
87 | 87 | { |
88 | - $value = ! empty($value) ? array_map(function ($date) { |
|
88 | + $value = !empty($value) ? array_map(function($date) { |
|
89 | 89 | return Carbon::createFromFormat($this->getPickerFormat(), $date); |
90 | 90 | }, explode('::', $value)) : null; |
91 | 91 |
@@ -14,7 +14,7 @@ |
||
14 | 14 | { |
15 | 15 | $routeName = 'admin.form.element.dependent-select'; |
16 | 16 | |
17 | - if (! $router->has($routeName)) { |
|
17 | + if (!$router->has($routeName)) { |
|
18 | 18 | $router->post('{adminModel}/dependent-select/{field}/{id?}', [ |
19 | 19 | 'as' => $routeName, |
20 | 20 | 'uses' => 'SleepingOwl\Admin\Http\Controllers\FormElementController@dependentSelect', |
@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 21 | public function register() |
22 | 22 | { |
23 | - $this->app->singleton('sleeping_owl.breadcrumbs', function () { |
|
23 | + $this->app->singleton('sleeping_owl.breadcrumbs', function() { |
|
24 | 24 | return $this->app->make(\SleepingOwl\Admin\Templates\Breadcrumbs::class); |
25 | 25 | }); |
26 | 26 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $modelForOptions = app($modelForOptions); |
60 | 60 | } |
61 | 61 | |
62 | - if (! ($modelForOptions instanceof Model)) { |
|
62 | + if (!($modelForOptions instanceof Model)) { |
|
63 | 63 | throw new SelectException('Class must be instanced of Illuminate\Database\Eloquent\Model'); |
64 | 64 | } |
65 | 65 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | */ |
106 | 106 | public function setFetchColumns($columns) |
107 | 107 | { |
108 | - if (! is_array($columns)) { |
|
108 | + if (!is_array($columns)) { |
|
109 | 109 | $columns = func_get_args(); |
110 | 110 | } |
111 | 111 | |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | |
201 | 201 | $options = $repository->getQuery(); |
202 | 202 | |
203 | - if ($this->isEmptyRelation() and ! is_null($foreignKey = $this->getForeignKey())) { |
|
203 | + if ($this->isEmptyRelation() and !is_null($foreignKey = $this->getForeignKey())) { |
|
204 | 204 | $relation = $this->getModelAttributeKey(); |
205 | 205 | $model = $this->getModel(); |
206 | 206 | |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | } |
217 | 217 | |
218 | 218 | // call the pre load options query preparer if has be set |
219 | - if (! is_null($preparer = $this->getLoadOptionsQueryPreparer())) { |
|
219 | + if (!is_null($preparer = $this->getLoadOptionsQueryPreparer())) { |
|
220 | 220 | $options = $preparer($this, $options); |
221 | 221 | } |
222 | 222 | |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | |
231 | 231 | // iterate for all options and redefine it as |
232 | 232 | // list of KEY and TEXT pair |
233 | - $options = array_map(function ($opt) use ($key, $makeDisplay) { |
|
233 | + $options = array_map(function($opt) use ($key, $makeDisplay) { |
|
234 | 234 | // get the KEY and make the display text |
235 | 235 | return [data_get($opt, $key), $makeDisplay($opt)]; |
236 | 236 | }, $options); |
@@ -59,7 +59,7 @@ |
||
59 | 59 | $display = $model->fireDisplay(); |
60 | 60 | |
61 | 61 | if ($display instanceof DisplayTabbed) { |
62 | - $display->getTabs()->each(function ($tab) use ($request) { |
|
62 | + $display->getTabs()->each(function($tab) use ($request) { |
|
63 | 63 | $content = $tab->getContent(); |
64 | 64 | if ($content instanceof DisplayTree) { |
65 | 65 | $content->getRepository()->reorder( |
@@ -24,12 +24,12 @@ |
||
24 | 24 | collect([ |
25 | 25 | Installation\PublishAssets::class, |
26 | 26 | ]) |
27 | - ->map(function ($installer) { |
|
27 | + ->map(function($installer) { |
|
28 | 28 | return new $installer($this, $this->config); |
29 | 29 | }) |
30 | - ->filter(function ($installer) { |
|
31 | - return $this->hasOption('force') ? true : ! $installer->installed(); |
|
32 | - })->each(function ($installer) { |
|
30 | + ->filter(function($installer) { |
|
31 | + return $this->hasOption('force') ? true : !$installer->installed(); |
|
32 | + })->each(function($installer) { |
|
33 | 33 | $installer->install(); |
34 | 34 | $installer->showInfo(); |
35 | 35 | }); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | { |
24 | 24 | parent::__construct($path, $label); |
25 | 25 | |
26 | - $this->setLoadOptionsQueryPreparer(function ($item, $query) { |
|
26 | + $this->setLoadOptionsQueryPreparer(function($item, $query) { |
|
27 | 27 | $repository = app(RepositoryInterface::class); |
28 | 28 | $repository->setModel($this->getModelForOptions()); |
29 | 29 | $key = $repository->getModel()->getKeyName(); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | { |
40 | 40 | $routeName = 'admin.form.element.'.static::$route; |
41 | 41 | |
42 | - if (! $router->has($routeName)) { |
|
42 | + if (!$router->has($routeName)) { |
|
43 | 43 | $router->post('{adminModel}/'.static::$route.'/{field}/{id?}', [ |
44 | 44 | 'as' => $routeName, |
45 | 45 | 'uses' => 'SleepingOwl\Admin\Http\Controllers\FormElementController@selectSearch', |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | { |
28 | 28 | $routeName = 'admin.form.element.'.static::$route; |
29 | 29 | |
30 | - if (! $router->has($routeName)) { |
|
30 | + if (!$router->has($routeName)) { |
|
31 | 31 | $router->post('{adminModel}/'.static::$route.'/{field}/{id?}', [ |
32 | 32 | 'as' => $routeName, |
33 | 33 | 'uses' => 'SleepingOwl\Admin\Http\Controllers\UploadController@fromField', |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | */ |
128 | 128 | public function getUploadPath(UploadedFile $file) |
129 | 129 | { |
130 | - if (! is_callable($this->uploadPath)) { |
|
130 | + if (!is_callable($this->uploadPath)) { |
|
131 | 131 | return $this->defaultUploadPath($file); |
132 | 132 | } |
133 | 133 | |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | */ |
154 | 154 | public function getUploadFileName(UploadedFile $file) |
155 | 155 | { |
156 | - if (! is_callable($this->uploadFileName)) { |
|
156 | + if (!is_callable($this->uploadFileName)) { |
|
157 | 157 | return $this->defaultUploadFilename($file); |
158 | 158 | } |
159 | 159 |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | protected function registerModelBindings(Collection $aliases) |
60 | 60 | { |
61 | - $this->router->bind('adminModel', function ($model, Route $route) use ($aliases) { |
|
61 | + $this->router->bind('adminModel', function($model, Route $route) use ($aliases) { |
|
62 | 62 | if (is_null($model = $aliases->get($model))) { |
63 | 63 | throw new ModelNotFoundException(); |
64 | 64 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | protected function runCustomController(Route $route, $controller, $action) |
81 | 81 | { |
82 | - $route->uses(function () use ($route, $controller, $action) { |
|
82 | + $route->uses(function() use ($route, $controller, $action) { |
|
83 | 83 | return (new \Illuminate\Routing\ControllerDispatcher($this->app))->dispatch( |
84 | 84 | $route, $this->app->make($controller), $action |
85 | 85 | ); |