@@ -106,11 +106,11 @@ |
||
| 106 | 106 | return array_filter([$this->defaultOrder]); |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | - $orders = array_map(function (string $order) { |
|
| 109 | + $orders = array_map(function(string $order) { |
|
| 110 | 110 | return new OrderBy(trim($order)); |
| 111 | 111 | }, explode(',', $order)); |
| 112 | 112 | |
| 113 | - return array_filter($orders, function (OrderBy $orderBy) { |
|
| 113 | + return array_filter($orders, function(OrderBy $orderBy) { |
|
| 114 | 114 | return in_array($orderBy->field(), $this->ordersBy); |
| 115 | 115 | }); |
| 116 | 116 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | if (is_array($value)) { |
| 57 | - return array_map(function ($v) { return trim($v); }, $value); |
|
| 57 | + return array_map(function($v) { return trim($v); }, $value); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | return $value; |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | { |
| 83 | 83 | // callables are used, because filters and orders by might be used after calling that method |
| 84 | 84 | |
| 85 | - $paginator->addMeta('query', function () { |
|
| 85 | + $paginator->addMeta('query', function() { |
|
| 86 | 86 | foreach ($this->filters as $filter) { |
| 87 | 87 | if (!isset($this->unusedFilters[$filter->name()])) { |
| 88 | 88 | // only for used filters |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | return isset($queries) ? array_filter($queries) : []; |
| 94 | 94 | }); |
| 95 | 95 | |
| 96 | - $paginator->addMeta('order', function () { |
|
| 96 | + $paginator->addMeta('order', function() { |
|
| 97 | 97 | foreach ($this->ordersBy as $orderBy) { |
| 98 | 98 | if (!isset($this->unusedOrdersBy[$orderBy->field()])) { |
| 99 | 99 | // only for used orders by |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | private function setFilters(array $filters): void |
| 116 | 116 | { |
| 117 | - $keys = array_map(function (Filter $filter) { |
|
| 117 | + $keys = array_map(function(Filter $filter) { |
|
| 118 | 118 | return $filter->name(); |
| 119 | 119 | }, $filters); |
| 120 | 120 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | |
| 125 | 125 | private function setOrdersBy(array $ordersBy): void |
| 126 | 126 | { |
| 127 | - $keys = array_map(function (OrderBy $orderBy) { |
|
| 127 | + $keys = array_map(function(OrderBy $orderBy) { |
|
| 128 | 128 | return $orderBy->field(); |
| 129 | 129 | }, $ordersBy); |
| 130 | 130 | |