@@ -88,18 +88,18 @@ discard block |
||
88 | 88 | $crossMin = config('repository.criteria.cross.min', 'min'); |
89 | 89 | $crossMax = config('repository.criteria.cross.min', 'max'); |
90 | 90 | |
91 | - $this->setSearchClosure('cross', function (...$attributes) use ($crossMin, $crossMax) { |
|
92 | - return $attributes[0]->where(function (Builder $query) use ($attributes, $crossMin, $crossMax) { |
|
93 | - $query->where(function (Builder $query) use ($attributes, $crossMin, $crossMax) { |
|
91 | + $this->setSearchClosure('cross', function(...$attributes) use ($crossMin, $crossMax) { |
|
92 | + return $attributes[0]->where(function(Builder $query) use ($attributes, $crossMin, $crossMax) { |
|
93 | + $query->where(function(Builder $query) use ($attributes, $crossMin, $crossMax) { |
|
94 | 94 | $query->where("{$attributes[2]}_{$crossMin}", '<=', (int) $attributes[3][0]) |
95 | 95 | ->where("{$attributes[2]}_{$crossMax}", '>=', (int) $attributes[3][1]); |
96 | - })->orWhere(function (Builder $query) use ($attributes, $crossMin, $crossMax) { |
|
96 | + })->orWhere(function(Builder $query) use ($attributes, $crossMin, $crossMax) { |
|
97 | 97 | $query->where("{$attributes[2]}_{$crossMin}", '<=', (int) $attributes[3][0]) |
98 | 98 | ->where("{$attributes[2]}_{$crossMax}", '>=', (int) $attributes[3][0]); |
99 | - })->orWhere(function (Builder $query) use ($attributes, $crossMin, $crossMax) { |
|
99 | + })->orWhere(function(Builder $query) use ($attributes, $crossMin, $crossMax) { |
|
100 | 100 | $query->where("{$attributes[2]}_{$crossMin}", '>=', (int) $attributes[3][0]) |
101 | 101 | ->where("{$attributes[2]}_{$crossMax}", '<=', (int) $attributes[3][1]); |
102 | - })->orWhere(function (Builder $query) use ($attributes, $crossMin, $crossMax) { |
|
102 | + })->orWhere(function(Builder $query) use ($attributes, $crossMin, $crossMax) { |
|
103 | 103 | $query->where("{$attributes[2]}_{$crossMin}", '>=', (int) $attributes[3][0]) |
104 | 104 | ->where("{$attributes[2]}_{$crossMax}", '>=', (int) $attributes[3][1]) |
105 | 105 | ->where("{$attributes[2]}_{$crossMin}", '<=', (int) $attributes[3][1]); |
@@ -110,14 +110,14 @@ discard block |
||
110 | 110 | |
111 | 111 | protected function setBetweenSearchClosure() |
112 | 112 | { |
113 | - $this->setSearchClosure('between', function (...$attributes) { |
|
113 | + $this->setSearchClosure('between', function(...$attributes) { |
|
114 | 114 | return $attributes[0]->whereBetween($attributes[2], $attributes[3]); |
115 | 115 | }); |
116 | 116 | } |
117 | 117 | |
118 | 118 | protected function setInSearchClosure() |
119 | 119 | { |
120 | - $this->setSearchClosure('in', function (...$attributes) { |
|
120 | + $this->setSearchClosure('in', function(...$attributes) { |
|
121 | 121 | return $attributes[0]->whereIn($attributes[2], $attributes[3]); |
122 | 122 | }); |
123 | 123 | } |