Completed
Push — master ( 7026a4...e1bca1 )
by Arjay
02:37
created
src/yajra/Datatables/Engines/CollectionEngine.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,6 @@
 block discarded – undo
17 17
 use Illuminate\Support\Str;
18 18
 use yajra\Datatables\Contracts\DataTableEngine;
19 19
 use yajra\Datatables\Request;
20
-use yajra\Datatables\Helper;
21 20
 
22 21
 class CollectionEngine extends BaseEngine implements DataTableEngine
23 22
 {
Please login to merge, or discard this patch.
src/yajra/Datatables/Engines/QueryBuilderEngine.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -256,7 +256,9 @@
 block discarded – undo
256 256
                  * which causes a query exception
257 257
                  * The temporary fix is modify `*` column to `id` column 
258 258
                  */
259
-                if ($column === '*') $column = 'id';
259
+                if ($column === '*') {
260
+                    $column = 'id';
261
+                }
260 262
                 $this->getQueryBuilder()->orderBy($column, $orderable['direction']);
261 263
             }
262 264
         }
Please login to merge, or discard this patch.
src/yajra/Datatables/Engines/BaseEngine.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
     {
259 259
         $matches = explode(' as ', Str::lower($str));
260 260
 
261
-        if (! empty($matches)) {
261
+        if ( ! empty($matches)) {
262 262
             if ($wantsAlias) {
263 263
                 return array_pop($matches);
264 264
             } else {
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
      */
326 326
     public function getQueryBuilder($instance = null)
327 327
     {
328
-        if (! $instance) {
328
+        if ( ! $instance) {
329 329
             $instance = $this->query;
330 330
         }
331 331
 
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
         $this->totalRecords = $this->count();
580 580
 
581 581
         if ($this->totalRecords) {
582
-            $this->orderRecords(! $orderFirst);
582
+            $this->orderRecords( ! $orderFirst);
583 583
             $this->filterRecords();
584 584
             $this->orderRecords($orderFirst);
585 585
             $this->paginate();
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
      */
604 604
     public function orderRecords($skip)
605 605
     {
606
-        if (! $skip) {
606
+        if ( ! $skip) {
607 607
             $this->ordering();
608 608
         }
609 609
     }
Please login to merge, or discard this patch.