@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | protected function prepareQuery() |
100 | 100 | { |
101 | - if (! $this->prepared) { |
|
101 | + if (!$this->prepared) { |
|
102 | 102 | $this->totalRecords = $this->totalCount(); |
103 | 103 | |
104 | 104 | if ($this->totalRecords) { |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | { |
146 | 146 | $builder = clone $this->query; |
147 | 147 | |
148 | - if (! $this->isComplexQuery($builder)) { |
|
148 | + if (!$this->isComplexQuery($builder)) { |
|
149 | 149 | $row_count = $this->wrap('row_count'); |
150 | 150 | $builder->select($this->connection->raw("'1' as {$row_count}")); |
151 | 151 | $builder->setBindings([], 'select'); |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | $columns = $this->request->columns(); |
219 | 219 | |
220 | 220 | foreach ($columns as $index => $column) { |
221 | - if (! $this->request->isColumnSearchable($index)) { |
|
221 | + if (!$this->request->isColumnSearchable($index)) { |
|
222 | 222 | continue; |
223 | 223 | } |
224 | 224 | |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | */ |
298 | 298 | protected function getBaseQueryBuilder($instance = null) |
299 | 299 | { |
300 | - if (! $instance) { |
|
300 | + if (!$instance) { |
|
301 | 301 | $instance = $this->query; |
302 | 302 | } |
303 | 303 | |
@@ -346,18 +346,18 @@ discard block |
||
346 | 346 | { |
347 | 347 | switch ($this->connection->getDriverName()) { |
348 | 348 | case 'oracle': |
349 | - $sql = ! $this->config->isCaseInsensitive() |
|
349 | + $sql = !$this->config->isCaseInsensitive() |
|
350 | 350 | ? 'REGEXP_LIKE( ' . $column . ' , ? )' |
351 | 351 | : 'REGEXP_LIKE( LOWER(' . $column . ') , ?, \'i\' )'; |
352 | 352 | break; |
353 | 353 | |
354 | 354 | case 'pgsql': |
355 | 355 | $column = $this->castColumn($column); |
356 | - $sql = ! $this->config->isCaseInsensitive() ? $column . ' ~ ?' : $column . ' ~* ? '; |
|
356 | + $sql = !$this->config->isCaseInsensitive() ? $column . ' ~ ?' : $column . ' ~* ? '; |
|
357 | 357 | break; |
358 | 358 | |
359 | 359 | default: |
360 | - $sql = ! $this->config->isCaseInsensitive() |
|
360 | + $sql = !$this->config->isCaseInsensitive() |
|
361 | 361 | ? $column . ' REGEXP ?' |
362 | 362 | : 'LOWER(' . $column . ') REGEXP ?'; |
363 | 363 | $keyword = Str::lower($keyword); |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | { |
418 | 418 | if (strpos($column, '.') === false) { |
419 | 419 | $q = $this->getBaseQueryBuilder($query); |
420 | - if (! $q->from instanceof Expression) { |
|
420 | + if (!$q->from instanceof Expression) { |
|
421 | 421 | $column = $q->from . '.' . $column; |
422 | 422 | } |
423 | 423 | } |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | return $orderable; |
575 | 575 | }) |
576 | 576 | ->reject(function ($orderable) { |
577 | - return $this->isBlacklisted($orderable['name']) && ! $this->hasOrderColumn($orderable['name']); |
|
577 | + return $this->isBlacklisted($orderable['name']) && !$this->hasOrderColumn($orderable['name']); |
|
578 | 578 | }) |
579 | 579 | ->each(function ($orderable) { |
580 | 580 | $column = $this->resolveRelationColumn($orderable['name']); |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | return $this->getColumnName($index); |
643 | 643 | }) |
644 | 644 | ->reject(function ($column) { |
645 | - return $this->isBlacklisted($column) && ! $this->hasFilterColumn($column); |
|
645 | + return $this->isBlacklisted($column) && !$this->hasFilterColumn($column); |
|
646 | 646 | }) |
647 | 647 | ->each(function ($column) use ($keyword, $query) { |
648 | 648 | if ($this->hasFilterColumn($column)) { |
@@ -474,7 +474,7 @@ discard block |
||
474 | 474 | */ |
475 | 475 | public function pushToBlacklist($column) |
476 | 476 | { |
477 | - if (! $this->isBlacklisted($column)) { |
|
477 | + if (!$this->isBlacklisted($column)) { |
|
478 | 478 | $this->columnDef['blacklist'][] = $column; |
479 | 479 | } |
480 | 480 | |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | */ |
660 | 660 | protected function paginate() |
661 | 661 | { |
662 | - if ($this->request->isPaginationable() && ! $this->skipPaging) { |
|
662 | + if ($this->request->isPaginationable() && !$this->skipPaging) { |
|
663 | 663 | $this->paging(); |
664 | 664 | } |
665 | 665 | } |
@@ -766,7 +766,7 @@ discard block |
||
766 | 766 | $error = $this->config->get('datatables.error'); |
767 | 767 | $debug = $this->config->get('app.debug'); |
768 | 768 | |
769 | - if ($error === 'throw' || (! $error && ! $debug)) { |
|
769 | + if ($error === 'throw' || (!$error && !$debug)) { |
|
770 | 770 | throw new Exception($exception->getMessage(), $code = 0, $exception); |
771 | 771 | } |
772 | 772 | |
@@ -777,7 +777,7 @@ discard block |
||
777 | 777 | 'recordsTotal' => $this->totalRecords, |
778 | 778 | 'recordsFiltered' => 0, |
779 | 779 | 'data' => [], |
780 | - 'error' => $error ? __($error) : "Exception Message:\n\n".$exception->getMessage(), |
|
780 | + 'error' => $error ? __($error) : "Exception Message:\n\n" . $exception->getMessage(), |
|
781 | 781 | ]); |
782 | 782 | } |
783 | 783 | |
@@ -815,7 +815,7 @@ discard block |
||
815 | 815 | protected function setupKeyword($value) |
816 | 816 | { |
817 | 817 | if ($this->config->isSmartSearch()) { |
818 | - $keyword = '%'.$value.'%'; |
|
818 | + $keyword = '%' . $value . '%'; |
|
819 | 819 | if ($this->config->isWildcard()) { |
820 | 820 | $keyword = Helper::wildcardLikeString($value); |
821 | 821 | } |