@@ -17,7 +17,6 @@ |
||
| 17 | 17 | use Illuminate\Support\Str; |
| 18 | 18 | use yajra\Datatables\Contracts\DataTableEngine; |
| 19 | 19 | use yajra\Datatables\Request; |
| 20 | -use yajra\Datatables\Helper; |
|
| 21 | 20 | |
| 22 | 21 | class CollectionEngine extends BaseEngine implements DataTableEngine |
| 23 | 22 | { |
@@ -256,7 +256,9 @@ |
||
| 256 | 256 | * which causes a query exception |
| 257 | 257 | * The temporary fix is modify `*` column to `id` column |
| 258 | 258 | */ |
| 259 | - if ($column === '*') $column = 'id'; |
|
| 259 | + if ($column === '*') { |
|
| 260 | + $column = 'id'; |
|
| 261 | + } |
|
| 260 | 262 | $this->getQueryBuilder()->orderBy($column, $orderable['direction']); |
| 261 | 263 | } |
| 262 | 264 | } |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | { |
| 259 | 259 | $matches = explode(' as ', Str::lower($str)); |
| 260 | 260 | |
| 261 | - if (! empty($matches)) { |
|
| 261 | + if ( ! empty($matches)) { |
|
| 262 | 262 | if ($wantsAlias) { |
| 263 | 263 | return array_pop($matches); |
| 264 | 264 | } else { |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | */ |
| 326 | 326 | public function getQueryBuilder($instance = null) |
| 327 | 327 | { |
| 328 | - if (! $instance) { |
|
| 328 | + if ( ! $instance) { |
|
| 329 | 329 | $instance = $this->query; |
| 330 | 330 | } |
| 331 | 331 | |
@@ -579,7 +579,7 @@ discard block |
||
| 579 | 579 | $this->totalRecords = $this->count(); |
| 580 | 580 | |
| 581 | 581 | if ($this->totalRecords) { |
| 582 | - $this->orderRecords(! $orderFirst); |
|
| 582 | + $this->orderRecords( ! $orderFirst); |
|
| 583 | 583 | $this->filterRecords(); |
| 584 | 584 | $this->orderRecords($orderFirst); |
| 585 | 585 | $this->paginate(); |
@@ -603,7 +603,7 @@ discard block |
||
| 603 | 603 | */ |
| 604 | 604 | public function orderRecords($skip) |
| 605 | 605 | { |
| 606 | - if (! $skip) { |
|
| 606 | + if ( ! $skip) { |
|
| 607 | 607 | $this->ordering(); |
| 608 | 608 | } |
| 609 | 609 | } |