Completed
Push — master ( 80ba42...c75345 )
by Arjay
01:44
created
src/Helper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
      */
132 132
     public static function getOrMethod($method)
133 133
     {
134
-        if (! Str::contains(Str::lower($method), 'or')) {
134
+        if (!Str::contains(Str::lower($method), 'or')) {
135 135
             return 'or' . ucfirst($method);
136 136
         }
137 137
 
Please login to merge, or discard this patch.
src/Processors/RowProcessor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
      */
42 42
     public function rowValue($attribute, $template)
43 43
     {
44
-        if (! empty($template)) {
45
-            if (! is_callable($template) && Arr::get($this->data, $template)) {
44
+        if (!empty($template)) {
45
+            if (!is_callable($template) && Arr::get($this->data, $template)) {
46 46
                 $this->data[$attribute] = Arr::get($this->data, $template);
47 47
             } else {
48 48
                 $this->data[$attribute] = Helper::compileContent($template, $this->data, $this->row);
Please login to merge, or discard this patch.
src/fallback.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (! function_exists('config_path')) {
3
+if (!function_exists('config_path')) {
4 4
     /**
5 5
      * Get the configuration path.
6 6
      *
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     }
14 14
 }
15 15
 
16
-if (! function_exists('public_path')) {
16
+if (!function_exists('public_path')) {
17 17
     /**
18 18
      * Return the path to public dir
19 19
      *
Please login to merge, or discard this patch.
src/Engines/BaseEngine.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -770,7 +770,7 @@
 block discarded – undo
770 770
      * Get column name by order column index.
771 771
      *
772 772
      * @param int $index
773
-     * @return mixed
773
+     * @return boolean|string
774 774
      */
775 775
     protected function getColumnNameByIndex($index)
776 776
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
             $this->totalRecords = $this->totalCount();
425 425
 
426 426
             if ($this->totalRecords) {
427
-                $this->orderRecords(! $orderFirst);
427
+                $this->orderRecords(!$orderFirst);
428 428
                 $this->filterRecords();
429 429
                 $this->orderRecords($orderFirst);
430 430
                 $this->paginate();
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
      */
458 458
     protected function orderRecords($skip)
459 459
     {
460
-        if (! $skip) {
460
+        if (!$skip) {
461 461
             $this->ordering();
462 462
         }
463 463
     }
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
      */
489 489
     protected function paginate()
490 490
     {
491
-        if ($this->request->isPaginationable() && ! $this->skipPaging) {
491
+        if ($this->request->isPaginationable() && !$this->skipPaging) {
492 492
             $this->paging();
493 493
         }
494 494
     }
@@ -790,7 +790,7 @@  discard block
 block discarded – undo
790 790
      */
791 791
     public function pushToBlacklist($column)
792 792
     {
793
-        if (! $this->isBlacklisted($column)) {
793
+        if (!$this->isBlacklisted($column)) {
794 794
             array_push($this->columnDef['blacklist'], $column);
795 795
         }
796 796
 
@@ -945,7 +945,7 @@  discard block
 block discarded – undo
945 945
     {
946 946
         $matches = explode(' as ', Str::lower($str));
947 947
 
948
-        if (! empty($matches)) {
948
+        if (!empty($matches)) {
949 949
             if ($wantsAlias) {
950 950
                 return array_pop($matches);
951 951
             } else {
Please login to merge, or discard this patch.
src/Request.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      * Check if Datatables must uses regular expressions
42 42
      *
43 43
      * @param integer $index
44
-     * @return string
44
+     * @return boolean
45 45
      */
46 46
     public function isRegex($index)
47 47
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function checkLegacyCode()
77 77
     {
78
-        if (! $this->request->input('draw') && $this->request->input('sEcho')) {
78
+        if (!$this->request->input('draw') && $this->request->input('sEcho')) {
79 79
             throw new Exception('DataTables legacy code is not supported! Please use DataTables 1.10++ coding convention.');
80
-        } elseif (! $this->request->input('draw') && ! $this->request->input('columns')) {
80
+        } elseif (!$this->request->input('draw') && !$this->request->input('columns')) {
81 81
             throw new Exception('Insufficient parameters');
82 82
         }
83 83
     }
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      */
111 111
     public function orderableColumns()
112 112
     {
113
-        if (! $this->isOrderable()) {
113
+        if (!$this->isOrderable()) {
114 114
             return [];
115 115
         }
116 116
 
@@ -221,6 +221,6 @@  discard block
 block discarded – undo
221 221
      */
222 222
     public function isPaginationable()
223 223
     {
224
-        return ! is_null($this->request->input('start')) && ! is_null($this->request->input('length')) && $this->request->input('length') != -1;
224
+        return !is_null($this->request->input('start')) && !is_null($this->request->input('length')) && $this->request->input('length') != -1;
225 225
     }
226 226
 }
Please login to merge, or discard this patch.
src/Engines/QueryBuilderEngine.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -580,7 +580,7 @@
 block discarded – undo
580 580
      * Compile queries for column search.
581 581
      *
582 582
      * @param int $i
583
-     * @param mixed $column
583
+     * @param string $column
584 584
      * @param string $keyword
585 585
      */
586 586
     protected function compileColumnSearch($i, $column, $keyword)
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         $myQuery = clone $this->query;
106 106
         // if its a normal query ( no union, having and distinct word )
107 107
         // replace the select with static text to improve performance
108
-        if (! Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) {
108
+        if (!Str::contains(Str::lower($myQuery->toSql()), ['union', 'having', 'distinct', 'order by', 'group by'])) {
109 109
             $row_count = $this->wrap('row_count');
110 110
             $myQuery->select($this->connection->raw("'1' as {$row_count}"));
111 111
         }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
             foreach ($this->request->searchableColumnIndex() as $index) {
172 172
                 $columnName = $this->getColumnName($index);
173
-                if ($this->isBlacklisted($columnName) && ! $this->hasCustomFilter($columnName)) {
173
+                if ($this->isBlacklisted($columnName) && !$this->hasCustomFilter($columnName)) {
174 174
                     continue;
175 175
                 }
176 176
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
      */
214 214
     protected function getBaseQueryBuilder($instance = null)
215 215
     {
216
-        if (! $instance) {
216
+        if (!$instance) {
217 217
             $instance = $this->query;
218 218
         }
219 219
 
@@ -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 = $this->request->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
 
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
             $joins[] = $join->table;
570 570
         }
571 571
 
572
-        if (! in_array($table, $joins)) {
572
+        if (!in_array($table, $joins)) {
573 573
             $this->getBaseQueryBuilder()->leftJoin($table, $foreign, '=', $other);
574 574
         }
575 575
     }
@@ -600,13 +600,13 @@  discard block
 block discarded – undo
600 600
     protected function regexColumnSearch($column, $keyword)
601 601
     {
602 602
         if ($this->isOracleSql()) {
603
-            $sql = ! $this->isCaseInsensitive() ? 'REGEXP_LIKE( ' . $column . ' , ? )' : 'REGEXP_LIKE( LOWER(' . $column . ') , ?, \'i\' )';
603
+            $sql = !$this->isCaseInsensitive() ? 'REGEXP_LIKE( ' . $column . ' , ? )' : 'REGEXP_LIKE( LOWER(' . $column . ') , ?, \'i\' )';
604 604
             $this->query->whereRaw($sql, [$keyword]);
605 605
         } elseif ($this->database == 'pgsql') {
606
-            $sql = ! $this->isCaseInsensitive() ? $column . ' ~ ?' : $column . ' ~* ? ';
606
+            $sql = !$this->isCaseInsensitive() ? $column . ' ~ ?' : $column . ' ~* ? ';
607 607
             $this->query->whereRaw($sql, [$keyword]);
608 608
         } else {
609
-            $sql = ! $this->isCaseInsensitive() ? $column . ' REGEXP ?' : 'LOWER(' . $column . ') REGEXP ?';
609
+            $sql = !$this->isCaseInsensitive() ? $column . ' REGEXP ?' : 'LOWER(' . $column . ') REGEXP ?';
610 610
             $this->query->whereRaw($sql, [Str::lower($keyword)]);
611 611
         }
612 612
     }
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
         foreach ($this->request->orderableColumns() as $orderable) {
628 628
             $column = $this->getColumnName($orderable['column'], true);
629 629
 
630
-            if ($this->isBlacklisted($column) && ! $this->hasCustomOrder($column)) {
630
+            if ($this->isBlacklisted($column) && !$this->hasCustomOrder($column)) {
631 631
                 continue;
632 632
             }
633 633
 
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
                         $isMorphToMany = false;
654 654
                         foreach (explode('.', $relation) as $eachRelation) {
655 655
                             $relationship = $lastQuery->getRelation($eachRelation);
656
-                            if (! ($relationship instanceof MorphToMany)) {
656
+                            if (!($relationship instanceof MorphToMany)) {
657 657
                                 $isMorphToMany = true;
658 658
                             }
659 659
                             $lastQuery = $relationship;
Please login to merge, or discard this patch.
src/Datatables.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
      */
113 113
     public function getHtmlBuilder()
114 114
     {
115
-        if (! class_exists('\Yajra\Datatables\Html\Builder')) {
115
+        if (!class_exists('\Yajra\Datatables\Html\Builder')) {
116 116
             throw new \Exception('Please install yajra/laravel-datatables-html to be able to use this function.');
117 117
         }
118 118
 
Please login to merge, or discard this patch.
src/Processors/DataProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -237,7 +237,7 @@
 block discarded – undo
237 237
     {
238 238
         $arrayDot = array_filter(array_dot($row));
239 239
         foreach ($arrayDot as $key => $value) {
240
-            if (! in_array($key, $this->rawColumns)) {
240
+            if (!in_array($key, $this->rawColumns)) {
241 241
                 $arrayDot[$key] = e($value);
242 242
             }
243 243
         }
Please login to merge, or discard this patch.
src/Engines/CollectionEngine.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@
 block discarded – undo
189 189
 
190 190
                 foreach ($this->request->searchableColumnIndex() as $index) {
191 191
                     $column = $this->getColumnName($index);
192
-                    if (! $value = Arr::get($data, $column)) {
192
+                    if (!$value = Arr::get($data, $column)) {
193 193
                         continue;
194 194
                     }
195 195
                     
Please login to merge, or discard this patch.