@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $myQuery = clone $this->query; |
96 | 96 | // if its a normal query ( no union, having and distinct word ) |
97 | 97 | // replace the select with static text to improve performance |
98 | - if (! Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) { |
|
98 | + if (!Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) { |
|
99 | 99 | $row_count = $this->wrap('row_count'); |
100 | 100 | $myQuery->select($this->connection->raw("'1' as {$row_count}")); |
101 | 101 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $columnDef = $this->columnDef['filter'][$columnName]; |
139 | 139 | // check if global search should be applied for the specific column |
140 | 140 | $applyGlobalSearch = count($columnDef['parameters']) == 0 || end($columnDef['parameters']) !== false; |
141 | - if (! $applyGlobalSearch) { |
|
141 | + if (!$applyGlobalSearch) { |
|
142 | 142 | continue; |
143 | 143 | } |
144 | 144 | |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | $columns = $this->request->get('columns', []); |
334 | 334 | |
335 | 335 | foreach ($columns as $index => $column) { |
336 | - if (! $this->request->isColumnSearchable($index)) { |
|
336 | + if (!$this->request->isColumnSearchable($index)) { |
|
337 | 337 | continue; |
338 | 338 | } |
339 | 339 | |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | $pivotPK = $model->getForeignKey(); |
415 | 415 | $pivotFK = $model->getQualifiedParentKeyName(); |
416 | 416 | |
417 | - if (! in_array($pivot, $joins)) { |
|
417 | + if (!in_array($pivot, $joins)) { |
|
418 | 418 | $this->getQueryBuilder()->leftJoin($pivot, $pivotPK, '=', $pivotFK); |
419 | 419 | } |
420 | 420 | |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | $tablePK = $related->getForeignKey(); |
424 | 424 | $tableFK = $related->getQualifiedKeyName(); |
425 | 425 | |
426 | - if (! in_array($table, $joins)) { |
|
426 | + if (!in_array($table, $joins)) { |
|
427 | 427 | $this->getQueryBuilder()->leftJoin($table, $pivot . '.' . $tablePK, '=', $tableFK); |
428 | 428 | } |
429 | 429 | } else { |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | $other = $model->getQualifiedOtherKeyName(); |
437 | 437 | } |
438 | 438 | |
439 | - if (! in_array($table, $joins)) { |
|
439 | + if (!in_array($table, $joins)) { |
|
440 | 440 | $this->getQueryBuilder()->leftJoin($table, $foreign, '=', $other); |
441 | 441 | } |
442 | 442 | } |
@@ -472,10 +472,10 @@ discard block |
||
472 | 472 | protected function regexColumnSearch($column, $keyword) |
473 | 473 | { |
474 | 474 | if ($this->isOracleSql()) { |
475 | - $sql = ! $this->isCaseInsensitive() ? 'REGEXP_LIKE( ' . $column . ' , ? )' : 'REGEXP_LIKE( LOWER(' . $column . ') , ?, \'i\' )'; |
|
475 | + $sql = !$this->isCaseInsensitive() ? 'REGEXP_LIKE( ' . $column . ' , ? )' : 'REGEXP_LIKE( LOWER(' . $column . ') , ?, \'i\' )'; |
|
476 | 476 | $this->query->whereRaw($sql, [$keyword]); |
477 | 477 | } else { |
478 | - $sql = ! $this->isCaseInsensitive() ? $column . ' REGEXP ?' : 'LOWER(' . $column . ') REGEXP ?'; |
|
478 | + $sql = !$this->isCaseInsensitive() ? $column . ' REGEXP ?' : 'LOWER(' . $column . ') REGEXP ?'; |
|
479 | 479 | $this->query->whereRaw($sql, [Str::lower($keyword)]); |
480 | 480 | } |
481 | 481 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $keyword = $this->request->keyword(); |
151 | 151 | foreach ($this->request->searchableColumnIndex() as $index) { |
152 | 152 | $column = $this->getColumnName($index); |
153 | - if (! $value = Arr::get($data, $column)) { |
|
153 | + if (!$value = Arr::get($data, $column)) { |
|
154 | 154 | continue; |
155 | 155 | } |
156 | 156 | |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | { |
208 | 208 | $this->collection = $this->collection->slice( |
209 | 209 | $this->request['start'], |
210 | - (int)$this->request['length'] > 0 ? $this->request['length'] : 10 |
|
210 | + (int) $this->request['length'] > 0 ? $this->request['length'] : 10 |
|
211 | 211 | ); |
212 | 212 | } |
213 | 213 |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | foreach ($joins as $join) { |
289 | 289 | $table = preg_split('/ as /i', $join->table); |
290 | 290 | $names[] = $table[0]; |
291 | - if (isset($table[1]) && ! empty($databasePrefix) && strpos($table[1], $databasePrefix) == 0) { |
|
291 | + if (isset($table[1]) && !empty($databasePrefix) && strpos($table[1], $databasePrefix) == 0) { |
|
292 | 292 | $names[] = preg_replace('/^' . $databasePrefix . '/', '', $table[1]); |
293 | 293 | } |
294 | 294 | } |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | */ |
305 | 305 | public function getQueryBuilder($instance = null) |
306 | 306 | { |
307 | - if (! $instance) { |
|
307 | + if (!$instance) { |
|
308 | 308 | $instance = $this->query; |
309 | 309 | } |
310 | 310 | |
@@ -588,7 +588,7 @@ discard block |
||
588 | 588 | $this->totalRecords = $this->totalCount(); |
589 | 589 | |
590 | 590 | if ($this->totalRecords) { |
591 | - $this->orderRecords(! $orderFirst); |
|
591 | + $this->orderRecords(!$orderFirst); |
|
592 | 592 | $this->filterRecords(); |
593 | 593 | $this->orderRecords($orderFirst); |
594 | 594 | $this->paginate(); |
@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | */ |
606 | 606 | public function orderRecords($skip) |
607 | 607 | { |
608 | - if (! $skip) { |
|
608 | + if (!$skip) { |
|
609 | 609 | $this->ordering(); |
610 | 610 | } |
611 | 611 | } |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | */ |
637 | 637 | public function paginate() |
638 | 638 | { |
639 | - if ($this->request->isPaginationable() && ! $this->skipPaging) { |
|
639 | + if ($this->request->isPaginationable() && !$this->skipPaging) { |
|
640 | 640 | $this->paging(); |
641 | 641 | } |
642 | 642 | } |
@@ -957,7 +957,7 @@ discard block |
||
957 | 957 | { |
958 | 958 | $matches = explode(' as ', Str::lower($str)); |
959 | 959 | |
960 | - if (! empty($matches)) { |
|
960 | + if (!empty($matches)) { |
|
961 | 961 | if ($wantsAlias) { |
962 | 962 | return array_pop($matches); |
963 | 963 | } else { |