Completed
Push — master ( fcb695...c2a60e )
by Song
08:26
created
src/Grid/Filter/Between.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 
55 55
         $this->value = array_get($inputs, $this->column);
56 56
 
57
-        $value = array_filter($this->value, function ($val) {
57
+        $value = array_filter($this->value, function($val) {
58 58
             return $val !== '';
59 59
         });
60 60
 
Please login to merge, or discard this patch.
src/Grid/Filter/AbstractFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@
 block discarded – undo
158 158
 
159 159
         list($relation, $args[0]) = explode('.', $this->column);
160 160
 
161
-        return ['whereHas' => [$relation, function ($relation) use ($args) {
161
+        return ['whereHas' => [$relation, function($relation) use ($args) {
162 162
             call_user_func_array([$relation, $this->query], $args);
163 163
         }]];
164 164
     }
Please login to merge, or discard this patch.
src/Grid/Row.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
     public function style($style)
135 135
     {
136 136
         if (is_array($style)) {
137
-            $style = implode('', array_map(function ($key, $val) {
137
+            $style = implode('', array_map(function($key, $val) {
138 138
                 return "$key:$val";
139 139
             }, array_keys($style), array_values($style)));
140 140
         }
Please login to merge, or discard this patch.
src/Widgets/Box.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
             return $this->style([$styles]);
65 65
         }
66 66
 
67
-        $styles = array_map(function ($style) {
67
+        $styles = array_map(function($style) {
68 68
             return 'box-'.$style;
69 69
         }, $styles);
70 70
 
Please login to merge, or discard this patch.
src/Grid/Model.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $this->setSort();
195 195
         $this->setPaginate();
196 196
 
197
-        $this->queries->unique()->each(function ($query) {
197
+        $this->queries->unique()->each(function($query) {
198 198
             $this->model = call_user_func_array([$this->model, $query['method']], $query['arguments']);
199 199
         });
200 200
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
     {
219 219
         $paginate = $this->findQueryByMethod('paginate');
220 220
 
221
-        $this->queries = $this->queries->reject(function ($query) {
221
+        $this->queries = $this->queries->reject(function($query) {
222 222
             return $query['method'] == 'paginate';
223 223
         });
224 224
 
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
      */
269 269
     protected function findQueryByMethod($method)
270 270
     {
271
-        return $this->queries->first(function ($query) use ($method) {
271
+        return $this->queries->first(function($query) use ($method) {
272 272
             return $query['method'] == $method;
273 273
         });
274 274
     }
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
     {
314 314
         list($relationName, $relationColumn) = explode('.', $column);
315 315
 
316
-        if ($this->queries->contains(function ($query) use ($relationName) {
316
+        if ($this->queries->contains(function($query) use ($relationName) {
317 317
             return $query['method'] == 'with' && in_array($relationName, $query['arguments']);
318 318
         })) {
319 319
             $relation = $this->model->$relationName();
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
      */
343 343
     public function resetOrderBy()
344 344
     {
345
-        $this->queries = $this->queries->reject(function ($query) {
345
+        $this->queries = $this->queries->reject(function($query) {
346 346
             return $query['method'] == 'orderBy';
347 347
         });
348 348
     }
Please login to merge, or discard this patch.
src/Grid/Filter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
     {
116 116
         $inputs = array_dot(Input::all());
117 117
 
118
-        $inputs = array_filter($inputs, function ($input) {
118
+        $inputs = array_filter($inputs, function($input) {
119 119
             return $input !== '' && !is_null($input);
120 120
         });
121 121
 
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/Column.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      * @param array $attributes
185 185
      * @return $this
186 186
      */
187
-    public function setAttributes($attributes  = [])
187
+    public function setAttributes($attributes = [])
188 188
     {
189 189
         static::$htmlAttributes[$this->name] = $attributes;
190 190
 
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
         $grid = $this->grid;
407 407
         $column = $this;
408 408
 
409
-        $this->display(function ($value) use ($grid, $column, $class) {
409
+        $this->display(function($value) use ($grid, $column, $class) {
410 410
             $definition = new $class($value, $grid, $column, $this);
411 411
 
412 412
             return $definition->display();
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
     protected function htmlEntityEncode($item)
424 424
     {
425 425
         if (is_array($item)) {
426
-            array_walk_recursive($item, function (&$value) {
426
+            array_walk_recursive($item, function(&$value) {
427 427
                 $value = htmlentities($value);
428 428
             });
429 429
         } else {
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
      */
504 504
     protected function callSupportDisplayer($abstract, $arguments)
505 505
     {
506
-        return $this->display(function ($value) use ($abstract, $arguments) {
506
+        return $this->display(function($value) use ($abstract, $arguments) {
507 507
             if (is_array($value) || $value instanceof Arrayable) {
508 508
                 return call_user_func_array([collect($value), $abstract], $arguments);
509 509
             }
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
     protected function callBuiltinDisplayer($abstract, $arguments)
528 528
     {
529 529
         if ($abstract instanceof Closure) {
530
-            return $this->display(function ($value) use ($abstract, $arguments) {
530
+            return $this->display(function($value) use ($abstract, $arguments) {
531 531
                 return call_user_func_array($abstract->bindTo($this), array_merge([$value], $arguments));
532 532
             });
533 533
         }
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
             $grid = $this->grid;
537 537
             $column = $this;
538 538
 
539
-            return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) {
539
+            return $this->display(function($value) use ($abstract, $grid, $column, $arguments) {
540 540
                 $displayer = new $abstract($value, $grid, $column, $this);
541 541
 
542 542
                 return call_user_func_array([$displayer, 'display'], $arguments);
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.