@@ -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 | */ |
@@ -288,7 +288,7 @@ |
||
288 | 288 | return ''; |
289 | 289 | } |
290 | 290 | |
291 | - return $tools->map(function ($tool) { |
|
291 | + return $tools->map(function($tool) { |
|
292 | 292 | if ($tool instanceof Renderable) { |
293 | 293 | return $tool->render(); |
294 | 294 | } |
@@ -275,7 +275,7 @@ |
||
275 | 275 | */ |
276 | 276 | protected function renderCustomTools($tools) |
277 | 277 | { |
278 | - return $tools->map(function ($tool) { |
|
278 | + return $tools->map(function($tool) { |
|
279 | 279 | if ($tool instanceof Renderable) { |
280 | 280 | return $tool->render(); |
281 | 281 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | */ |
151 | 151 | public function using(array $values, $default = null) |
152 | 152 | { |
153 | - return $this->as(function ($value) use ($values, $default) { |
|
153 | + return $this->as(function($value) use ($values, $default) { |
|
154 | 154 | if (is_null($value)) { |
155 | 155 | return $default; |
156 | 156 | } |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | */ |
171 | 171 | public function image($server = '', $width = 200, $height = 200) |
172 | 172 | { |
173 | - return $this->as(function ($path) use ($server, $width, $height) { |
|
173 | + return $this->as(function($path) use ($server, $width, $height) { |
|
174 | 174 | if (url()->isValidUrl($path)) { |
175 | 175 | $src = $path; |
176 | 176 | } elseif ($server) { |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | */ |
194 | 194 | public function link($href = '', $target = '_blank') |
195 | 195 | { |
196 | - return $this->as(function ($link) use ($href, $target) { |
|
196 | + return $this->as(function($link) use ($href, $target) { |
|
197 | 197 | $href = $href ?: $link; |
198 | 198 | |
199 | 199 | return "<a href='$href' target='{$target}'>{$link}</a>"; |
@@ -209,12 +209,12 @@ discard block |
||
209 | 209 | */ |
210 | 210 | public function label($style = 'success') |
211 | 211 | { |
212 | - return $this->as(function ($value) use ($style) { |
|
212 | + return $this->as(function($value) use ($style) { |
|
213 | 213 | if ($value instanceof Arrayable) { |
214 | 214 | $value = $value->toArray(); |
215 | 215 | } |
216 | 216 | |
217 | - return collect((array) $value)->map(function ($name) use ($style) { |
|
217 | + return collect((array) $value)->map(function($name) use ($style) { |
|
218 | 218 | return "<span class='label label-{$style}'>$name</span>"; |
219 | 219 | })->implode(' '); |
220 | 220 | }); |
@@ -229,12 +229,12 @@ discard block |
||
229 | 229 | */ |
230 | 230 | public function badge($style = 'blue') |
231 | 231 | { |
232 | - return $this->as(function ($value) use ($style) { |
|
232 | + return $this->as(function($value) use ($style) { |
|
233 | 233 | if ($value instanceof Arrayable) { |
234 | 234 | $value = $value->toArray(); |
235 | 235 | } |
236 | 236 | |
237 | - return collect((array) $value)->map(function ($name) use ($style) { |
|
237 | + return collect((array) $value)->map(function($name) use ($style) { |
|
238 | 238 | return "<span class='badge bg-{$style}'>$name</span>"; |
239 | 239 | })->implode(' '); |
240 | 240 | }); |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | { |
250 | 250 | $field = $this; |
251 | 251 | |
252 | - return $this->as(function ($value) use ($field) { |
|
252 | + return $this->as(function($value) use ($field) { |
|
253 | 253 | |
254 | 254 | $content = json_decode($value, true); |
255 | 255 | |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | public function render() |
339 | 339 | { |
340 | 340 | if ($this->showAs->isNotEmpty()) { |
341 | - $this->showAs->each(function ($callable) { |
|
341 | + $this->showAs->each(function($callable) { |
|
342 | 342 | $this->value = $callable->call( |
343 | 343 | $this->parent->getModel(), |
344 | 344 | $this->value |