Completed
Push — master ( 3dffbe...107a25 )
by Song
04:08
created
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
             if (is_null($value)) {
317 317
                 return $default;
318 318
             }
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
         $grid = $this->grid;
429 429
         $column = $this;
430 430
 
431
-        $this->display(function ($value) use ($grid, $column, $class) {
431
+        $this->display(function($value) use ($grid, $column, $class) {
432 432
             $definition = new $class($value, $grid, $column, $this);
433 433
 
434 434
             return $definition->display();
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
     protected function htmlEntityEncode($item)
446 446
     {
447 447
         if (is_array($item)) {
448
-            array_walk_recursive($item, function (&$value) {
448
+            array_walk_recursive($item, function(&$value) {
449 449
                 $value = htmlentities($value);
450 450
             });
451 451
         } else {
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
      */
526 526
     protected function callSupportDisplayer($abstract, $arguments)
527 527
     {
528
-        return $this->display(function ($value) use ($abstract, $arguments) {
528
+        return $this->display(function($value) use ($abstract, $arguments) {
529 529
             if (is_array($value) || $value instanceof Arrayable) {
530 530
                 return call_user_func_array([collect($value), $abstract], $arguments);
531 531
             }
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
     protected function callBuiltinDisplayer($abstract, $arguments)
550 550
     {
551 551
         if ($abstract instanceof Closure) {
552
-            return $this->display(function ($value) use ($abstract, $arguments) {
552
+            return $this->display(function($value) use ($abstract, $arguments) {
553 553
                 return $abstract->call($this, ...array_merge([$value], $arguments));
554 554
             });
555 555
         }
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
             $grid = $this->grid;
559 559
             $column = $this;
560 560
 
561
-            return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) {
561
+            return $this->display(function($value) use ($abstract, $grid, $column, $arguments) {
562 562
                 $displayer = new $abstract($value, $grid, $column, $this);
563 563
 
564 564
                 return call_user_func_array([$displayer, 'display'], $arguments);
Please login to merge, or discard this patch.
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
             if (is_null($value)) {
148 148
                 return $default;
149 149
             }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      */
164 164
     public function image($server = '', $width = 200, $height = 200)
165 165
     {
166
-        return $this->as(function ($path) use ($server, $width, $height) {
166
+        return $this->as(function($path) use ($server, $width, $height) {
167 167
             if (url()->isValidUrl($path)) {
168 168
                 $src = $path;
169 169
             } elseif ($server) {
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      */
187 187
     public function link($href = '', $target = '_blank')
188 188
     {
189
-        return $this->as(function ($link) use ($href, $target) {
189
+        return $this->as(function($link) use ($href, $target) {
190 190
             $href = $href ?: $link;
191 191
 
192 192
             return "<a href='$href' target='{$target}'>{$link}</a>";
@@ -202,12 +202,12 @@  discard block
 block discarded – undo
202 202
      */
203 203
     public function label($style = 'success')
204 204
     {
205
-        return $this->as(function ($value) use ($style) {
205
+        return $this->as(function($value) use ($style) {
206 206
             if ($value instanceof Arrayable) {
207 207
                 $value = $value->toArray();
208 208
             }
209 209
 
210
-            return collect((array) $value)->map(function ($name) use ($style) {
210
+            return collect((array) $value)->map(function($name) use ($style) {
211 211
                 return "<span class='label label-{$style}'>$name</span>";
212 212
             })->implode('&nbsp;');
213 213
         });
@@ -222,12 +222,12 @@  discard block
 block discarded – undo
222 222
      */
223 223
     public function badge($style = 'blue')
224 224
     {
225
-        return $this->as(function ($value) use ($style) {
225
+        return $this->as(function($value) use ($style) {
226 226
             if ($value instanceof Arrayable) {
227 227
                 $value = $value->toArray();
228 228
             }
229 229
 
230
-            return collect((array) $value)->map(function ($name) use ($style) {
230
+            return collect((array) $value)->map(function($name) use ($style) {
231 231
                 return "<span class='badge bg-{$style}'>$name</span>";
232 232
             })->implode('&nbsp;');
233 233
         });
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
     public function render()
294 294
     {
295 295
         if ($this->showAs->isNotEmpty()) {
296
-            $this->showAs->each(function ($callable) {
296
+            $this->showAs->each(function($callable) {
297 297
                 $this->value = $callable->call(
298 298
                     $this->parent->getModel(),
299 299
                     $this->value
Please login to merge, or discard this patch.