@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | $this->totalRecords = $this->totalCount(); |
| 425 | 425 | |
| 426 | 426 | if ($this->totalRecords) { |
| 427 | - $this->orderRecords(! $orderFirst); |
|
| 427 | + $this->orderRecords(!$orderFirst); |
|
| 428 | 428 | $this->filterRecords(); |
| 429 | 429 | $this->orderRecords($orderFirst); |
| 430 | 430 | $this->paginate(); |
@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | */ |
| 458 | 458 | protected function orderRecords($skip) |
| 459 | 459 | { |
| 460 | - if (! $skip) { |
|
| 460 | + if (!$skip) { |
|
| 461 | 461 | $this->ordering(); |
| 462 | 462 | } |
| 463 | 463 | } |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | */ |
| 489 | 489 | protected function paginate() |
| 490 | 490 | { |
| 491 | - if ($this->request->isPaginationable() && ! $this->skipPaging) { |
|
| 491 | + if ($this->request->isPaginationable() && !$this->skipPaging) { |
|
| 492 | 492 | $this->paging(); |
| 493 | 493 | } |
| 494 | 494 | } |
@@ -790,7 +790,7 @@ discard block |
||
| 790 | 790 | */ |
| 791 | 791 | public function pushToBlacklist($column) |
| 792 | 792 | { |
| 793 | - if (! $this->isBlacklisted($column)) { |
|
| 793 | + if (!$this->isBlacklisted($column)) { |
|
| 794 | 794 | array_push($this->columnDef['blacklist'], $column); |
| 795 | 795 | } |
| 796 | 796 | |
@@ -945,7 +945,7 @@ discard block |
||
| 945 | 945 | { |
| 946 | 946 | $matches = explode(' as ', Str::lower($str)); |
| 947 | 947 | |
| 948 | - if (! empty($matches)) { |
|
| 948 | + if (!empty($matches)) { |
|
| 949 | 949 | if ($wantsAlias) { |
| 950 | 950 | return array_pop($matches); |
| 951 | 951 | } else { |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $myQuery = clone $this->query; |
| 106 | 106 | // if its a normal query ( no union, having and distinct word ) |
| 107 | 107 | // replace the select with static text to improve performance |
| 108 | - if (! Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) { |
|
| 108 | + if (!Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) { |
|
| 109 | 109 | $row_count = $this->wrap('row_count'); |
| 110 | 110 | $myQuery->select($this->connection->raw("'1' as {$row_count}")); |
| 111 | 111 | } |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | |
| 171 | 171 | foreach ($this->request->searchableColumnIndex() as $index) { |
| 172 | 172 | $columnName = $this->getColumnName($index); |
| 173 | - if ($this->isBlacklisted($columnName) && ! $this->hasCustomFilter($columnName)) { |
|
| 173 | + if ($this->isBlacklisted($columnName) && !$this->hasCustomFilter($columnName)) { |
|
| 174 | 174 | continue; |
| 175 | 175 | } |
| 176 | 176 | |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | */ |
| 214 | 214 | protected function getBaseQueryBuilder($instance = null) |
| 215 | 215 | { |
| 216 | - if (! $instance) { |
|
| 216 | + if (!$instance) { |
|
| 217 | 217 | $instance = $this->query; |
| 218 | 218 | } |
| 219 | 219 | |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | $q = $query; |
| 389 | 389 | } |
| 390 | 390 | |
| 391 | - if (! $q->from instanceof Expression) { |
|
| 391 | + if (!$q->from instanceof Expression) { |
|
| 392 | 392 | // Get table from query and add it. |
| 393 | 393 | $column = $q->from . '.' . $column; |
| 394 | 394 | } |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | $columns = $this->request->columns(); |
| 448 | 448 | |
| 449 | 449 | foreach ($columns as $index => $column) { |
| 450 | - if (! $this->request->isColumnSearchable($index)) { |
|
| 450 | + if (!$this->request->isColumnSearchable($index)) { |
|
| 451 | 451 | continue; |
| 452 | 452 | } |
| 453 | 453 | |
@@ -569,7 +569,7 @@ discard block |
||
| 569 | 569 | $joins[] = $join->table; |
| 570 | 570 | } |
| 571 | 571 | |
| 572 | - if (! in_array($table, $joins)) { |
|
| 572 | + if (!in_array($table, $joins)) { |
|
| 573 | 573 | $this->getBaseQueryBuilder()->leftJoin($table, $foreign, '=', $other); |
| 574 | 574 | } |
| 575 | 575 | } |
@@ -600,13 +600,13 @@ discard block |
||
| 600 | 600 | protected function regexColumnSearch($column, $keyword) |
| 601 | 601 | { |
| 602 | 602 | if ($this->isOracleSql()) { |
| 603 | - $sql = ! $this->isCaseInsensitive() ? 'REGEXP_LIKE( ' . $column . ' , ? )' : 'REGEXP_LIKE( LOWER(' . $column . ') , ?, \'i\' )'; |
|
| 603 | + $sql = !$this->isCaseInsensitive() ? 'REGEXP_LIKE( ' . $column . ' , ? )' : 'REGEXP_LIKE( LOWER(' . $column . ') , ?, \'i\' )'; |
|
| 604 | 604 | $this->query->whereRaw($sql, [$keyword]); |
| 605 | 605 | } elseif ($this->database == 'pgsql') { |
| 606 | - $sql = ! $this->isCaseInsensitive() ? $column . ' ~ ?' : $column . ' ~* ? '; |
|
| 606 | + $sql = !$this->isCaseInsensitive() ? $column . ' ~ ?' : $column . ' ~* ? '; |
|
| 607 | 607 | $this->query->whereRaw($sql, [$keyword]); |
| 608 | 608 | } else { |
| 609 | - $sql = ! $this->isCaseInsensitive() ? $column . ' REGEXP ?' : 'LOWER(' . $column . ') REGEXP ?'; |
|
| 609 | + $sql = !$this->isCaseInsensitive() ? $column . ' REGEXP ?' : 'LOWER(' . $column . ') REGEXP ?'; |
|
| 610 | 610 | $this->query->whereRaw($sql, [Str::lower($keyword)]); |
| 611 | 611 | } |
| 612 | 612 | } |
@@ -627,7 +627,7 @@ discard block |
||
| 627 | 627 | foreach ($this->request->orderableColumns() as $orderable) { |
| 628 | 628 | $column = $this->getColumnName($orderable['column'], true); |
| 629 | 629 | |
| 630 | - if ($this->isBlacklisted($column) && ! $this->hasCustomOrder($column)) { |
|
| 630 | + if ($this->isBlacklisted($column) && !$this->hasCustomOrder($column)) { |
|
| 631 | 631 | continue; |
| 632 | 632 | } |
| 633 | 633 | |
@@ -653,7 +653,7 @@ discard block |
||
| 653 | 653 | $isMorphToMany = false; |
| 654 | 654 | foreach (explode('.', $relation) as $eachRelation) { |
| 655 | 655 | $relationship = $lastQuery->getRelation($eachRelation); |
| 656 | - if (! ($relationship instanceof MorphToMany)) { |
|
| 656 | + if (!($relationship instanceof MorphToMany)) { |
|
| 657 | 657 | $isMorphToMany = true; |
| 658 | 658 | } |
| 659 | 659 | $lastQuery = $relationship; |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | $builder = $model instanceof Builder ? $model : $model->getQuery(); |
| 40 | 40 | parent::__construct($builder->getQuery(), $request); |
| 41 | 41 | |
| 42 | - $this->query = $builder; |
|
| 42 | + $this->query = $builder; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -52,13 +52,13 @@ discard block |
||
| 52 | 52 | $myQuery = clone $this->query; |
| 53 | 53 | // if its a normal query ( no union, having and distinct word ) |
| 54 | 54 | // replace the select with static text to improve performance |
| 55 | - if (! Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) { |
|
| 55 | + if (!Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) { |
|
| 56 | 56 | $row_count = $this->wrap('row_count'); |
| 57 | 57 | $myQuery->select($this->connection->raw("'1' as {$row_count}")); |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | // check for select soft deleted records |
| 61 | - if (! $this->withTrashed && ! $this->onlyTrashed && $this->modelUseSoftDeletes()) { |
|
| 61 | + if (!$this->withTrashed && !$this->onlyTrashed && $this->modelUseSoftDeletes()) { |
|
| 62 | 62 | $myQuery->whereNull($myQuery->getModel()->getQualifiedDeletedAtColumn()); |
| 63 | 63 | } |
| 64 | 64 | |