Completed
Push — master ( 5d4153...72a971 )
by Scott
02:53
created
models/Product.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     /**
30 30
      * @var array Guarded fields
31 31
      */
32
-    protected $guarded = ['*'];
32
+    protected $guarded = [ '*' ];
33 33
 
34 34
     /**
35 35
      * @var array Fillable fields
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         }
111 111
 
112 112
         foreach (Category::isParentOf($categoryIds)->lists('id') as $parentId) {
113
-            $this->categories()->attach($parentId, ['is_inherited' => true]);
113
+            $this->categories()->attach($parentId, [ 'is_inherited' => true ]);
114 114
         }
115 115
     }
116 116
 
@@ -155,8 +155,8 @@  discard block
 block discarded – undo
155 155
     public function saveBasePrice()
156 156
     {
157 157
         Price::updateOrCreate(
158
-            ['product_id' => $this->id, 'discount_id' => null],
159
-            ['price' => $this->base_price]
158
+            [ 'product_id' => $this->id, 'discount_id' => null ],
159
+            [ 'price' => $this->base_price ]
160 160
         );
161 161
     }
162 162
 
@@ -188,12 +188,12 @@  discard block
 block discarded – undo
188 188
 
189 189
         $subquery = Price::isActive()
190 190
             ->addselect('bedard_shop_prices.product_id')
191
-            ->selectRaw('MIN(' . $grammar->wrap('bedard_shop_prices.price') . ') as ' . $grammar->wrap('price'))
191
+            ->selectRaw('MIN('.$grammar->wrap('bedard_shop_prices.price').') as '.$grammar->wrap('price'))
192 192
             ->groupBy('bedard_shop_prices.product_id');
193 193
 
194 194
         return $query
195
-            ->addSelect($alias . '.price')
196
-            ->joinSubquery($subquery, $alias, 'bedard_shop_products.id', '=', $alias . '.product_id');
195
+            ->addSelect($alias.'.price')
196
+            ->joinSubquery($subquery, $alias, 'bedard_shop_products.id', '=', $alias.'.product_id');
197 197
     }
198 198
 
199 199
     /**
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
     public static function syncAllInheritedCategories()
205 205
     {
206 206
         foreach (self::lists('id') as $id) {
207
-            Queue::push(function ($job) use ($id) {
207
+            Queue::push(function($job) use ($id) {
208 208
                 Product::findOrFail($id)->syncInheritedCategories();
209 209
                 $job->delete();
210 210
             });
Please login to merge, or discard this patch.
traits/Subqueryable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@
 block discarded – undo
38 38
      */
39 39
     public function scopeJoinSubquery(Builder $query, Builder $subquery, $alias, $left, $operator, $right, $join = 'join')
40 40
     {
41
-        $self = $this->getTable() . '.*';
41
+        $self = $this->getTable().'.*';
42 42
 
43 43
         if (!in_array($self, $query->getQuery()->columns)) {
44 44
             $query->addSelect($self);
45 45
         }
46 46
 
47 47
         $subquery = $subquery->getQuery();
48
-        $raw = DB::raw('(' . $subquery->toSql() . ') ' . $alias);
48
+        $raw = DB::raw('('.$subquery->toSql().') '.$alias);
49 49
 
50 50
         return $query->$join($raw, $left, $operator, $right)->mergeBindings($subquery);
51 51
     }
Please login to merge, or discard this patch.