@@ -138,7 +138,7 @@ |
||
138 | 138 | /** |
139 | 139 | * Fill fields to panel. |
140 | 140 | * |
141 | - * @param []Field $fields |
|
141 | + * @param Collection $fields |
|
142 | 142 | * |
143 | 143 | * @return $this |
144 | 144 | */ |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Encore\Admin\Show; |
4 | 4 | |
5 | -use Encore\Admin\Show; |
|
6 | -use Illuminate\Contracts\Support\Renderable; |
|
5 | +use Encore\Admin\Show; |
|
6 | +use Illuminate\Contracts\Support\Renderable; |
|
7 | 7 | use Illuminate\Support\Collection; |
8 | 8 | |
9 | 9 | class Panel implements Renderable |
@@ -2,16 +2,16 @@ |
||
2 | 2 | |
3 | 3 | namespace Encore\Admin\Show; |
4 | 4 | |
5 | -use Encore\Admin\Grid; |
|
6 | -use Encore\Admin\Show; |
|
7 | -use Illuminate\Contracts\Support\Renderable; |
|
8 | -use Illuminate\Database\Eloquent\Model; |
|
9 | -use Illuminate\Database\Eloquent\Relations\BelongsTo; |
|
10 | -use Illuminate\Database\Eloquent\Relations\BelongsToMany; |
|
11 | -use Illuminate\Database\Eloquent\Relations\HasMany; |
|
12 | -use Illuminate\Database\Eloquent\Relations\HasManyThrough; |
|
13 | -use Illuminate\Database\Eloquent\Relations\HasOne; |
|
14 | -use Illuminate\Database\Eloquent\Relations\MorphMany; |
|
5 | +use Encore\Admin\Grid; |
|
6 | +use Encore\Admin\Show; |
|
7 | +use Illuminate\Contracts\Support\Renderable; |
|
8 | +use Illuminate\Database\Eloquent\Model; |
|
9 | +use Illuminate\Database\Eloquent\Relations\BelongsTo; |
|
10 | +use Illuminate\Database\Eloquent\Relations\BelongsToMany; |
|
11 | +use Illuminate\Database\Eloquent\Relations\HasMany; |
|
12 | +use Illuminate\Database\Eloquent\Relations\HasManyThrough; |
|
13 | +use Illuminate\Database\Eloquent\Relations\HasOne; |
|
14 | +use Illuminate\Database\Eloquent\Relations\MorphMany; |
|
15 | 15 | use Illuminate\Database\Eloquent\Relations\MorphOne; |
16 | 16 | |
17 | 17 | class Relation extends Field |
@@ -289,7 +289,7 @@ |
||
289 | 289 | * |
290 | 290 | * @param Collection $tools |
291 | 291 | * |
292 | - * @return mixed |
|
292 | + * @return string |
|
293 | 293 | */ |
294 | 294 | protected function renderCustomTools($tools) |
295 | 295 | { |
@@ -2,9 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace Encore\Admin\Show; |
4 | 4 | |
5 | -use Encore\Admin\Admin; |
|
6 | -use Illuminate\Contracts\Support\Htmlable; |
|
7 | -use Illuminate\Contracts\Support\Renderable; |
|
5 | +use Encore\Admin\Admin; |
|
6 | +use Illuminate\Contracts\Support\Htmlable; |
|
7 | +use Illuminate\Contracts\Support\Renderable; |
|
8 | 8 | use Illuminate\Support\Collection; |
9 | 9 | |
10 | 10 | class Tools implements Renderable |
@@ -293,7 +293,7 @@ |
||
293 | 293 | */ |
294 | 294 | protected function renderCustomTools($tools) |
295 | 295 | { |
296 | - return $tools->map(function ($tool) { |
|
296 | + return $tools->map(function($tool) { |
|
297 | 297 | if ($tool instanceof Renderable) { |
298 | 298 | return $tool->render(); |
299 | 299 | } |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Encore\Admin\Traits; |
4 | 4 | |
5 | -use Encore\Admin\Form; |
|
6 | -use Encore\Admin\Grid; |
|
5 | +use Encore\Admin\Form; |
|
6 | +use Encore\Admin\Grid; |
|
7 | 7 | use Encore\Admin\Tree; |
8 | 8 | |
9 | 9 | /** |
@@ -2,9 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace Encore\Admin\Traits; |
4 | 4 | |
5 | -use Illuminate\Database\Eloquent\Model; |
|
6 | -use Illuminate\Support\Arr; |
|
7 | -use Illuminate\Support\Facades\DB; |
|
5 | +use Illuminate\Database\Eloquent\Model; |
|
6 | +use Illuminate\Support\Arr; |
|
7 | +use Illuminate\Support\Facades\DB; |
|
8 | 8 | use Illuminate\Support\Facades\Request; |
9 | 9 | |
10 | 10 | trait ModelTree |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | { |
198 | 198 | static::$branchOrder = array_flip(Arr::flatten($order)); |
199 | 199 | |
200 | - static::$branchOrder = array_map(function ($item) { |
|
200 | + static::$branchOrder = array_map(function($item) { |
|
201 | 201 | return ++$item; |
202 | 202 | }, static::$branchOrder); |
203 | 203 | } |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | { |
299 | 299 | parent::boot(); |
300 | 300 | |
301 | - static::saving(function (Model $branch) { |
|
301 | + static::saving(function(Model $branch) { |
|
302 | 302 | $parentColumn = $branch->getParentColumn(); |
303 | 303 | |
304 | 304 | if (Request::has($parentColumn) && Request::input($parentColumn) == $branch->getKey()) { |
@@ -31,7 +31,7 @@ |
||
31 | 31 | * Generate thumbnail URL. |
32 | 32 | * |
33 | 33 | * @param $image |
34 | - * @param $type |
|
34 | + * @param string $type |
|
35 | 35 | * |
36 | 36 | * @return string |
37 | 37 | */ |
@@ -320,7 +320,6 @@ |
||
320 | 320 | /** |
321 | 321 | * Return all items of the tree. |
322 | 322 | * |
323 | - * @param array $items |
|
324 | 323 | */ |
325 | 324 | public function getItems() |
326 | 325 | { |
@@ -2,9 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace Encore\Admin; |
4 | 4 | |
5 | -use Closure; |
|
6 | -use Encore\Admin\Tree\Tools; |
|
7 | -use Illuminate\Contracts\Support\Renderable; |
|
5 | +use Closure; |
|
6 | +use Encore\Admin\Tree\Tools; |
|
7 | +use Illuminate\Contracts\Support\Renderable; |
|
8 | 8 | use Illuminate\Database\Eloquent\Model; |
9 | 9 | |
10 | 10 | class Tree implements Renderable |
@@ -113,7 +113,7 @@ |
||
113 | 113 | protected function initBranchCallback() |
114 | 114 | { |
115 | 115 | if (is_null($this->branchCallback)) { |
116 | - $this->branchCallback = function ($branch) { |
|
116 | + $this->branchCallback = function($branch) { |
|
117 | 117 | $key = $branch[$this->model->getKeyName()]; |
118 | 118 | $title = $branch[$this->model->getTitleColumn()]; |
119 | 119 |
@@ -26,7 +26,6 @@ |
||
26 | 26 | /** |
27 | 27 | * Create a new Tools instance. |
28 | 28 | * |
29 | - * @param Builder $builder |
|
30 | 29 | */ |
31 | 30 | public function __construct(Tree $tree) |
32 | 31 | { |
@@ -2,9 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace Encore\Admin\Tree; |
4 | 4 | |
5 | -use Encore\Admin\Tree; |
|
6 | -use Illuminate\Contracts\Support\Htmlable; |
|
7 | -use Illuminate\Contracts\Support\Renderable; |
|
5 | +use Encore\Admin\Tree; |
|
6 | +use Illuminate\Contracts\Support\Htmlable; |
|
7 | +use Illuminate\Contracts\Support\Renderable; |
|
8 | 8 | use Illuminate\Support\Collection; |
9 | 9 | |
10 | 10 | class Tools implements Renderable |
@@ -55,7 +55,7 @@ |
||
55 | 55 | */ |
56 | 56 | public function render() |
57 | 57 | { |
58 | - return $this->tools->map(function ($tool) { |
|
58 | + return $this->tools->map(function($tool) { |
|
59 | 59 | if ($tool instanceof Renderable) { |
60 | 60 | return $tool->render(); |
61 | 61 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | /** |
25 | 25 | * Carousel constructor. |
26 | 26 | * |
27 | - * @param array $items |
|
27 | + * @param \Illuminate\Support\Collection $items |
|
28 | 28 | */ |
29 | 29 | public function __construct($items = []) |
30 | 30 | { |