Completed
Pull Request — master (#3052)
by Song
02:57
created
src/Form/Field/HasMany.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -640,7 +640,7 @@
 block discarded – undo
640 640
         }
641 641
 
642 642
         /* Build row elements */
643
-        $template = array_reduce($fields, function ($all, $field) {
643
+        $template = array_reduce($fields, function($all, $field) {
644 644
             $all .= "<td>{$field}</td>";
645 645
 
646 646
             return $all;
Please login to merge, or discard this patch.
src/Grid.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
      * Get or set option for grid.
251 251
      *
252 252
      * @param string $key
253
-     * @param mixed  $value
253
+     * @param boolean  $value
254 254
      *
255 255
      * @return $this|mixed
256 256
      */
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
     /**
441 441
      * Get the grid paginator.
442 442
      *
443
-     * @return mixed
443
+     * @return Tools\Paginator
444 444
      */
445 445
     public function paginator()
446 446
     {
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
      *
623 623
      * @param bool $toArray
624 624
      *
625
-     * @return array|Collection|mixed
625
+     * @return Collection
626 626
      */
627 627
     public function processFilter($toArray = true)
628 628
     {
@@ -872,7 +872,7 @@  discard block
 block discarded – undo
872 872
      *
873 873
      * @param Closure|null $closure
874 874
      *
875
-     * @return $this|Closure
875
+     * @return callable
876 876
      */
877 877
     public function header(Closure $closure = null)
878 878
     {
@@ -904,7 +904,7 @@  discard block
 block discarded – undo
904 904
      *
905 905
      * @param Closure|null $closure
906 906
      *
907
-     * @return $this|Closure
907
+     * @return callable
908 908
      */
909 909
     public function footer(Closure $closure = null)
910 910
     {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
 
353 353
         array_push($visible, '__row_selector__', '__actions__');
354 354
 
355
-        return $this->columns->filter(function (Column $column) use ($visible) {
355
+        return $this->columns->filter(function(Column $column) use ($visible) {
356 356
             return in_array($column->getName(), $visible);
357 357
         });
358 358
     }
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
 
373 373
         array_push($visible, '__row_selector__', '__actions__');
374 374
 
375
-        return collect($this->columnNames)->filter(function ($column) use ($visible) {
375
+        return collect($this->columnNames)->filter(function($column) use ($visible) {
376 376
             return in_array($column, $visible);
377 377
         });
378 378
     }
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
         $column = new Column($column, $label);
391 391
         $column->setGrid($this);
392 392
 
393
-        return tap($column, function ($value) {
393
+        return tap($column, function($value) {
394 394
             $this->columns->push($value);
395 395
         });
396 396
     }
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
         $column = new Column($column, $label);
409 409
         $column->setGrid($this);
410 410
 
411
-        return tap($column, function ($value) {
411
+        return tap($column, function($value) {
412 412
             $this->columns->prepend($value);
413 413
         });
414 414
     }
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
      */
528 528
     public function disableRowSelector()
529 529
     {
530
-        $this->tools(function ($tools) {
530
+        $this->tools(function($tools) {
531 531
             /* @var Grid\Tools $tools */
532 532
             $tools->disableBatchActions();
533 533
         });
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
 
571 571
         Column::setOriginalGridModels($collection);
572 572
 
573
-        $this->columns->map(function (Column $column) use (&$data) {
573
+        $this->columns->map(function(Column $column) use (&$data) {
574 574
             $data = $column->fill($data);
575 575
 
576 576
             $this->columnNames[] = $column->getName();
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
      */
679 679
     protected function buildRows(array $data)
680 680
     {
681
-        $this->rows = collect($data)->map(function ($model, $number) {
681
+        $this->rows = collect($data)->map(function($model, $number) {
682 682
             return new Row($number, $model);
683 683
         });
684 684
 
Please login to merge, or discard this patch.
src/Layout/Column.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
     protected function startColumn()
113 113
     {
114 114
         // get class name using width array
115
-        $classnName = collect($this->width)->map(function ($value, $key) {
115
+        $classnName = collect($this->width)->map(function($value, $key) {
116 116
             return "col-$key-$value";
117 117
         })->implode(' ');
118 118
 
Please login to merge, or discard this patch.
src/Form/Field.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     /**
223 223
      * Field constructor.
224 224
      *
225
-     * @param       $column
225
+     * @param       string $column
226 226
      * @param array $arguments
227 227
      */
228 228
     public function __construct($column, $arguments = [])
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
     /**
557 557
      * Set or get value of the field.
558 558
      *
559
-     * @param null $value
559
+     * @param string $value
560 560
      *
561 561
      * @return mixed
562 562
      */
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
     /**
728 728
      * Add html attributes to elements.
729 729
      *
730
-     * @param array|string $attribute
730
+     * @param string $attribute
731 731
      * @param mixed        $value
732 732
      *
733 733
      * @return $this
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
     }
1020 1020
 
1021 1021
     /**
1022
-     * @param array $labelClass
1022
+     * @param string[] $labelClass
1023 1023
      *
1024 1024
      * @return self
1025 1025
      */
@@ -1072,7 +1072,7 @@  discard block
 block discarded – undo
1072 1072
     /**
1073 1073
      * Set view of current field.
1074 1074
      *
1075
-     * @return string
1075
+     * @return Field
1076 1076
      */
1077 1077
     public function setView($view)
1078 1078
     {
Please login to merge, or discard this patch.
src/Grid/Tools/ColumnSelector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
         $this->setupScript($show, $columns);
40 40
 
41
-        $lists = $columns->map(function ($val, $key) use ($show) {
41
+        $lists = $columns->map(function($val, $key) use ($show) {
42 42
             if (empty($show)) {
43 43
                 $checked = 'checked';
44 44
             } else {
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     protected function getGridColumns()
75 75
     {
76
-        return $this->grid->columns()->map(function (Grid\Column $column) {
76
+        return $this->grid->columns()->map(function(Grid\Column $column) {
77 77
             $name = $column->getName();
78 78
 
79 79
             if (in_array($name, ['__row_selector__', '__actions__'])) {
Please login to merge, or discard this patch.