@@ -55,7 +55,7 @@ |
||
55 | 55 | /** |
56 | 56 | * Returns builder is $mode. |
57 | 57 | * |
58 | - * @param $mode |
|
58 | + * @param string $mode |
|
59 | 59 | * |
60 | 60 | * @return bool |
61 | 61 | */ |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | */ |
250 | 250 | public function field($name) |
251 | 251 | { |
252 | - return $this->fields()->first(function (Field $field) use ($name) { |
|
252 | + return $this->fields()->first(function(Field $field) use ($name) { |
|
253 | 253 | return $field->column() == $name; |
254 | 254 | }); |
255 | 255 | } |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | $this->form->model()->getUpdatedAtColumn(), |
491 | 491 | ]; |
492 | 492 | |
493 | - $this->fields = $this->fields()->reject(function (Field $field) use ($reservedColumns) { |
|
493 | + $this->fields = $this->fields()->reject(function(Field $field) use ($reservedColumns) { |
|
494 | 494 | return in_array($field->column(), $reservedColumns); |
495 | 495 | }); |
496 | 496 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | |
55 | 55 | $this->value = array_get($inputs, $this->column); |
56 | 56 | |
57 | - $value = array_filter($this->value, function ($val) { |
|
57 | + $value = array_filter($this->value, function($val) { |
|
58 | 58 | return $val !== ''; |
59 | 59 | }); |
60 | 60 |
@@ -158,7 +158,7 @@ |
||
158 | 158 | |
159 | 159 | list($relation, $args[0]) = explode('.', $this->column); |
160 | 160 | |
161 | - return ['whereHas' => [$relation, function ($relation) use ($args) { |
|
161 | + return ['whereHas' => [$relation, function($relation) use ($args) { |
|
162 | 162 | call_user_func_array([$relation, $this->query], $args); |
163 | 163 | }]]; |
164 | 164 | } |
@@ -331,7 +331,7 @@ |
||
331 | 331 | * |
332 | 332 | * @param Presenter $presenter |
333 | 333 | * |
334 | - * @return mixed |
|
334 | + * @return Presenter |
|
335 | 335 | */ |
336 | 336 | protected function setPresenter(Presenter $presenter) |
337 | 337 | { |
@@ -134,7 +134,7 @@ |
||
134 | 134 | public function style($style) |
135 | 135 | { |
136 | 136 | if (is_array($style)) { |
137 | - $style = implode('', array_map(function ($key, $val) { |
|
137 | + $style = implode('', array_map(function($key, $val) { |
|
138 | 138 | return "$key:$val"; |
139 | 139 | }, array_keys($style), array_values($style))); |
140 | 140 | } |
@@ -64,7 +64,7 @@ |
||
64 | 64 | return $this->style([$styles]); |
65 | 65 | } |
66 | 66 | |
67 | - $styles = array_map(function ($style) { |
|
67 | + $styles = array_map(function($style) { |
|
68 | 68 | return 'box-'.$style; |
69 | 69 | }, $styles); |
70 | 70 |
@@ -117,7 +117,7 @@ |
||
117 | 117 | /** |
118 | 118 | * Add form attributes. |
119 | 119 | * |
120 | - * @param string|array $attr |
|
120 | + * @param string $attr |
|
121 | 121 | * @param string $value |
122 | 122 | * |
123 | 123 | * @return $this |
@@ -162,7 +162,7 @@ |
||
162 | 162 | */ |
163 | 163 | public function setWidth($fieldWidth = 8, $labelWidth = 2) |
164 | 164 | { |
165 | - collect($this->fields)->each(function ($field) use ($fieldWidth, $labelWidth) { |
|
165 | + collect($this->fields)->each(function($field) use ($fieldWidth, $labelWidth) { |
|
166 | 166 | /* @var Field $field */ |
167 | 167 | $field->setWidth($fieldWidth, $labelWidth); |
168 | 168 | }); |
@@ -25,7 +25,7 @@ |
||
25 | 25 | /** |
26 | 26 | * Execute the console command. |
27 | 27 | * |
28 | - * @return void |
|
28 | + * @return false|null |
|
29 | 29 | */ |
30 | 30 | public function handle() |
31 | 31 | { |
@@ -131,7 +131,7 @@ |
||
131 | 131 | /** |
132 | 132 | * Get options of HTTP methods select field. |
133 | 133 | * |
134 | - * @return array |
|
134 | + * @return callable |
|
135 | 135 | */ |
136 | 136 | protected function getHttpMethodsOptions() |
137 | 137 | { |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | */ |
22 | 22 | public function index() |
23 | 23 | { |
24 | - return Admin::content(function (Content $content) { |
|
24 | + return Admin::content(function(Content $content) { |
|
25 | 25 | $content->header(trans('admin.permissions')); |
26 | 26 | $content->description(trans('admin.list')); |
27 | 27 | $content->body($this->grid()->render()); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function edit($id) |
39 | 39 | { |
40 | - return Admin::content(function (Content $content) use ($id) { |
|
40 | + return Admin::content(function(Content $content) use ($id) { |
|
41 | 41 | $content->header(trans('admin.permissions')); |
42 | 42 | $content->description(trans('admin.edit')); |
43 | 43 | $content->body($this->form()->edit($id)); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function create() |
53 | 53 | { |
54 | - return Admin::content(function (Content $content) { |
|
54 | + return Admin::content(function(Content $content) { |
|
55 | 55 | $content->header(trans('admin.permissions')); |
56 | 56 | $content->description(trans('admin.create')); |
57 | 57 | $content->body($this->form()); |
@@ -65,13 +65,13 @@ discard block |
||
65 | 65 | */ |
66 | 66 | protected function grid() |
67 | 67 | { |
68 | - return Admin::grid(Permission::class, function (Grid $grid) { |
|
68 | + return Admin::grid(Permission::class, function(Grid $grid) { |
|
69 | 69 | $grid->id('ID')->sortable(); |
70 | 70 | $grid->slug(trans('admin.slug')); |
71 | 71 | $grid->name(trans('admin.name')); |
72 | 72 | |
73 | - $grid->http_path(trans('admin.route'))->display(function ($path) { |
|
74 | - return collect(explode("\r\n", $path))->map(function ($path) { |
|
73 | + $grid->http_path(trans('admin.route'))->display(function($path) { |
|
74 | + return collect(explode("\r\n", $path))->map(function($path) { |
|
75 | 75 | $method = $this->http_method ?: ['ANY']; |
76 | 76 | |
77 | 77 | if (Str::contains($path, ':')) { |
@@ -79,9 +79,9 @@ discard block |
||
79 | 79 | $method = explode(',', $method); |
80 | 80 | } |
81 | 81 | |
82 | - $method = collect($method)->map(function ($name) { |
|
82 | + $method = collect($method)->map(function($name) { |
|
83 | 83 | return strtoupper($name); |
84 | - })->map(function ($name) { |
|
84 | + })->map(function($name) { |
|
85 | 85 | return "<span class='label label-primary'>{$name}</span>"; |
86 | 86 | })->implode(' '); |
87 | 87 | |
@@ -94,8 +94,8 @@ discard block |
||
94 | 94 | $grid->created_at(trans('admin.created_at')); |
95 | 95 | $grid->updated_at(trans('admin.updated_at')); |
96 | 96 | |
97 | - $grid->tools(function (Grid\Tools $tools) { |
|
98 | - $tools->batch(function (Grid\Tools\BatchActions $actions) { |
|
97 | + $grid->tools(function(Grid\Tools $tools) { |
|
98 | + $tools->batch(function(Grid\Tools\BatchActions $actions) { |
|
99 | 99 | $actions->disableDelete(); |
100 | 100 | }); |
101 | 101 | }); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | public function form() |
111 | 111 | { |
112 | - return Admin::form(Permission::class, function (Form $form) { |
|
112 | + return Admin::form(Permission::class, function(Form $form) { |
|
113 | 113 | $form->display('id', 'ID'); |
114 | 114 | |
115 | 115 | $form->text('slug', trans('admin.slug'))->rules('required'); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | * |
22 | 22 | * @param array|callable|string $options |
23 | 23 | * |
24 | - * @return $this|mixed |
|
24 | + * @return Checkbox |
|
25 | 25 | */ |
26 | 26 | public function options($options = []) |
27 | 27 | { |