Completed
Push — master ( 46ed1d...520491 )
by Scott
02:20
created
classes/ProductsQuery.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     protected function applyCustomOrder()
58 58
     {
59 59
         $this->query
60
-            ->join('bedard_shop_category_product', function ($join) {
60
+            ->join('bedard_shop_category_product', function($join) {
61 61
                 $join->on('bedard_shop_products.id', '=', 'bedard_shop_category_product.product_id')
62 62
                     ->where('bedard_shop_category_product.category_id', '=', $this->category->id);
63 63
             })
@@ -71,22 +71,22 @@  discard block
 block discarded – undo
71 71
      */
72 72
     protected function applyOrderByStatements()
73 73
     {
74
-        print_r ($this->category->toArray());
75
-        print_r ("\n");
74
+        print_r($this->category->toArray());
75
+        print_r("\n");
76 76
         if (array_key_exists('products_sort_column', $this->params) &&
77 77
             array_key_exists('products_sort_direction', $this->params)) {
78
-            print_r ("param sorted\n");
78
+            print_r("param sorted\n");
79 79
             $this->query->orderBy($this->params['products_sort_column'], $this->params['products_sort_direction']);
80 80
         } elseif ($this->category->isCustomSorted()) {
81
-            print_r ("custom sorted\n");
81
+            print_r("custom sorted\n");
82 82
             $this->applyCustomOrder();
83 83
         } else {
84
-            print_r ("default sorted\n");
84
+            print_r("default sorted\n");
85 85
             $this->query->orderBy($this->category->product_sort_column, $this->category->product_sort_direction);
86 86
         }
87 87
 
88
-        print_r ($this->query->toSql());
89
-        print_r ("\n\n\n\n\n");
88
+        print_r($this->query->toSql());
89
+        print_r("\n\n\n\n\n");
90 90
     }
91 91
 
92 92
     /**
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     protected function applyProductFilters()
115 115
     {
116
-        $this->query->where(function ($q) {
116
+        $this->query->where(function($q) {
117 117
             foreach ($this->category->filters as $filter) {
118 118
                 $right = $filter->getRightClause();
119 119
                 $q->where($filter->left, $filter->comparator, $right);
Please login to merge, or discard this patch.