@@ -169,7 +169,7 @@ |
||
| 169 | 169 | $image = InterventionImage::make($file); |
| 170 | 170 | |
| 171 | 171 | // Resize image with aspect ratio |
| 172 | - $image->resize($size[0], $size[1], function (Constraint $constraint) { |
|
| 172 | + $image->resize($size[0], $size[1], function(Constraint $constraint) { |
|
| 173 | 173 | $constraint->aspectRatio(); |
| 174 | 174 | })->resizeCanvas($size[0], $size[1], 'center', false, '#ffffff'); |
| 175 | 175 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | $show = $this->grid->visibleColumnNames(); |
| 48 | 48 | |
| 49 | - $lists = $this->getGridColumns()->map(function ($label, $key) use ($show) { |
|
| 49 | + $lists = $this->getGridColumns()->map(function($label, $key) use ($show) { |
|
| 50 | 50 | if (empty($show)) { |
| 51 | 51 | $checked = 'checked'; |
| 52 | 52 | } else { |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | protected function getGridColumns() |
| 100 | 100 | { |
| 101 | - return $this->grid->columns()->map(function (Grid\Column $column) { |
|
| 101 | + return $this->grid->columns()->map(function(Grid\Column $column) { |
|
| 102 | 102 | $name = $column->getName(); |
| 103 | 103 | |
| 104 | 104 | if ($this->isColumnIgnored($name)) { |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | $this->value = $this->value->toArray(); |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | - return collect((array) $this->value)->map(function ($item) use ($style) { |
|
| 16 | + return collect((array) $this->value)->map(function($item) use ($style) { |
|
| 17 | 17 | if (is_array($style)) { |
| 18 | 18 | $style = Arr::get($style, $this->getColumn()->getOriginal(), 'success'); |
| 19 | 19 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | $this->value = $this->value->toArray(); |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | - return collect((array) $this->value)->map(function ($name) use ($style) { |
|
| 16 | + return collect((array) $this->value)->map(function($name) use ($style) { |
|
| 17 | 17 | if (is_array($style)) { |
| 18 | 18 | $style = Arr::get($style, $this->getColumn()->getOriginal(), 'red'); |
| 19 | 19 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | if (is_array($permission)) { |
| 25 | - collect($permission)->each(function ($permission) { |
|
| 25 | + collect($permission)->each(function($permission) { |
|
| 26 | 26 | call_user_func([self::class, 'check'], $permission); |
| 27 | 27 | }); |
| 28 | 28 | |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | 'title' => $this->message, |
| 38 | 38 | ]; |
| 39 | 39 | |
| 40 | - $data = collect($data)->map(function ($val, $key) { |
|
| 40 | + $data = collect($data)->map(function($val, $key) { |
|
| 41 | 41 | return "data-{$key}=\"{$val}\""; |
| 42 | 42 | })->implode(' '); |
| 43 | 43 | |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | { |
| 78 | 78 | $value = $this->getFilterValue([]); |
| 79 | 79 | |
| 80 | - $lists = collect($this->options)->map(function ($label, $key) use ($value) { |
|
| 80 | + $lists = collect($this->options)->map(function($label, $key) use ($value) { |
|
| 81 | 81 | $checked = in_array($key, $value) ? 'checked' : ''; |
| 82 | 82 | |
| 83 | 83 | return <<<HTML |
@@ -115,7 +115,7 @@ |
||
| 115 | 115 | */ |
| 116 | 116 | public function renderHeader() |
| 117 | 117 | { |
| 118 | - return collect($this->headers)->map(function ($item) { |
|
| 118 | + return collect($this->headers)->map(function($item) { |
|
| 119 | 119 | if ($item instanceof Renderable) { |
| 120 | 120 | return $item->render(); |
| 121 | 121 | } |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | |
| 407 | 407 | $column = $this; |
| 408 | 408 | |
| 409 | - return $this->display(function ($value) use ($grid, $column, $abstract, $arguments) { |
|
| 409 | + return $this->display(function($value) use ($grid, $column, $abstract, $arguments) { |
|
| 410 | 410 | /** @var AbstractDisplayer $displayer */ |
| 411 | 411 | $displayer = new $abstract($value, $grid, $column, $this); |
| 412 | 412 | |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | */ |
| 425 | 425 | public function using(array $values, $default = null) |
| 426 | 426 | { |
| 427 | - return $this->display(function ($value) use ($values, $default) { |
|
| 427 | + return $this->display(function($value) use ($values, $default) { |
|
| 428 | 428 | if (is_null($value)) { |
| 429 | 429 | return $default; |
| 430 | 430 | } |
@@ -442,7 +442,7 @@ discard block |
||
| 442 | 442 | */ |
| 443 | 443 | public function replace(array $replacements) |
| 444 | 444 | { |
| 445 | - return $this->display(function ($value) use ($replacements) { |
|
| 445 | + return $this->display(function($value) use ($replacements) { |
|
| 446 | 446 | if (isset($replacements[$value])) { |
| 447 | 447 | return $replacements[$value]; |
| 448 | 448 | } |
@@ -460,7 +460,7 @@ discard block |
||
| 460 | 460 | */ |
| 461 | 461 | public function view($view) |
| 462 | 462 | { |
| 463 | - return $this->display(function ($value) use ($view) { |
|
| 463 | + return $this->display(function($value) use ($view) { |
|
| 464 | 464 | $model = $this; |
| 465 | 465 | |
| 466 | 466 | return view($view, compact('model', 'value'))->render(); |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | */ |
| 501 | 501 | public function filesize() |
| 502 | 502 | { |
| 503 | - return $this->display(function ($value) { |
|
| 503 | + return $this->display(function($value) { |
|
| 504 | 504 | return file_size($value); |
| 505 | 505 | }); |
| 506 | 506 | } |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | */ |
| 515 | 515 | public function gravatar($size = 30) |
| 516 | 516 | { |
| 517 | - return $this->display(function ($value) use ($size) { |
|
| 517 | + return $this->display(function($value) use ($size) { |
|
| 518 | 518 | $src = sprintf( |
| 519 | 519 | 'https://www.gravatar.com/avatar/%s?s=%d', |
| 520 | 520 | md5(strtolower($value)), |
@@ -535,7 +535,7 @@ discard block |
||
| 535 | 535 | */ |
| 536 | 536 | public function loading($values = [], $others = []) |
| 537 | 537 | { |
| 538 | - return $this->display(function ($value) use ($values, $others) { |
|
| 538 | + return $this->display(function($value) use ($values, $others) { |
|
| 539 | 539 | $values = (array) $values; |
| 540 | 540 | |
| 541 | 541 | if (in_array($value, $values)) { |
@@ -556,7 +556,7 @@ discard block |
||
| 556 | 556 | */ |
| 557 | 557 | public function icon(array $setting, $default = '') |
| 558 | 558 | { |
| 559 | - return $this->display(function ($value) use ($setting, $default) { |
|
| 559 | + return $this->display(function($value) use ($setting, $default) { |
|
| 560 | 560 | $fa = ''; |
| 561 | 561 | |
| 562 | 562 | if (isset($setting[$value])) { |
@@ -582,7 +582,7 @@ discard block |
||
| 582 | 582 | Carbon::setLocale($locale); |
| 583 | 583 | } |
| 584 | 584 | |
| 585 | - return $this->display(function ($value) { |
|
| 585 | + return $this->display(function($value) { |
|
| 586 | 586 | return Carbon::parse($value)->diffForHumans(); |
| 587 | 587 | }); |
| 588 | 588 | } |
@@ -703,7 +703,7 @@ discard block |
||
| 703 | 703 | $grid = $this->grid; |
| 704 | 704 | $column = $this; |
| 705 | 705 | |
| 706 | - $this->display(function ($value) use ($grid, $column, $class) { |
|
| 706 | + $this->display(function($value) use ($grid, $column, $class) { |
|
| 707 | 707 | /** @var AbstractDisplayer $definition */ |
| 708 | 708 | $definition = new $class($value, $grid, $column, $this); |
| 709 | 709 | |
@@ -721,7 +721,7 @@ discard block |
||
| 721 | 721 | protected function htmlEntityEncode($item) |
| 722 | 722 | { |
| 723 | 723 | if (is_array($item)) { |
| 724 | - array_walk_recursive($item, function (&$value) { |
|
| 724 | + array_walk_recursive($item, function(&$value) { |
|
| 725 | 725 | $value = htmlentities($value); |
| 726 | 726 | }); |
| 727 | 727 | } else { |
@@ -758,7 +758,7 @@ discard block |
||
| 758 | 758 | */ |
| 759 | 759 | protected function callSupportDisplayer($abstract, $arguments) |
| 760 | 760 | { |
| 761 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
| 761 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
| 762 | 762 | if (is_array($value) || $value instanceof Arrayable) { |
| 763 | 763 | return call_user_func_array([collect($value), $abstract], $arguments); |
| 764 | 764 | } |
@@ -782,7 +782,7 @@ discard block |
||
| 782 | 782 | protected function callBuiltinDisplayer($abstract, $arguments) |
| 783 | 783 | { |
| 784 | 784 | if ($abstract instanceof Closure) { |
| 785 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
| 785 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
| 786 | 786 | return $abstract->call($this, ...array_merge([$value], $arguments)); |
| 787 | 787 | }); |
| 788 | 788 | } |
@@ -791,7 +791,7 @@ discard block |
||
| 791 | 791 | $grid = $this->grid; |
| 792 | 792 | $column = $this; |
| 793 | 793 | |
| 794 | - return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) { |
|
| 794 | + return $this->display(function($value) use ($abstract, $grid, $column, $arguments) { |
|
| 795 | 795 | /** @var AbstractDisplayer $displayer */ |
| 796 | 796 | $displayer = new $abstract($value, $grid, $column, $this); |
| 797 | 797 | |