Completed
Push — master ( 68b94f...3dffbe )
by Song
03:57
created
src/Show/Field.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      */
144 144
     public function using(array $values, $default = null)
145 145
     {
146
-        return $this->as(function ($value) use ($values, $default) {
146
+        return $this->as(function($value) use ($values, $default) {
147 147
             return array_get($values, $value, $default);
148 148
         });
149 149
     }
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      */
160 160
     public function image($server = '', $width = 200, $height = 200)
161 161
     {
162
-        return $this->as(function ($path) use ($server, $width, $height) {
162
+        return $this->as(function($path) use ($server, $width, $height) {
163 163
             if (url()->isValidUrl($path)) {
164 164
                 $src = $path;
165 165
             } elseif ($server) {
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
      */
183 183
     public function link($href = '', $target = '_blank')
184 184
     {
185
-        return $this->as(function ($link) use ($href, $target) {
185
+        return $this->as(function($link) use ($href, $target) {
186 186
             $href = $href ?: $link;
187 187
 
188 188
             return "<a href='$href' target='{$target}'>{$link}</a>";
@@ -198,12 +198,12 @@  discard block
 block discarded – undo
198 198
      */
199 199
     public function label($style = 'success')
200 200
     {
201
-        return $this->as(function ($value) use ($style) {
201
+        return $this->as(function($value) use ($style) {
202 202
             if ($value instanceof Arrayable) {
203 203
                 $value = $value->toArray();
204 204
             }
205 205
 
206
-            return collect((array) $value)->map(function ($name) use ($style) {
206
+            return collect((array) $value)->map(function($name) use ($style) {
207 207
                 return "<span class='label label-{$style}'>$name</span>";
208 208
             })->implode('&nbsp;');
209 209
         });
@@ -218,12 +218,12 @@  discard block
 block discarded – undo
218 218
      */
219 219
     public function badge($style = 'blue')
220 220
     {
221
-        return $this->as(function ($value) use ($style) {
221
+        return $this->as(function($value) use ($style) {
222 222
             if ($value instanceof Arrayable) {
223 223
                 $value = $value->toArray();
224 224
             }
225 225
 
226
-            return collect((array) $value)->map(function ($name) use ($style) {
226
+            return collect((array) $value)->map(function($name) use ($style) {
227 227
                 return "<span class='badge bg-{$style}'>$name</span>";
228 228
             })->implode('&nbsp;');
229 229
         });
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     public function render()
290 290
     {
291 291
         if ($this->showAs->isNotEmpty()) {
292
-            $this->showAs->each(function ($callable) {
292
+            $this->showAs->each(function($callable) {
293 293
                 $this->value = $callable->call(
294 294
                     $this->parent->getModel(),
295 295
                     $this->value
Please login to merge, or discard this patch.
src/Grid/Column.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
      */
313 313
     public function using(array $values, $default = null)
314 314
     {
315
-        return $this->display(function ($value) use ($values, $default) {
315
+        return $this->display(function($value) use ($values, $default) {
316 316
             return array_get($values, $value, $default);
317 317
         });
318 318
     }
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
         $grid = $this->grid;
425 425
         $column = $this;
426 426
 
427
-        $this->display(function ($value) use ($grid, $column, $class) {
427
+        $this->display(function($value) use ($grid, $column, $class) {
428 428
             $definition = new $class($value, $grid, $column, $this);
429 429
 
430 430
             return $definition->display();
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
     protected function htmlEntityEncode($item)
442 442
     {
443 443
         if (is_array($item)) {
444
-            array_walk_recursive($item, function (&$value) {
444
+            array_walk_recursive($item, function(&$value) {
445 445
                 $value = htmlentities($value);
446 446
             });
447 447
         } else {
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
      */
522 522
     protected function callSupportDisplayer($abstract, $arguments)
523 523
     {
524
-        return $this->display(function ($value) use ($abstract, $arguments) {
524
+        return $this->display(function($value) use ($abstract, $arguments) {
525 525
             if (is_array($value) || $value instanceof Arrayable) {
526 526
                 return call_user_func_array([collect($value), $abstract], $arguments);
527 527
             }
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
     protected function callBuiltinDisplayer($abstract, $arguments)
546 546
     {
547 547
         if ($abstract instanceof Closure) {
548
-            return $this->display(function ($value) use ($abstract, $arguments) {
548
+            return $this->display(function($value) use ($abstract, $arguments) {
549 549
                 return $abstract->call($this, ...array_merge([$value], $arguments));
550 550
             });
551 551
         }
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
             $grid = $this->grid;
555 555
             $column = $this;
556 556
 
557
-            return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) {
557
+            return $this->display(function($value) use ($abstract, $grid, $column, $arguments) {
558 558
                 $displayer = new $abstract($value, $grid, $column, $this);
559 559
 
560 560
                 return call_user_func_array([$displayer, 'display'], $arguments);
Please login to merge, or discard this patch.