Completed
Push — master ( d938ff...77fd36 )
by Song
03:53
created
src/Grid/Column.php 1 patch
Spacing   +6 added lines, -6 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
             }
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
         $grid = $this->grid;
429 429
         $column = $this;
430 430
 
431
-        $this->display(function ($value) use ($grid, $column, $class) {
431
+        $this->display(function($value) use ($grid, $column, $class) {
432 432
             $definition = new $class($value, $grid, $column, $this);
433 433
 
434 434
             return $definition->display();
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
     protected function htmlEntityEncode($item)
446 446
     {
447 447
         if (is_array($item)) {
448
-            array_walk_recursive($item, function (&$value) {
448
+            array_walk_recursive($item, function(&$value) {
449 449
                 $value = htmlentities($value);
450 450
             });
451 451
         } else {
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
      */
526 526
     protected function callSupportDisplayer($abstract, $arguments)
527 527
     {
528
-        return $this->display(function ($value) use ($abstract, $arguments) {
528
+        return $this->display(function($value) use ($abstract, $arguments) {
529 529
             if (is_array($value) || $value instanceof Arrayable) {
530 530
                 return call_user_func_array([collect($value), $abstract], $arguments);
531 531
             }
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
     protected function callBuiltinDisplayer($abstract, $arguments)
550 550
     {
551 551
         if ($abstract instanceof Closure) {
552
-            return $this->display(function ($value) use ($abstract, $arguments) {
552
+            return $this->display(function($value) use ($abstract, $arguments) {
553 553
                 return $abstract->call($this, ...array_merge([$value], $arguments));
554 554
             });
555 555
         }
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
             $grid = $this->grid;
559 559
             $column = $this;
560 560
 
561
-            return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) {
561
+            return $this->display(function($value) use ($abstract, $grid, $column, $arguments) {
562 562
                 $displayer = new $abstract($value, $grid, $column, $this);
563 563
 
564 564
                 return call_user_func_array([$displayer, 'display'], $arguments);
Please login to merge, or discard this patch.
src/Show/Field.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      */
144 144
     public function using(array $values, $default = null)
145 145
     {
146
-        return $this->as(function ($value) use ($values, $default) {
146
+        return $this->as(function($value) use ($values, $default) {
147 147
             if (is_null($value)) {
148 148
                 return $default;
149 149
             }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      */
164 164
     public function image($server = '', $width = 200, $height = 200)
165 165
     {
166
-        return $this->as(function ($path) use ($server, $width, $height) {
166
+        return $this->as(function($path) use ($server, $width, $height) {
167 167
             if (url()->isValidUrl($path)) {
168 168
                 $src = $path;
169 169
             } elseif ($server) {
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      */
187 187
     public function link($href = '', $target = '_blank')
188 188
     {
189
-        return $this->as(function ($link) use ($href, $target) {
189
+        return $this->as(function($link) use ($href, $target) {
190 190
             $href = $href ?: $link;
191 191
 
192 192
             return "<a href='$href' target='{$target}'>{$link}</a>";
@@ -202,12 +202,12 @@  discard block
 block discarded – undo
202 202
      */
203 203
     public function label($style = 'success')
204 204
     {
205
-        return $this->as(function ($value) use ($style) {
205
+        return $this->as(function($value) use ($style) {
206 206
             if ($value instanceof Arrayable) {
207 207
                 $value = $value->toArray();
208 208
             }
209 209
 
210
-            return collect((array) $value)->map(function ($name) use ($style) {
210
+            return collect((array) $value)->map(function($name) use ($style) {
211 211
                 return "<span class='label label-{$style}'>$name</span>";
212 212
             })->implode('&nbsp;');
213 213
         });
@@ -222,12 +222,12 @@  discard block
 block discarded – undo
222 222
      */
223 223
     public function badge($style = 'blue')
224 224
     {
225
-        return $this->as(function ($value) use ($style) {
225
+        return $this->as(function($value) use ($style) {
226 226
             if ($value instanceof Arrayable) {
227 227
                 $value = $value->toArray();
228 228
             }
229 229
 
230
-            return collect((array) $value)->map(function ($name) use ($style) {
230
+            return collect((array) $value)->map(function($name) use ($style) {
231 231
                 return "<span class='badge bg-{$style}'>$name</span>";
232 232
             })->implode('&nbsp;');
233 233
         });
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
     public function render()
294 294
     {
295 295
         if ($this->showAs->isNotEmpty()) {
296
-            $this->showAs->each(function ($callable) {
296
+            $this->showAs->each(function($callable) {
297 297
                 $this->value = $callable->call(
298 298
                     $this->parent->getModel(),
299 299
                     $this->value
Please login to merge, or discard this patch.
src/Grid/Filter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     {
208 208
         $inputs = array_dot(Input::all());
209 209
 
210
-        $inputs = array_filter($inputs, function ($input) {
210
+        $inputs = array_filter($inputs, function($input) {
211 211
             return $input !== '' && !is_null($input);
212 212
         });
213 213
 
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
             $conditions[] = $filter->condition($params);
232 232
         }
233 233
 
234
-        return tap(array_filter($conditions), function ($conditions) {
234
+        return tap(array_filter($conditions), function($conditions) {
235 235
             $this->searching = !empty($conditions);
236 236
         });
237 237
     }
@@ -247,9 +247,9 @@  discard block
 block discarded – undo
247 247
             return $inputs;
248 248
         }
249 249
 
250
-        $inputs = collect($inputs)->filter(function ($input, $key) {
250
+        $inputs = collect($inputs)->filter(function($input, $key) {
251 251
             return starts_with($key, "{$this->name}_");
252
-        })->mapWithKeys(function ($val, $key) {
252
+        })->mapWithKeys(function($val, $key) {
253 253
             $key = str_replace("{$this->name}_", '', $key);
254 254
 
255 255
             return [$key => $val];
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
      */
300 300
     public function scope($key, $label = '')
301 301
     {
302
-        return tap(new Scope($key, $label), function (Scope $scope) {
302
+        return tap(new Scope($key, $label), function(Scope $scope) {
303 303
             return $this->scopes->push($scope);
304 304
         });
305 305
     }
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
     {
324 324
         $key = request(Scope::QUERY_NAME);
325 325
 
326
-        return $this->scopes->first(function ($scope) use ($key) {
326
+        return $this->scopes->first(function($scope) use ($key) {
327 327
             return $scope->key == $key;
328 328
         });
329 329
     }
Please login to merge, or discard this patch.
src/Grid/Filter/Scope.php 1 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 condition()
57 57
     {
58
-        return $this->queries->map(function ($query) {
58
+        return $this->queries->map(function($query) {
59 59
             return [$query['method'] => $query['arguments']];
60 60
         })->toArray();
61 61
     }
Please login to merge, or discard this patch.