Completed
Pull Request — master (#3979)
by
unknown
07:34
created
src/Grid/Tools.php 2 patches
Unused Use Statements   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -2,13 +2,13 @@
 block discarded – undo
2 2
 
3 3
 namespace Encore\Admin\Grid;
4 4
 
5
-use Encore\Admin\Actions\GridAction;
6
-use Encore\Admin\Grid;
7
-use Encore\Admin\Grid\Tools\AbstractTool;
8
-use Encore\Admin\Grid\Tools\BatchActions;
9
-use Encore\Admin\Grid\Tools\FilterButton;
10
-use Illuminate\Contracts\Support\Htmlable;
11
-use Illuminate\Contracts\Support\Renderable;
5
+use Encore\Admin\Actions\GridAction;
6
+use Encore\Admin\Grid;
7
+use Encore\Admin\Grid\Tools\AbstractTool;
8
+use Encore\Admin\Grid\Tools\BatchActions;
9
+use Encore\Admin\Grid\Tools\FilterButton;
10
+use Illuminate\Contracts\Support\Htmlable;
11
+use Illuminate\Contracts\Support\Renderable;
12 12
 use Illuminate\Support\Collection;
13 13
 
14 14
 class Tools implements Renderable
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function disableFilterButton(bool $disable = true)
91 91
     {
92
-        $this->tools = $this->tools->map(function ($tool) use ($disable) {
92
+        $this->tools = $this->tools->map(function($tool) use ($disable) {
93 93
             if ($tool instanceof FilterButton) {
94 94
                 return $tool->disable($disable);
95 95
             }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     public function disableBatchActions(bool $disable = true)
119 119
     {
120
-        $this->tools = $this->tools->map(function ($tool) use ($disable) {
120
+        $this->tools = $this->tools->map(function($tool) use ($disable) {
121 121
             if ($tool instanceof BatchActions) {
122 122
                 return $tool->disable($disable);
123 123
             }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public function batch(\Closure $closure)
133 133
     {
134
-        call_user_func($closure, $this->tools->first(function ($tool) {
134
+        call_user_func($closure, $this->tools->first(function($tool) {
135 135
             return $tool instanceof BatchActions;
136 136
         }));
137 137
     }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      */
144 144
     public function render()
145 145
     {
146
-        return $this->tools->map(function ($tool) {
146
+        return $this->tools->map(function($tool) {
147 147
             if ($tool instanceof AbstractTool) {
148 148
                 if (!$tool->allowed()) {
149 149
                     return '';
Please login to merge, or discard this patch.
src/Grid/Tools/BatchActions.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
     /**
72 72
      * Add a batch action.
73 73
      *
74
-     * @param $title
74
+     * @param BatchDelete $title
75 75
      * @param BatchAction|null $action
76 76
      *
77 77
      * @return $this
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Encore\Admin\Grid\Tools;
4 4
 
5
-use Encore\Admin\Admin;
5
+use Encore\Admin\Admin;
6 6
 use Illuminate\Support\Collection;
7 7
 
8 8
 class BatchActions extends AbstractTool
Please login to merge, or discard this patch.
src/Grid/Tools/ExportButton.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Encore\Admin\Grid\Tools;
4 4
 
5
-use Encore\Admin\Admin;
5
+use Encore\Admin\Admin;
6 6
 use Encore\Admin\Grid;
7 7
 
8 8
 class ExportButton extends AbstractTool
Please login to merge, or discard this patch.
src/Grid/Tools/FixColumns.php 2 patches
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Encore\Admin\Grid\Tools;
4 4
 
5
-use Encore\Admin\Admin;
6
-use Encore\Admin\Grid;
5
+use Encore\Admin\Admin;
6
+use Encore\Admin\Grid;
7 7
 use Illuminate\Support\Collection;
8 8
 
9 9
 class FixColumns
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
     {
79 79
         $this->grid->setView($this->view);
80 80
 
81
-        return function (Grid $grid) {
81
+        return function(Grid $grid) {
82 82
             if ($this->head > 0) {
83 83
                 $this->left = $grid->visibleColumns()->slice(0, $this->head);
84 84
             }
Please login to merge, or discard this patch.
src/Grid/Tools/Footer.php 1 patch
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace Encore\Admin\Grid\Tools;
4 4
 
5
-use Encore\Admin\Grid;
6
-use Illuminate\Contracts\Support\Htmlable;
7
-use Illuminate\Contracts\Support\Renderable;
5
+use Encore\Admin\Grid;
6
+use Illuminate\Contracts\Support\Htmlable;
7
+use Illuminate\Contracts\Support\Renderable;
8 8
 use Illuminate\Database\Query\Builder;
9 9
 
10 10
 class Footer extends AbstractTool
Please login to merge, or discard this patch.
src/Grid/Tools/Header.php 1 patch
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace Encore\Admin\Grid\Tools;
4 4
 
5
-use Encore\Admin\Grid;
6
-use Illuminate\Contracts\Support\Htmlable;
7
-use Illuminate\Contracts\Support\Renderable;
5
+use Encore\Admin\Grid;
6
+use Illuminate\Contracts\Support\Htmlable;
7
+use Illuminate\Contracts\Support\Renderable;
8 8
 use Illuminate\Database\Query\Builder;
9 9
 
10 10
 class Header extends AbstractTool
Please login to merge, or discard this patch.
src/Grid/Tools/Paginator.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     /**
42 42
      * Get Pagination links.
43 43
      *
44
-     * @return string
44
+     * @return \Illuminate\Contracts\View\View
45 45
      */
46 46
     protected function paginationLinks()
47 47
     {
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Encore\Admin\Grid\Tools;
4 4
 
5
-use Encore\Admin\Grid;
5
+use Encore\Admin\Grid;
6 6
 use Illuminate\Pagination\LengthAwarePaginator;
7 7
 
8 8
 class Paginator extends AbstractTool
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
             'total' => $this->paginator->total(),
72 72
         ];
73 73
 
74
-        $parameters = collect($parameters)->flatMap(function ($parameter, $key) {
74
+        $parameters = collect($parameters)->flatMap(function($parameter, $key) {
75 75
             return [$key => "<b>$parameter</b>"];
76 76
         });
77 77
 
Please login to merge, or discard this patch.
src/Grid/Tools/PerPageSelector.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Encore\Admin\Grid\Tools;
4 4
 
5
-use Encore\Admin\Admin;
5
+use Encore\Admin\Admin;
6 6
 use Encore\Admin\Grid;
7 7
 
8 8
 class PerPageSelector extends AbstractTool
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     {
68 68
         Admin::script($this->script());
69 69
 
70
-        $options = $this->getOptions()->map(function ($option) {
70
+        $options = $this->getOptions()->map(function($option) {
71 71
             $selected = ($option == $this->perPage) ? 'selected' : '';
72 72
             $url = \request()->fullUrlWithQuery([$this->perPageName => $option]);
73 73
 
Please login to merge, or discard this patch.
src/Grid/Tools/QuickCreate.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -34,6 +34,9 @@
 block discarded – undo
34 34
         $this->fields = Collection::make();
35 35
     }
36 36
 
37
+    /**
38
+     * @param string $placeholder
39
+     */
37 40
     protected function formatPlaceholder($placeholder)
38 41
     {
39 42
         return array_filter((array) $placeholder);
Please login to merge, or discard this patch.
Unused Use Statements   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -2,13 +2,13 @@
 block discarded – undo
2 2
 
3 3
 namespace Encore\Admin\Grid\Tools;
4 4
 
5
-use Encore\Admin\Admin;
6
-use Encore\Admin\Form\Field;
7
-use Encore\Admin\Form\Field\MultipleSelect;
8
-use Encore\Admin\Form\Field\Select;
9
-use Encore\Admin\Form\Field\Text;
10
-use Encore\Admin\Grid;
11
-use Illuminate\Contracts\Support\Renderable;
5
+use Encore\Admin\Admin;
6
+use Encore\Admin\Form\Field;
7
+use Encore\Admin\Form\Field\MultipleSelect;
8
+use Encore\Admin\Form\Field\Select;
9
+use Encore\Admin\Form\Field\Text;
10
+use Encore\Admin\Grid;
11
+use Illuminate\Contracts\Support\Renderable;
12 12
 use Illuminate\Support\Collection;
13 13
 
14 14
 class QuickCreate implements Renderable
Please login to merge, or discard this patch.