Completed
Push — master ( b50b45...3d945d )
by Song
02:38
created
src/Grid/Column.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -309,13 +309,13 @@  discard block
 block discarded – undo
309 309
      * @param array $arguments
310 310
      * @return Column
311 311
      */
312
-    public function displayUsing($abstract, $arguments =[])
312
+    public function displayUsing($abstract, $arguments = [])
313 313
     {
314 314
         $grid = $this->grid;
315 315
 
316 316
         $column = $this;
317 317
 
318
-        return $this->display(function ($value) use ($grid, $column, $abstract, $arguments) {
318
+        return $this->display(function($value) use ($grid, $column, $abstract, $arguments) {
319 319
             /** @var AbstractDisplayer $displayer */
320 320
             $displayer = new $abstract($value, $grid, $column, $this);
321 321
 
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
      */
334 334
     public function using(array $values, $default = null)
335 335
     {
336
-        return $this->display(function ($value) use ($values, $default) {
336
+        return $this->display(function($value) use ($values, $default) {
337 337
             if (is_null($value)) {
338 338
                 return $default;
339 339
             }
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
      */
352 352
     public function view($view)
353 353
     {
354
-        return $this->display(function ($value) use ($view) {
354
+        return $this->display(function($value) use ($view) {
355 355
             $model = $this;
356 356
 
357 357
             return view($view, compact('model', 'value'))->render();
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
         $grid = $this->grid;
475 475
         $column = $this;
476 476
 
477
-        $this->display(function ($value) use ($grid, $column, $class) {
477
+        $this->display(function($value) use ($grid, $column, $class) {
478 478
             /** @var AbstractDisplayer $definition */
479 479
             $definition = new $class($value, $grid, $column, $this);
480 480
 
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
     protected function htmlEntityEncode($item)
493 493
     {
494 494
         if (is_array($item)) {
495
-            array_walk_recursive($item, function (&$value) {
495
+            array_walk_recursive($item, function(&$value) {
496 496
                 $value = htmlentities($value);
497 497
             });
498 498
         } else {
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
      */
573 573
     protected function callSupportDisplayer($abstract, $arguments)
574 574
     {
575
-        return $this->display(function ($value) use ($abstract, $arguments) {
575
+        return $this->display(function($value) use ($abstract, $arguments) {
576 576
             if (is_array($value) || $value instanceof Arrayable) {
577 577
                 return call_user_func_array([collect($value), $abstract], $arguments);
578 578
             }
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
     protected function callBuiltinDisplayer($abstract, $arguments)
597 597
     {
598 598
         if ($abstract instanceof Closure) {
599
-            return $this->display(function ($value) use ($abstract, $arguments) {
599
+            return $this->display(function($value) use ($abstract, $arguments) {
600 600
                 return $abstract->call($this, ...array_merge([$value], $arguments));
601 601
             });
602 602
         }
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
             $grid = $this->grid;
606 606
             $column = $this;
607 607
 
608
-            return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) {
608
+            return $this->display(function($value) use ($abstract, $grid, $column, $arguments) {
609 609
                 /** @var AbstractDisplayer $displayer */
610 610
                 $displayer = new $abstract($value, $grid, $column, $this);
611 611
 
Please login to merge, or discard this patch.
src/Form.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
      */
299 299
     public function destroy($id)
300 300
     {
301
-        collect(explode(',', $id))->filter()->each(function ($id) {
301
+        collect(explode(',', $id))->filter()->each(function($id) {
302 302
 
303 303
             $model = $this->model()->findOrFail($id);
304 304
 
@@ -334,9 +334,9 @@  discard block
 block discarded – undo
334 334
             ->with($this->getRelations())
335 335
             ->findOrFail($id)->toArray();
336 336
 
337
-        $this->builder->fields()->filter(function ($field) {
337
+        $this->builder->fields()->filter(function($field) {
338 338
             return $field instanceof Field\File;
339
-        })->each(function (Field\File $file) use ($data) {
339
+        })->each(function(Field\File $file) use ($data) {
340 340
             $file->setOriginal($data);
341 341
 
342 342
             $file->destroy();
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
             return $response;
362 362
         }
363 363
 
364
-        DB::transaction(function () {
364
+        DB::transaction(function() {
365 365
             $inserts = $this->prepareInsert($this->updates);
366 366
 
367 367
             foreach ($inserts as $column => $value) {
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
             return $response;
565 565
         }
566 566
 
567
-        DB::transaction(function () {
567
+        DB::transaction(function() {
568 568
             $updates = $this->prepareUpdate($this->updates);
569 569
 
570 570
             foreach ($updates as $column => $value) {
@@ -1033,7 +1033,7 @@  discard block
 block discarded – undo
1033 1033
     protected function getFieldByColumn($column)
1034 1034
     {
1035 1035
         return $this->builder->fields()->first(
1036
-            function (Field $field) use ($column) {
1036
+            function(Field $field) use ($column) {
1037 1037
                 if (is_array($field->column())) {
1038 1038
                     return in_array($column, $field->column());
1039 1039
                 }
@@ -1054,7 +1054,7 @@  discard block
 block discarded – undo
1054 1054
 
1055 1055
         $values = $this->model->toArray();
1056 1056
 
1057
-        $this->builder->fields()->each(function (Field $field) use ($values) {
1057
+        $this->builder->fields()->each(function(Field $field) use ($values) {
1058 1058
             $field->setOriginal($values);
1059 1059
         });
1060 1060
     }
@@ -1078,7 +1078,7 @@  discard block
 block discarded – undo
1078 1078
 
1079 1079
         $data = $this->model->toArray();
1080 1080
 
1081
-        $this->builder->fields()->each(function (Field $field) use ($data) {
1081
+        $this->builder->fields()->each(function(Field $field) use ($data) {
1082 1082
             if (!in_array($field->column(), $this->ignored)) {
1083 1083
                 $field->fill($data);
1084 1084
             }
@@ -1201,7 +1201,7 @@  discard block
 block discarded – undo
1201 1201
      */
1202 1202
     public function setWidth($fieldWidth = 8, $labelWidth = 2)
1203 1203
     {
1204
-        $this->builder()->fields()->each(function ($field) use ($fieldWidth, $labelWidth) {
1204
+        $this->builder()->fields()->each(function($field) use ($fieldWidth, $labelWidth) {
1205 1205
             /* @var Field $field  */
1206 1206
             $field->setWidth($fieldWidth, $labelWidth);
1207 1207
         });
Please login to merge, or discard this patch.