Completed
Push — master ( cae265...e87c3d )
by Song
02:23
created
src/Grid.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
      * Get or set option for grid.
222 222
      *
223 223
      * @param string $key
224
-     * @param mixed  $value
224
+     * @param boolean  $value
225 225
      *
226 226
      * @return $this|mixed
227 227
      */
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
     /**
352 352
      * Get the grid paginator.
353 353
      *
354
-     * @return mixed
354
+     * @return Tools\Paginator
355 355
      */
356 356
     public function paginator()
357 357
     {
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
      * Process the grid filter.
538 538
      *
539 539
      * @param bool $toArray
540
-     * @return array|Collection|mixed
540
+     * @return Collection
541 541
      */
542 542
     public function processFilter($toArray = true)
543 543
     {
@@ -769,7 +769,7 @@  discard block
 block discarded – undo
769 769
      *
770 770
      * @param Closure|null $closure
771 771
      *
772
-     * @return $this|Tools\Footer
772
+     * @return callable
773 773
      */
774 774
     public function footer(Closure $closure = null)
775 775
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
         $callback = $this->actionsCallback;
432 432
         $column = $this->addColumn('__actions__', trans('admin.action'));
433 433
 
434
-        $column->display(function ($value) use ($grid, $column, $callback) {
434
+        $column->display(function($value) use ($grid, $column, $callback) {
435 435
             $actions = new Displayers\Actions($value, $grid, $column, $this);
436 436
 
437 437
             return $actions->display($callback);
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
      */
446 446
     public function disableRowSelector()
447 447
     {
448
-        $this->tools(function ($tools) {
448
+        $this->tools(function($tools) {
449 449
             /* @var Grid\Tools $tools */
450 450
             $tools->disableBatchActions();
451 451
         });
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
         $column = new Column(Column::SELECT_COLUMN_NAME, ' ');
470 470
         $column->setGrid($this);
471 471
 
472
-        $column->display(function ($value) use ($grid, $column) {
472
+        $column->display(function($value) use ($grid, $column) {
473 473
             $actions = new Displayers\RowSelector($value, $grid, $column, $this);
474 474
 
475 475
             return $actions->display();
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
 
499 499
         Column::setOriginalGridModels($collection);
500 500
 
501
-        $this->columns->map(function (Column $column) use (&$data) {
501
+        $this->columns->map(function(Column $column) use (&$data) {
502 502
             $data = $column->fill($data);
503 503
 
504 504
             $this->columnNames[] = $column->getName();
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
      */
594 594
     protected function buildRows(array $data)
595 595
     {
596
-        $this->rows = collect($data)->map(function ($model, $number) {
596
+        $this->rows = collect($data)->map(function($model, $number) {
597 597
             return new Row($number, $model);
598 598
         });
599 599
 
Please login to merge, or discard this patch.
src/Grid/Column.php 1 patch
Spacing   +7 added lines, -7 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
             }
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
      */
331 331
     public function view($view)
332 332
     {
333
-        return $this->display(function ($value) use ($view) {
333
+        return $this->display(function($value) use ($view) {
334 334
             $model = $this;
335 335
 
336 336
             return view($view, compact('model', 'value'))->render();
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
         $grid = $this->grid;
454 454
         $column = $this;
455 455
 
456
-        $this->display(function ($value) use ($grid, $column, $class) {
456
+        $this->display(function($value) use ($grid, $column, $class) {
457 457
             /** @var AbstractDisplayer $definition */
458 458
             $definition = new $class($value, $grid, $column, $this);
459 459
 
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
     protected function htmlEntityEncode($item)
472 472
     {
473 473
         if (is_array($item)) {
474
-            array_walk_recursive($item, function (&$value) {
474
+            array_walk_recursive($item, function(&$value) {
475 475
                 $value = htmlentities($value);
476 476
             });
477 477
         } else {
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
      */
552 552
     protected function callSupportDisplayer($abstract, $arguments)
553 553
     {
554
-        return $this->display(function ($value) use ($abstract, $arguments) {
554
+        return $this->display(function($value) use ($abstract, $arguments) {
555 555
             if (is_array($value) || $value instanceof Arrayable) {
556 556
                 return call_user_func_array([collect($value), $abstract], $arguments);
557 557
             }
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
     protected function callBuiltinDisplayer($abstract, $arguments)
576 576
     {
577 577
         if ($abstract instanceof Closure) {
578
-            return $this->display(function ($value) use ($abstract, $arguments) {
578
+            return $this->display(function($value) use ($abstract, $arguments) {
579 579
                 return $abstract->call($this, ...array_merge([$value], $arguments));
580 580
             });
581 581
         }
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
             $grid = $this->grid;
585 585
             $column = $this;
586 586
 
587
-            return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) {
587
+            return $this->display(function($value) use ($abstract, $grid, $column, $arguments) {
588 588
                 /** @var AbstractDisplayer $displayer */
589 589
                 $displayer = new $abstract($value, $grid, $column, $this);
590 590
 
Please login to merge, or discard this patch.