Completed
Push — master ( 25183e...34cd5e )
by Arjay
02:20
created
src/Engines/QueryBuilderEngine.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $myQuery = clone $this->query;
100 100
         // if its a normal query ( no union, having and distinct word )
101 101
         // replace the select with static text to improve performance
102
-        if (! Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) {
102
+        if (!Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) {
103 103
             $row_count = $this->wrap('row_count');
104 104
             $myQuery->select($this->connection->raw("'1' as {$row_count}"));
105 105
         }
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                         $columnDef = $this->columnDef['filter'][$columnName];
143 143
                         // check if global search should be applied for the specific column
144 144
                         $applyGlobalSearch = count($columnDef['parameters']) == 0 || end($columnDef['parameters']) !== false;
145
-                        if (! $applyGlobalSearch) {
145
+                        if (!$applyGlobalSearch) {
146 146
                             continue;
147 147
                         }
148 148
 
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
447 447
         $columns = (array) $this->request->input('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
 
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
             $joins[] = $join->table;
572 572
         }
573 573
 
574
-        if (! in_array($table, $joins)) {
574
+        if (!in_array($table, $joins)) {
575 575
             $this->getQueryBuilder()->leftJoin($table, $foreign, '=', $other);
576 576
         }
577 577
     }
@@ -602,13 +602,13 @@  discard block
 block discarded – undo
602 602
     protected function regexColumnSearch($column, $keyword)
603 603
     {
604 604
         if ($this->isOracleSql()) {
605
-            $sql = ! $this->isCaseInsensitive() ? 'REGEXP_LIKE( ' . $column . ' , ? )' : 'REGEXP_LIKE( LOWER(' . $column . ') , ?, \'i\' )';
605
+            $sql = !$this->isCaseInsensitive() ? 'REGEXP_LIKE( ' . $column . ' , ? )' : 'REGEXP_LIKE( LOWER(' . $column . ') , ?, \'i\' )';
606 606
             $this->query->whereRaw($sql, [$keyword]);
607 607
         } elseif ($this->database == 'pgsql') {
608
-            $sql = ! $this->isCaseInsensitive() ? $column . ' ~ ?' : $column . ' ~* ? ';
608
+            $sql = !$this->isCaseInsensitive() ? $column . ' ~ ?' : $column . ' ~* ? ';
609 609
             $this->query->whereRaw($sql, [$keyword]);
610 610
         } else {
611
-            $sql = ! $this->isCaseInsensitive() ? $column . ' REGEXP ?' : 'LOWER(' . $column . ') REGEXP ?';
611
+            $sql = !$this->isCaseInsensitive() ? $column . ' REGEXP ?' : 'LOWER(' . $column . ') REGEXP ?';
612 612
             $this->query->whereRaw($sql, [Str::lower($keyword)]);
613 613
         }
614 614
     }
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
 
654 654
                     if (in_array($relation, $eagerLoads)) {
655 655
                         $relationship = $this->query->getRelation($relation);
656
-                        if (! ($relationship instanceof MorphToMany)) {
656
+                        if (!($relationship instanceof MorphToMany)) {
657 657
                             $column = $this->joinEagerLoadedColumn($relation, $relationColumn);
658 658
                         } else {
659 659
                             $valid = 0;
Please login to merge, or discard this patch.