@@ -96,14 +96,14 @@ discard block |
||
| 96 | 96 | $myQuery = clone $this->query; |
| 97 | 97 | // if its a normal query ( no union, having and distinct word ) |
| 98 | 98 | // replace the select with static text to improve performance |
| 99 | - if (! Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) { |
|
| 99 | + if (!Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) { |
|
| 100 | 100 | $row_count = $this->wrap('row_count'); |
| 101 | 101 | $myQuery->select($this->connection->raw("'1' as {$row_count}")); |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | // check for select soft deleted records |
| 105 | - if (! $this->withTrashed && $this->modelUseSoftDeletes()) { |
|
| 106 | - $myQuery->whereNull($myQuery->getModel()->getTable().'.deleted_at'); |
|
| 105 | + if (!$this->withTrashed && $this->modelUseSoftDeletes()) { |
|
| 106 | + $myQuery->whereNull($myQuery->getModel()->getTable() . '.deleted_at'); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | return $this->connection->table($this->connection->raw('(' . $myQuery->toSql() . ') count_row_table')) |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | $columnDef = $this->columnDef['filter'][$columnName]; |
| 145 | 145 | // check if global search should be applied for the specific column |
| 146 | 146 | $applyGlobalSearch = count($columnDef['parameters']) == 0 || end($columnDef['parameters']) !== false; |
| 147 | - if (! $applyGlobalSearch) { |
|
| 147 | + if (!$applyGlobalSearch) { |
|
| 148 | 148 | continue; |
| 149 | 149 | } |
| 150 | 150 | |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | $columns = $this->request->get('columns', []); |
| 340 | 340 | |
| 341 | 341 | foreach ($columns as $index => $column) { |
| 342 | - if (! $this->request->isColumnSearchable($index)) { |
|
| 342 | + if (!$this->request->isColumnSearchable($index)) { |
|
| 343 | 343 | continue; |
| 344 | 344 | } |
| 345 | 345 | |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | $pivotPK = $model->getForeignKey(); |
| 435 | 435 | $pivotFK = $model->getQualifiedParentKeyName(); |
| 436 | 436 | |
| 437 | - if (! in_array($pivot, $joins)) { |
|
| 437 | + if (!in_array($pivot, $joins)) { |
|
| 438 | 438 | $this->getQueryBuilder()->leftJoin($pivot, $pivotPK, '=', $pivotFK); |
| 439 | 439 | } |
| 440 | 440 | |
@@ -443,7 +443,7 @@ discard block |
||
| 443 | 443 | $tablePK = $related->getForeignKey(); |
| 444 | 444 | $tableFK = $related->getQualifiedKeyName(); |
| 445 | 445 | |
| 446 | - if (! in_array($table, $joins)) { |
|
| 446 | + if (!in_array($table, $joins)) { |
|
| 447 | 447 | $this->getQueryBuilder()->leftJoin($table, $pivot . '.' . $tablePK, '=', $tableFK); |
| 448 | 448 | } |
| 449 | 449 | } else { |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | $other = $model->getQualifiedOtherKeyName(); |
| 457 | 457 | } |
| 458 | 458 | |
| 459 | - if (! in_array($table, $joins)) { |
|
| 459 | + if (!in_array($table, $joins)) { |
|
| 460 | 460 | $this->getQueryBuilder()->leftJoin($table, $foreign, '=', $other); |
| 461 | 461 | } |
| 462 | 462 | } |
@@ -492,10 +492,10 @@ discard block |
||
| 492 | 492 | protected function regexColumnSearch($column, $keyword) |
| 493 | 493 | { |
| 494 | 494 | if ($this->isOracleSql()) { |
| 495 | - $sql = ! $this->isCaseInsensitive() ? 'REGEXP_LIKE( ' . $column . ' , ? )' : 'REGEXP_LIKE( LOWER(' . $column . ') , ?, \'i\' )'; |
|
| 495 | + $sql = !$this->isCaseInsensitive() ? 'REGEXP_LIKE( ' . $column . ' , ? )' : 'REGEXP_LIKE( LOWER(' . $column . ') , ?, \'i\' )'; |
|
| 496 | 496 | $this->query->whereRaw($sql, [$keyword]); |
| 497 | 497 | } else { |
| 498 | - $sql = ! $this->isCaseInsensitive() ? $column . ' REGEXP ?' : 'LOWER(' . $column . ') REGEXP ?'; |
|
| 498 | + $sql = !$this->isCaseInsensitive() ? $column . ' REGEXP ?' : 'LOWER(' . $column . ') REGEXP ?'; |
|
| 499 | 499 | $this->query->whereRaw($sql, [Str::lower($keyword)]); |
| 500 | 500 | } |
| 501 | 501 | } |