@@ -13,7 +13,7 @@ |
||
| 13 | 13 | { |
| 14 | 14 | $value = Arr::get($inputs, $this->column); |
| 15 | 15 | |
| 16 | - if (! isset($value)) { |
|
| 16 | + if (!isset($value)) { |
|
| 17 | 17 | return; |
| 18 | 18 | } |
| 19 | 19 | |
@@ -112,13 +112,13 @@ |
||
| 112 | 112 | */ |
| 113 | 113 | public function model($model, $idField = 'id', $textField = 'name') |
| 114 | 114 | { |
| 115 | - if (! class_exists($model) |
|
| 116 | - || ! in_array(Model::class, class_parents($model)) |
|
| 115 | + if (!class_exists($model) |
|
| 116 | + || !in_array(Model::class, class_parents($model)) |
|
| 117 | 117 | ) { |
| 118 | 118 | throw new \InvalidArgumentException("[$model] must be a valid model class"); |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | - $this->options = function ($value) use ($model, $idField, $textField) { |
|
| 121 | + $this->options = function($value) use ($model, $idField, $textField) { |
|
| 122 | 122 | if (empty($value)) { |
| 123 | 123 | return []; |
| 124 | 124 | } |
@@ -60,20 +60,20 @@ |
||
| 60 | 60 | if ($this->ignore) { |
| 61 | 61 | return; |
| 62 | 62 | } |
| 63 | - if (! Arr::has($inputs, $this->column)) { |
|
| 63 | + if (!Arr::has($inputs, $this->column)) { |
|
| 64 | 64 | return; |
| 65 | 65 | } |
| 66 | 66 | $this->value = Arr::get($inputs, $this->column); |
| 67 | - $value = array_filter($this->value, function ($val) { |
|
| 67 | + $value = array_filter($this->value, function($val) { |
|
| 68 | 68 | return $val !== ''; |
| 69 | 69 | }); |
| 70 | 70 | if (empty($value)) { |
| 71 | 71 | return; |
| 72 | 72 | } |
| 73 | - if (! isset($value['start'])) { |
|
| 73 | + if (!isset($value['start'])) { |
|
| 74 | 74 | return $this->buildCondition($this->column, '<=', $value['end']); |
| 75 | 75 | } |
| 76 | - if (! isset($value['end'])) { |
|
| 76 | + if (!isset($value['end'])) { |
|
| 77 | 77 | return $this->buildCondition($this->column, '>=', $value['start']); |
| 78 | 78 | } |
| 79 | 79 | $this->query = 'whereBetween'; |
@@ -264,7 +264,7 @@ |
||
| 264 | 264 | { |
| 265 | 265 | $value = Arr::get($inputs, $this->column); |
| 266 | 266 | |
| 267 | - if (! isset($value)) { |
|
| 267 | + if (!isset($value)) { |
|
| 268 | 268 | return; |
| 269 | 269 | } |
| 270 | 270 | |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | */ |
| 187 | 187 | public function siblings($index = null) |
| 188 | 188 | { |
| 189 | - if (! is_null($index)) { |
|
| 189 | + if (!is_null($index)) { |
|
| 190 | 190 | return Arr::get($this->parent->filters(), $index); |
| 191 | 191 | } |
| 192 | 192 | |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | |
| 237 | 237 | $value = Arr::get($inputs, $this->column); |
| 238 | 238 | |
| 239 | - if (! isset($value)) { |
|
| 239 | + if (!isset($value)) { |
|
| 240 | 240 | return; |
| 241 | 241 | } |
| 242 | 242 | |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | $relation = substr($this->column, 0, strrpos($this->column, '.')); |
| 476 | 476 | $args[0] = last(explode('.', $this->column)); |
| 477 | 477 | |
| 478 | - return ['whereHas' => [$relation, function ($relation) use ($args) { |
|
| 478 | + return ['whereHas' => [$relation, function($relation) use ($args) { |
|
| 479 | 479 | call_user_func_array([$relation, $this->query], $args); |
| 480 | 480 | }]]; |
| 481 | 481 | } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function condition() |
| 59 | 59 | { |
| 60 | - return $this->queries->map(function ($query) { |
|
| 60 | + return $this->queries->map(function($query) { |
|
| 61 | 61 | return [$query['method'] => $query['arguments']]; |
| 62 | 62 | })->toArray(); |
| 63 | 63 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | */ |
| 84 | 84 | public function asDefault() |
| 85 | 85 | { |
| 86 | - if (! request()->input('_scope_')) { |
|
| 86 | + if (!request()->input('_scope_')) { |
|
| 87 | 87 | request()->merge(['_scope_' => $this->key]); |
| 88 | 88 | } |
| 89 | 89 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | { |
| 37 | 37 | $this->tools->disableFilterButton($disable); |
| 38 | 38 | |
| 39 | - return $this->option('show_filter', ! $disable); |
|
| 39 | + return $this->option('show_filter', !$disable); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | /** |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | public function renderFilter() |
| 84 | 84 | { |
| 85 | - if (! $this->option('show_filter')) { |
|
| 85 | + if (!$this->option('show_filter')) { |
|
| 86 | 86 | return ''; |
| 87 | 87 | } |
| 88 | 88 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | public function footer(Closure $closure = null) |
| 23 | 23 | { |
| 24 | - if (! $closure) { |
|
| 24 | + if (!$closure) { |
|
| 25 | 25 | return $this->footer; |
| 26 | 26 | } |
| 27 | 27 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function renderFooter() |
| 39 | 39 | { |
| 40 | - if (! $this->footer) { |
|
| 40 | + if (!$this->footer) { |
|
| 41 | 41 | return ''; |
| 42 | 42 | } |
| 43 | 43 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | public function header(Closure $closure = null) |
| 23 | 23 | { |
| 24 | - if (! $closure) { |
|
| 24 | + if (!$closure) { |
|
| 25 | 25 | return $this->header; |
| 26 | 26 | } |
| 27 | 27 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | public function renderHeader() |
| 37 | 37 | { |
| 38 | - if (! $this->header) { |
|
| 38 | + if (!$this->header) { |
|
| 39 | 39 | return ''; |
| 40 | 40 | } |
| 41 | 41 | |