Completed
Push — master ( 96cfd6...c1bbfc )
by Arjay
03:46
created
src/Engines/CollectionEngine.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
                 $keyword = $this->request->keyword();
124 124
                 foreach ($this->request->searchableColumnIndex() as $index) {
125 125
                     $column = $this->getColumnName($index);
126
-                    if (! $value = Arr::get($data, $column)) {
126
+                    if (!$value = Arr::get($data, $column)) {
127 127
                         continue;
128 128
                     }
129 129
 
Please login to merge, or discard this patch.
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/Request.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
      */
18 18
     public function checkLegacyCode()
19 19
     {
20
-        if (! $this->get('draw') && $this->get('sEcho')) {
20
+        if (!$this->get('draw') && $this->get('sEcho')) {
21 21
             throw new Exception('DataTables legacy code is not supported! Please use DataTables 1.10++ coding convention.');
22
-        } elseif (! $this->get('draw') && ! $this->get('columns')) {
22
+        } elseif (!$this->get('draw') && !$this->get('columns')) {
23 23
             throw new Exception('Insufficient parameters');
24 24
         }
25 25
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function orderableColumns()
65 65
     {
66
-        if (! $this->isOrderable()) {
66
+        if (!$this->isOrderable()) {
67 67
             return [];
68 68
         }
69 69
 
@@ -162,6 +162,6 @@  discard block
 block discarded – undo
162 162
      */
163 163
     public function isPaginationable()
164 164
     {
165
-        return ! is_null($this->get('start')) && ! is_null($this->get('length')) && $this->get('length') != -1;
165
+        return !is_null($this->get('start')) && !is_null($this->get('length')) && $this->get('length') != -1;
166 166
     }
167 167
 }
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 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
         foreach ($joins as $join) {
269 269
             $table   = preg_split('/ as /i', $join->table);
270 270
             $names[] = $table[0];
271
-            if (isset($table[1]) && ! empty($databasePrefix) && strpos($table[1], $databasePrefix) == 0) {
271
+            if (isset($table[1]) && !empty($databasePrefix) && strpos($table[1], $databasePrefix) == 0) {
272 272
                 $names[] = preg_replace('/^' . $databasePrefix . '/', '', $table[1]);
273 273
             }
274 274
         }
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
      */
285 285
     public function getQueryBuilder($instance = null)
286 286
     {
287
-        if (! $instance) {
287
+        if (!$instance) {
288 288
             $instance = $this->query;
289 289
         }
290 290
 
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
         $this->totalRecords = $this->totalCount();
540 540
 
541 541
         if ($this->totalRecords) {
542
-            $this->orderRecords(! $orderFirst);
542
+            $this->orderRecords(!$orderFirst);
543 543
             $this->filterRecords();
544 544
             $this->orderRecords($orderFirst);
545 545
             $this->paginate();
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
      */
557 557
     public function orderRecords($skip)
558 558
     {
559
-        if (! $skip) {
559
+        if (!$skip) {
560 560
             $this->ordering();
561 561
         }
562 562
     }
@@ -838,7 +838,7 @@  discard block
 block discarded – undo
838 838
     {
839 839
         $matches = explode(' as ', Str::lower($str));
840 840
 
841
-        if (! empty($matches)) {
841
+        if (!empty($matches)) {
842 842
             if ($wantsAlias) {
843 843
                 return array_pop($matches);
844 844
             } else {
Please login to merge, or discard this patch.
src/Html/Builder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
     public function columns(array $columns)
308 308
     {
309 309
         foreach ($columns as $key => $value) {
310
-            if (! is_a($value, Column::class)) {
310
+            if (!is_a($value, Column::class)) {
311 311
                 if (is_array($value)) {
312 312
                     $attributes = array_merge(['name' => $key, 'data' => $key], $this->setTitle($key, $value));
313 313
                 } else {
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
      */
337 337
     public function setTitle($title, array $attributes)
338 338
     {
339
-        if (! isset($attributes['title'])) {
339
+        if (!isset($attributes['title'])) {
340 340
             $attributes['title'] = $this->getQualifiedTitle($title);
341 341
         }
342 342
 
Please login to merge, or discard this patch.
src/Engines/QueryBuilderEngine.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Generators/DataTablesMakeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
             $name = str_replace('/', '\\', $name);
165 165
         }
166 166
 
167
-        if (! Str::contains(Str::lower($name), 'datatable')) {
167
+        if (!Str::contains(Str::lower($name), 'datatable')) {
168 168
             $name .= 'DataTable';
169 169
         }
170 170
 
Please login to merge, or discard this patch.