Completed
Push — master ( fcb695...c2a60e )
by Song
08:26
created
src/Tree.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -282,7 +282,6 @@
 block discarded – undo
282 282
     /**
283 283
      * Return all items of the tree.
284 284
      *
285
-     * @param array $items
286 285
      */
287 286
     public function getItems()
288 287
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
     protected function initBranchCallback()
104 104
     {
105 105
         if (is_null($this->branchCallback)) {
106
-            $this->branchCallback = function ($branch) {
106
+            $this->branchCallback = function($branch) {
107 107
                 $key = $branch[$this->model->getKeyName()];
108 108
                 $title = $branch[$this->model->getTitleColumn()];
109 109
 
Please login to merge, or discard this patch.
src/Tree/Tools.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,6 @@
 block discarded – undo
26 26
     /**
27 27
      * Create a new Tools instance.
28 28
      *
29
-     * @param Builder $builder
30 29
      */
31 30
     public function __construct(Tree $tree)
32 31
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
      */
56 56
     public function render()
57 57
     {
58
-        return $this->tools->map(function ($tool) {
58
+        return $this->tools->map(function($tool) {
59 59
             if ($tool instanceof Renderable) {
60 60
                 return $tool->render();
61 61
             }
Please login to merge, or discard this patch.
src/Grid/Exporters/CsvExporter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     {
14 14
         $titles = [];
15 15
 
16
-        $filename = $this->getTable() . '.csv';
16
+        $filename = $this->getTable().'.csv';
17 17
 
18 18
         $data = $this->getData();
19 19
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     protected function sanitize(array $row)
52 52
     {
53
-        return collect($row)->reject(function ($val) {
53
+        return collect($row)->reject(function($val) {
54 54
             return is_array($val) && !Arr::isAssoc($val);
55 55
         })->toArray();
56 56
     }
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $str = '';
67 67
         foreach ($row as $cell) {
68
-            $cell = str_replace([$quot, "\n"], [$quot . $quot, ''], $cell);
68
+            $cell = str_replace([$quot, "\n"], [$quot.$quot, ''], $cell);
69 69
             if (strchr($cell, $fd) !== FALSE || strchr($cell, $quot) !== FALSE) {
70
-                $str .= $quot . $cell . $quot . $fd;
70
+                $str .= $quot.$cell.$quot.$fd;
71 71
             } else {
72
-                $str .= $cell . $fd;
72
+                $str .= $cell.$fd;
73 73
             }
74 74
         }
75
-        return substr($str, 0, -1) . "\n";
75
+        return substr($str, 0, -1)."\n";
76 76
     }
77 77
 }
Please login to merge, or discard this patch.
src/Grid/Tools/PerPageSelector.php 1 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 = app('request')->fullUrlWithQuery([$this->perPageName => $option]);
73 73
 
Please login to merge, or discard this patch.
src/Grid/Tools/Paginator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
             'total' => $this->paginator->total(),
73 73
         ];
74 74
 
75
-        $parameters = collect($parameters)->flatMap(function ($parameter, $key) {
75
+        $parameters = collect($parameters)->flatMap(function($parameter, $key) {
76 76
             return [$key => "<b>$parameter</b>"];
77 77
         });
78 78
 
Please login to merge, or discard this patch.
src/Grid/Tools.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function disableRefreshButton()
86 86
     {
87
-        $this->tools = $this->tools->reject(function ($tool) {
87
+        $this->tools = $this->tools->reject(function($tool) {
88 88
             return $tool instanceof RefreshButton;
89 89
         });
90 90
     }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public function disableBatchActions()
98 98
     {
99
-        $this->tools = $this->tools->reject(function ($tool) {
99
+        $this->tools = $this->tools->reject(function($tool) {
100 100
             return $tool instanceof BatchActions;
101 101
         });
102 102
     }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function batch(\Closure $closure)
108 108
     {
109
-        call_user_func($closure, $this->tools->first(function ($tool) {
109
+        call_user_func($closure, $this->tools->first(function($tool) {
110 110
             return $tool instanceof BatchActions;
111 111
         }));
112 112
     }
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      */
119 119
     public function render()
120 120
     {
121
-        return $this->tools->map(function ($tool) {
121
+        return $this->tools->map(function($tool) {
122 122
             if ($tool instanceof AbstractTool) {
123 123
                 return $tool->setGrid($this->grid)->render();
124 124
             }
Please login to merge, or discard this patch.
src/Grid/Displayers/Label.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
             $this->value = $this->value->toArray();
13 13
         }
14 14
 
15
-        return collect((array) $this->value)->map(function ($name) use ($style) {
15
+        return collect((array) $this->value)->map(function($name) use ($style) {
16 16
             return "<span class='label label-{$style}'>$name</span>";
17 17
         })->implode('&nbsp;');
18 18
     }
Please login to merge, or discard this patch.
src/Grid/Displayers/Badge.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
             $this->value = $this->value->toArray();
13 13
         }
14 14
 
15
-        return collect((array) $this->value)->map(function ($name) use ($style) {
15
+        return collect((array) $this->value)->map(function($name) use ($style) {
16 16
             return "<span class='badge bg-{$style}'>$name</span>";
17 17
         })->implode('&nbsp;');
18 18
     }
Please login to merge, or discard this patch.
src/Grid/Displayers/Editable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
             'data-value' => "{$this->value}",
156 156
         ];
157 157
 
158
-        $attributes = collect($attributes)->map(function ($attribute, $name) {
158
+        $attributes = collect($attributes)->map(function($attribute, $name) {
159 159
             return "$name='$attribute'";
160 160
         })->implode(' ');
161 161
 
Please login to merge, or discard this patch.