@@ -46,7 +46,7 @@ |
||
46 | 46 | /** |
47 | 47 | * Setting default shown columns on grid. |
48 | 48 | * |
49 | - * @param array|string $columns |
|
49 | + * @param string $columns |
|
50 | 50 | * |
51 | 51 | * @return $this |
52 | 52 | */ |
@@ -72,8 +72,7 @@ discard block |
||
72 | 72 | { |
73 | 73 | $columns = explode(',', request(ColumnSelector::SELECT_COLUMN_NAME)); |
74 | 74 | |
75 | - return array_filter($columns) ?: |
|
76 | - array_values(array_diff($this->columnNames, $this->hiddenColumns)); |
|
75 | + return array_filter($columns) ?: array_values(array_diff($this->columnNames, $this->hiddenColumns)); |
|
77 | 76 | } |
78 | 77 | |
79 | 78 | /** |
@@ -91,7 +90,7 @@ discard block |
||
91 | 90 | |
92 | 91 | array_push($visible, Grid\Column::SELECT_COLUMN_NAME, Grid\Column::ACTION_COLUMN_NAME); |
93 | 92 | |
94 | - return $this->columns->filter(function (Grid\Column $column) use ($visible) { |
|
93 | + return $this->columns->filter(function(Grid\Column $column) use ($visible) { |
|
95 | 94 | return in_array($column->getName(), $visible); |
96 | 95 | }); |
97 | 96 | } |
@@ -111,7 +110,7 @@ discard block |
||
111 | 110 | |
112 | 111 | array_push($visible, Grid\Column::SELECT_COLUMN_NAME, Grid\Column::ACTION_COLUMN_NAME); |
113 | 112 | |
114 | - return collect($this->columnNames)->filter(function ($column) use ($visible) { |
|
113 | + return collect($this->columnNames)->filter(function($column) use ($visible) { |
|
115 | 114 | return in_array($column, $visible); |
116 | 115 | })->toArray(); |
117 | 116 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | */ |
62 | 62 | public function render() |
63 | 63 | { |
64 | - $columns = $this->getGrid()->visibleColumns()->flatMap(function (Column $column) { |
|
64 | + $columns = $this->getGrid()->visibleColumns()->flatMap(function(Column $column) { |
|
65 | 65 | $name = $column->getName(); |
66 | 66 | |
67 | 67 | $total = ''; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function disableFilterButton(bool $disable = true) |
86 | 86 | { |
87 | - $this->tools = $this->tools->map(function ($tool) use ($disable) { |
|
87 | + $this->tools = $this->tools->map(function($tool) use ($disable) { |
|
88 | 88 | if ($tool instanceof FilterButton) { |
89 | 89 | return $tool->disable($disable); |
90 | 90 | } |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public function disableBatchActions(bool $disable = true) |
114 | 114 | { |
115 | - $this->tools = $this->tools->map(function ($tool) use ($disable) { |
|
115 | + $this->tools = $this->tools->map(function($tool) use ($disable) { |
|
116 | 116 | if ($tool instanceof BatchActions) { |
117 | 117 | return $tool->disable($disable); |
118 | 118 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | */ |
127 | 127 | public function batch(\Closure $closure) |
128 | 128 | { |
129 | - call_user_func($closure, $this->tools->first(function ($tool) { |
|
129 | + call_user_func($closure, $this->tools->first(function($tool) { |
|
130 | 130 | return $tool instanceof BatchActions; |
131 | 131 | })); |
132 | 132 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function render() |
140 | 140 | { |
141 | - return $this->tools->map(function ($tool) { |
|
141 | + return $this->tools->map(function($tool) { |
|
142 | 142 | if ($tool instanceof AbstractTool) { |
143 | 143 | if (!$tool->allowed()) { |
144 | 144 | return ''; |
@@ -75,7 +75,7 @@ |
||
75 | 75 | $this->right(new RefreshButton()); |
76 | 76 | } |
77 | 77 | |
78 | - return $this->elements[$part]->map(function ($element) { |
|
78 | + return $this->elements[$part]->map(function($element) { |
|
79 | 79 | if ($element instanceof Htmlable) { |
80 | 80 | return $element->toHtml(); |
81 | 81 | } |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | * @param array $replace |
162 | 162 | * @param string $locale |
163 | 163 | * |
164 | - * @return \Illuminate\Contracts\Translation\Translator|string|array|null |
|
164 | + * @return string|null |
|
165 | 165 | */ |
166 | 166 | function admin_trans($key = null, $replace = [], $locale = null) |
167 | 167 | { |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | * Delete from array by value. |
182 | 182 | * |
183 | 183 | * @param array $array |
184 | - * @param mixed $value |
|
184 | + * @param string $value |
|
185 | 185 | */ |
186 | 186 | function array_delete(&$array, $value) |
187 | 187 | { |
@@ -250,15 +250,15 @@ |
||
250 | 250 | function file_size($bytes) |
251 | 251 | { |
252 | 252 | if ($bytes >= 1073741824) { |
253 | - $bytes = number_format($bytes / 1073741824, 2) . ' GB'; |
|
253 | + $bytes = number_format($bytes / 1073741824, 2).' GB'; |
|
254 | 254 | } elseif ($bytes >= 1048576) { |
255 | - $bytes = number_format($bytes / 1048576, 2) . ' MB'; |
|
255 | + $bytes = number_format($bytes / 1048576, 2).' MB'; |
|
256 | 256 | } elseif ($bytes >= 1024) { |
257 | - $bytes = number_format($bytes / 1024, 2) . ' KB'; |
|
257 | + $bytes = number_format($bytes / 1024, 2).' KB'; |
|
258 | 258 | } elseif ($bytes > 1) { |
259 | - $bytes = $bytes . ' bytes'; |
|
259 | + $bytes = $bytes.' bytes'; |
|
260 | 260 | } elseif ($bytes == 1) { |
261 | - $bytes = $bytes . ' byte'; |
|
261 | + $bytes = $bytes.' byte'; |
|
262 | 262 | } else { |
263 | 263 | $bytes = '0 bytes'; |
264 | 264 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | Arr::forget($query, HasSearchBar::$searchKey); |
23 | 23 | |
24 | 24 | $vars = [ |
25 | - 'action' => request()->url() . '?' . http_build_query($query), |
|
25 | + 'action' => request()->url().'?'.http_build_query($query), |
|
26 | 26 | 'key' => HasSearchBar::$searchKey, |
27 | 27 | 'value' => request(HasSearchBar::$searchKey), |
28 | 28 | ]; |
@@ -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 | */ |