@@ -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 | }); |
@@ -8,10 +8,10 @@ |
||
8 | 8 | <?php $active = null; ?> |
9 | 9 | @foreach ($items as $label => $_tmp) |
10 | 10 | <?php |
11 | - if (is_null($active)) { |
|
12 | - $active = $label; |
|
13 | - } |
|
14 | - ?> |
|
11 | + if (is_null($active)) { |
|
12 | + $active = $label; |
|
13 | + } |
|
14 | + ?> |
|
15 | 15 | <li role="presentation" {!! ($active == $label) ? 'class="active"' : '' !!}> |
16 | 16 | <a href="#{{ md5($label) }}" aria-controls="{{ md5($label) }}" role="tab" data-toggle="tab">{{ $label }}</a> |
17 | 17 | </li> |
@@ -66,9 +66,9 @@ discard block |
||
66 | 66 | * |
67 | 67 | * @param $root |
68 | 68 | * @param $parentId |
69 | - * @param $left |
|
69 | + * @param integer $left |
|
70 | 70 | * |
71 | - * @return mixed |
|
71 | + * @return integer |
|
72 | 72 | */ |
73 | 73 | protected function recursiveReorder($root, $parentId, $left) |
74 | 74 | { |
@@ -88,8 +88,8 @@ discard block |
||
88 | 88 | * |
89 | 89 | * @param $id |
90 | 90 | * @param $parentId |
91 | - * @param $left |
|
92 | - * @param $right |
|
91 | + * @param integer $left |
|
92 | + * @param integer $right |
|
93 | 93 | */ |
94 | 94 | protected function move($id, $parentId, $left, $right) |
95 | 95 | { |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | { |
27 | 27 | parent::__construct($path, $label, $options); |
28 | 28 | |
29 | - $this->setLoadOptionsQueryPreparer(function ($item, $query) { |
|
29 | + $this->setLoadOptionsQueryPreparer(function($item, $query) { |
|
30 | 30 | $repository = app(RepositoryInterface::class); |
31 | 31 | $repository->setModel($this->getModelForOptions()); |
32 | 32 | $key = $repository->getModel()->getKeyName(); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | { |
76 | 76 | $routeName = 'admin.form.element.'.static::$route; |
77 | 77 | |
78 | - if (! $router->has($routeName)) { |
|
78 | + if (!$router->has($routeName)) { |
|
79 | 79 | $router->post('{adminModel}/'.static::$route.'/{field}/{id?}', [ |
80 | 80 | 'as' => $routeName, |
81 | 81 | 'uses' => 'SleepingOwl\Admin\Http\Controllers\FormElementController@multiselectSearch', |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | { |
110 | 110 | $attribute = $this->getModelAttributeKey(); |
111 | 111 | |
112 | - if (! method_exists($this->getModel(), $attribute)) { |
|
112 | + if (!method_exists($this->getModel(), $attribute)) { |
|
113 | 113 | return; |
114 | 114 | } |
115 | 115 |
@@ -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', |