@@ -13,7 +13,7 @@ |
||
13 | 13 | * @param array $forms |
14 | 14 | * @param null $active |
15 | 15 | * |
16 | - * @return mixed |
|
16 | + * @return ContainsForms |
|
17 | 17 | */ |
18 | 18 | public static function forms($forms, $active = null) |
19 | 19 | { |
@@ -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 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | $tree->disableCreate(); |
77 | 77 | |
78 | - $tree->branch(function ($branch) { |
|
78 | + $tree->branch(function($branch) { |
|
79 | 79 | $payload = "<i class='fa {$branch['icon']}'></i> <strong>{$branch['title']}</strong>"; |
80 | 80 | |
81 | 81 | if (!isset($branch['children'])) { |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | |
155 | 155 | // for create or update |
156 | 156 | if ($this->pathColumn) { |
157 | - $targets = array_map(function ($target) { |
|
157 | + $targets = array_map(function($target) { |
|
158 | 158 | return [$this->pathColumn => $target]; |
159 | 159 | }, $targets); |
160 | 160 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | { |
186 | 186 | $this->name = $this->getStoreName($file); |
187 | 187 | |
188 | - return tap($this->upload($file), function () { |
|
188 | + return tap($this->upload($file), function() { |
|
189 | 189 | $this->name = null; |
190 | 190 | }); |
191 | 191 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | ]; |
30 | 30 | |
31 | 31 | try { |
32 | - DB::transaction(function () use ($model) { |
|
32 | + DB::transaction(function() use ($model) { |
|
33 | 33 | $model->delete(); |
34 | 34 | }); |
35 | 35 | } catch (\Exception $exception) { |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $this->disablePagination(); |
87 | 87 | } |
88 | 88 | |
89 | - $this->tools(function (Tools $tools) { |
|
89 | + $this->tools(function(Tools $tools) { |
|
90 | 90 | $tools->append(new Grid\Selectable\BrowserBtn()); |
91 | 91 | }); |
92 | 92 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $hide = $hide ? 'hide' : ''; |
99 | 99 | $key = $this->key; |
100 | 100 | |
101 | - $this->column('__remove__', ' ')->display(function () use ($hide, $key) { |
|
101 | + $this->column('__remove__', ' ')->display(function() use ($hide, $key) { |
|
102 | 102 | return <<<BTN |
103 | 103 | <a href="javascript:void(0);" class="grid-row-remove {$hide}" data-key="{$this->getAttribute($key)}"> |
104 | 104 | <i class="fa fa-trash"></i> |
@@ -67,7 +67,6 @@ |
||
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
70 | - * @param bool $multiple |
|
71 | 70 | * |
72 | 71 | * @return string |
73 | 72 | */ |
@@ -57,6 +57,10 @@ |
||
57 | 57 | }); |
58 | 58 | } |
59 | 59 | |
60 | + /** |
|
61 | + * @param string $title |
|
62 | + * @param \Illuminate\Support\Collection $diff |
|
63 | + */ |
|
60 | 64 | protected function printDiff($title, $diff, $error = false) |
61 | 65 | { |
62 | 66 | if ($diff->isEmpty()) { |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | { |
53 | 53 | return collect(Arr::dot($from)) |
54 | 54 | ->keys() |
55 | - ->reject(function ($key) use ($to) { |
|
55 | + ->reject(function($key) use ($to) { |
|
56 | 56 | return Arr::has($to, $key); |
57 | 57 | }); |
58 | 58 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $this->line(''); |
67 | 67 | $this->comment("{$title}:"); |
68 | 68 | |
69 | - $diff->each(function ($key) use ($error) { |
|
69 | + $diff->each(function($key) use ($error) { |
|
70 | 70 | if ($error) { |
71 | 71 | $this->error(" {$key}"); |
72 | 72 | } else { |
@@ -315,7 +315,7 @@ |
||
315 | 315 | } |
316 | 316 | |
317 | 317 | /** |
318 | - * @param $component |
|
318 | + * @param string $component |
|
319 | 319 | */ |
320 | 320 | public static function component($component, $data = []) |
321 | 321 | { |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | $script = collect(static::$script) |
234 | 234 | ->merge(static::$deferredScript) |
235 | 235 | ->unique() |
236 | - ->map(function ($line) { |
|
236 | + ->map(function($line) { |
|
237 | 237 | return $line; |
238 | 238 | //@see https://stackoverflow.com/questions/19509863/how-to-remove-js-comments-using-php |
239 | 239 | $pattern = '/(?:(?:\/\*(?:[^*]|(?:\*+[^*\/]))*\*+\/)|(?:(?<!\:|\\\|\')\/\/.*))/'; |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | |
259 | 259 | $style = collect(static::$style) |
260 | 260 | ->unique() |
261 | - ->map(function ($line) { |
|
261 | + ->map(function($line) { |
|
262 | 262 | return preg_replace('/\s+/', ' ', $line); |
263 | 263 | }); |
264 | 264 |
@@ -59,7 +59,6 @@ |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
62 | - * @param string $wrap |
|
63 | 62 | */ |
64 | 63 | protected function addPickBtn($btn) |
65 | 64 | { |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $this->value = json_encode($this->value, JSON_PRETTY_PRINT); |
49 | 49 | } |
50 | 50 | |
51 | - $this->mountPicker(function ($btn) { |
|
51 | + $this->mountPicker(function($btn) { |
|
52 | 52 | $this->addPickBtn($btn); |
53 | 53 | }); |
54 | 54 |
@@ -55,7 +55,6 @@ |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
58 | - * @param int $multiple |
|
59 | 58 | * |
60 | 59 | * @return string |
61 | 60 | */ |
@@ -125,7 +125,7 @@ |
||
125 | 125 | $value = explode($this->separator, $value); |
126 | 126 | } |
127 | 127 | |
128 | - return collect(Arr::wrap($value))->map(function ($item) use ($field) { |
|
128 | + return collect(Arr::wrap($value))->map(function($item) use ($field) { |
|
129 | 129 | return [ |
130 | 130 | 'url' => $this->field->objectUrl($item), |
131 | 131 | 'value' => $item, |