@@ -309,7 +309,7 @@ |
||
309 | 309 | * Perform case insensitive column search. |
310 | 310 | * |
311 | 311 | * @param int $i |
312 | - * @param mixed $column |
|
312 | + * @param string $column |
|
313 | 313 | * @param string $keyword |
314 | 314 | */ |
315 | 315 | protected function caseInsensitiveColumnSearch($i, $column, $keyword) |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $myQuery = clone $this->query; |
95 | 95 | // if its a normal query ( no union, having and distinct word ) |
96 | 96 | // replace the select with static text to improve performance |
97 | - if (! Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) { |
|
97 | + if (!Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) { |
|
98 | 98 | $row_count = $this->wrap('row_count'); |
99 | 99 | $myQuery->select($this->connection->raw("'1' as {$row_count}")); |
100 | 100 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $columnDef = $this->columnDef['filter'][$columnName]; |
137 | 137 | // check if global search should be applied for the specific column |
138 | 138 | $applyGlobalSearch = count($columnDef['parameters']) == 0 || end($columnDef['parameters']) !== false; |
139 | - if (! $applyGlobalSearch) { |
|
139 | + if (!$applyGlobalSearch) { |
|
140 | 140 | continue; |
141 | 141 | } |
142 | 142 | |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | $keyword = "%$keyword%"; |
287 | 287 | } |
288 | 288 | |
289 | - $query->{$relation .'WhereRaw'}($sql, [$keyword]); |
|
289 | + $query->{$relation . 'WhereRaw'}($sql, [$keyword]); |
|
290 | 290 | } |
291 | 291 | |
292 | 292 | /** |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | $columns = $this->request->get('columns', []); |
318 | 318 | |
319 | 319 | foreach ($columns as $index => $column) { |
320 | - if (! $this->request->isColumnSearchable($index)) { |
|
320 | + if (!$this->request->isColumnSearchable($index)) { |
|
321 | 321 | continue; |
322 | 322 | } |
323 | 323 | |
@@ -404,10 +404,10 @@ discard block |
||
404 | 404 | protected function regexColumnSearch($column, $keyword) |
405 | 405 | { |
406 | 406 | if ($this->isOracleSql()) { |
407 | - $sql = ! $this->isCaseInsensitive() ? 'REGEXP_LIKE( ' . $column . ' , ? )' : 'REGEXP_LIKE( LOWER(' . $column . ') , ?, \'i\' )'; |
|
407 | + $sql = !$this->isCaseInsensitive() ? 'REGEXP_LIKE( ' . $column . ' , ? )' : 'REGEXP_LIKE( LOWER(' . $column . ') , ?, \'i\' )'; |
|
408 | 408 | $this->query->whereRaw($sql, [$keyword]); |
409 | 409 | } else { |
410 | - $sql = ! $this->isCaseInsensitive() ? $column . ' REGEXP ?' : 'LOWER(' . $column . ') REGEXP ?'; |
|
410 | + $sql = !$this->isCaseInsensitive() ? $column . ' REGEXP ?' : 'LOWER(' . $column . ') REGEXP ?'; |
|
411 | 411 | $this->query->whereRaw($sql, [Str::lower($keyword)]); |
412 | 412 | } |
413 | 413 | } |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | $pivotPK = $model->getForeignKey(); |
480 | 480 | $pivotFK = $model->getQualifiedParentKeyName(); |
481 | 481 | |
482 | - if (! in_array($pivot, $joins)) { |
|
482 | + if (!in_array($pivot, $joins)) { |
|
483 | 483 | $this->getQueryBuilder()->leftJoin($pivot, $pivotPK, '=', $pivotFK); |
484 | 484 | } |
485 | 485 | |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | $tablePK = $related->getForeignKey(); |
489 | 489 | $tableFK = $related->getQualifiedKeyName(); |
490 | 490 | |
491 | - if (! in_array($table, $joins)) { |
|
491 | + if (!in_array($table, $joins)) { |
|
492 | 492 | $this->getQueryBuilder()->leftJoin($table, $pivot . '.' . $tablePK, '=', $tableFK); |
493 | 493 | } |
494 | 494 | } else { |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | $other = $model->getQualifiedOtherKeyName(); |
502 | 502 | } |
503 | 503 | |
504 | - if (! in_array($table, $joins)) { |
|
504 | + if (!in_array($table, $joins)) { |
|
505 | 505 | $this->getQueryBuilder()->leftJoin($table, $foreign, '=', $other); |
506 | 506 | } |
507 | 507 | } |