@@ -236,7 +236,7 @@ |
||
236 | 236 | public static function import() |
237 | 237 | { |
238 | 238 | $extension = static::getInstance(); |
239 | - DB::transaction(function () use ($extension) { |
|
239 | + DB::transaction(function() use ($extension) { |
|
240 | 240 | if ($menu = $extension->menu()) { |
241 | 241 | if ($extension->validateMenu($menu)) { |
242 | 242 | extract($menu); |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | /** |
10 | 10 | * Get all permissions of user. |
11 | 11 | * |
12 | - * @return mixed |
|
12 | + * @return Collection |
|
13 | 13 | */ |
14 | 14 | public function allPermissions(): Collection |
15 | 15 | { |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | /** |
20 | 20 | * Check if user has permission. |
21 | 21 | * |
22 | - * @param $ability |
|
22 | + * @param string $ability |
|
23 | 23 | * @param array $arguments |
24 | 24 | * |
25 | 25 | * @return bool |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | /** |
57 | 57 | * Check if user is administrator. |
58 | 58 | * |
59 | - * @return mixed |
|
59 | + * @return boolean |
|
60 | 60 | */ |
61 | 61 | public function isAdministrator(): bool |
62 | 62 | { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * |
69 | 69 | * @param string $role |
70 | 70 | * |
71 | - * @return mixed |
|
71 | + * @return boolean |
|
72 | 72 | */ |
73 | 73 | public function isRole(string $role): bool |
74 | 74 | { |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * |
81 | 81 | * @param array $roles |
82 | 82 | * |
83 | - * @return mixed |
|
83 | + * @return boolean |
|
84 | 84 | */ |
85 | 85 | public function inRoles(array $roles = []): bool |
86 | 86 | { |
@@ -303,7 +303,7 @@ |
||
303 | 303 | * |
304 | 304 | * @param string $target |
305 | 305 | * |
306 | - * @return mixed |
|
306 | + * @return string |
|
307 | 307 | */ |
308 | 308 | protected function getClass($target): string |
309 | 309 | { |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | return $content |
27 | 27 | ->title(trans('admin.menu')) |
28 | 28 | ->description(trans('admin.list')) |
29 | - ->row(function (Row $row) { |
|
29 | + ->row(function(Row $row) { |
|
30 | 30 | $row->column(6, $this->treeView()->render()); |
31 | 31 | |
32 | - $row->column(6, function (Column $column) { |
|
32 | + $row->column(6, function(Column $column) { |
|
33 | 33 | $form = new \Encore\Admin\Widgets\Form(); |
34 | 34 | $form->action(admin_url('auth/menu')); |
35 | 35 | |
@@ -71,10 +71,10 @@ discard block |
||
71 | 71 | { |
72 | 72 | $menuModel = config('admin.database.menu_model'); |
73 | 73 | |
74 | - return $menuModel::tree(function (Tree $tree) { |
|
74 | + return $menuModel::tree(function(Tree $tree) { |
|
75 | 75 | $tree->disableCreate(); |
76 | 76 | |
77 | - $tree->branch(function ($branch) { |
|
77 | + $tree->branch(function($branch) { |
|
78 | 78 | $payload = "<i class='{$branch['icon']}'></i> <strong>{$branch['title']}</strong>"; |
79 | 79 | |
80 | 80 | if (!isset($branch['children'])) { |