Completed
Push — master ( 141c37...4e2b2d )
by Scott
04:28
created
models/Promotion.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
     public function filterFields($fields)
84 84
     {
85 85
         $fields->amount_exact->hidden = $this->is_percentage;
86
-        $fields->amount_percentage->hidden = ! $this->is_percentage;
86
+        $fields->amount_percentage->hidden = !$this->is_percentage;
87 87
     }
88 88
 
89 89
     /**
Please login to merge, or discard this patch.
updates/1.0/create_promotions_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function up()
10 10
     {
11
-        Schema::create('bedard_shop_promotions', function (Blueprint $table) {
11
+        Schema::create('bedard_shop_promotions', function(Blueprint $table) {
12 12
             $table->engine = 'InnoDB';
13 13
             $table->increments('id');
14 14
             $table->string('name')->default('');
Please login to merge, or discard this patch.
traits/StartEndable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
      */
14 14
     public static function bootStartEndable()
15 15
     {
16
-        static::extend(function ($model) {
17
-            $model->bindEvent('model.afterValidate', function () use ($model) {
16
+        static::extend(function($model) {
17
+            $model->bindEvent('model.afterValidate', function() use ($model) {
18 18
                 $model->validateStartEndDates();
19 19
             });
20 20
         });
Please login to merge, or discard this patch.
models/Discount.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     public function filterFields($fields)
127 127
     {
128 128
         $fields->amount_exact->hidden = $this->is_percentage;
129
-        $fields->amount_percentage->hidden = ! $this->is_percentage;
129
+        $fields->amount_percentage->hidden = !$this->is_percentage;
130 130
     }
131 131
 
132 132
     /**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     {
139 139
         $productIds = $this->products()->lists('id');
140 140
         $categories = $this->categories()
141
-            ->with(['products' => function ($product) {
141
+            ->with(['products' => function($product) {
142 142
                 return $product->select('id');
143 143
             }])
144 144
             ->get(['id']);
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     public function savePrices()
181 181
     {
182 182
         $id = $this->id;
183
-        Queue::push(function ($job) use ($id) {
183
+        Queue::push(function($job) use ($id) {
184 184
             $discount = Discount::findOrFail($id);
185 185
             $productIds = $discount->getAllProductIds();
186 186
             $products = Product::whereIn('id', $productIds)->select('id', 'base_price')->get();
@@ -231,10 +231,10 @@  discard block
 block discarded – undo
231 231
     public static function syncProductPrice(Product $product, array $categoryIds)
232 232
     {
233 233
         $discounts = self::isNotExpired()
234
-            ->whereHas('products', function ($query) use ($product) {
234
+            ->whereHas('products', function($query) use ($product) {
235 235
                 return $query->where('id', $product->id);
236 236
             })
237
-            ->orWhereHas('categories', function ($query) use ($categoryIds) {
237
+            ->orWhereHas('categories', function($query) use ($categoryIds) {
238 238
                 return $query->whereIn('id', $categoryIds);
239 239
             })
240 240
             ->get();
Please login to merge, or discard this patch.
traits/Amountable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
      */
10 10
     public static function bootAmountable()
11 11
     {
12
-        static::extend(function ($model) {
12
+        static::extend(function($model) {
13 13
             $model->rules = array_merge($model->rules, [
14 14
                 'amount_exact' => 'numeric|min:0',
15 15
                 'amount_percentage' => 'numeric|min:0|max:100',
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
             $model->addFillable('amount_exact', 'amount_percentage');
29 29
 
30
-            $model->bindEvent('model.beforeSave', function () use ($model) {
30
+            $model->bindEvent('model.beforeSave', function() use ($model) {
31 31
                 $model->setAmount();
32 32
             });
33 33
         });
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function getAmountExactAttribute()
42 42
     {
43
-        return ! $this->is_percentage ? $this->amount : 0;
43
+        return !$this->is_percentage ? $this->amount : 0;
44 44
     }
45 45
 
46 46
     /**
Please login to merge, or discard this patch.
models/Cart.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     /**
50 50
      * Apply a promotion to the cart.
51 51
      *
52
-     * @param  string $code     The promotion code to apply.
52
+     * @param string $name
53 53
      * @return void
54 54
      */
55 55
     public function applyPromotion($name)
Please login to merge, or discard this patch.
models/Address.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
      */
119 119
     protected function updatePrimaryAddresses()
120 120
     {
121
-        if (! $this->customer_id) {
121
+        if (!$this->customer_id) {
122 122
             return;
123 123
         }
124 124
 
Please login to merge, or discard this patch.
updates/1.0/create_customers_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function up()
10 10
     {
11
-        Schema::create('bedard_shop_customers', function (Blueprint $table) {
11
+        Schema::create('bedard_shop_customers', function(Blueprint $table) {
12 12
             $table->engine = 'InnoDB';
13 13
             $table->increments('id');
14 14
             $table->string('name')->default('');
Please login to merge, or discard this patch.
updates/1.0/create_addresses_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function up()
10 10
     {
11
-        Schema::create('bedard_shop_addresses', function (Blueprint $table) {
11
+        Schema::create('bedard_shop_addresses', function(Blueprint $table) {
12 12
             $table->engine = 'InnoDB';
13 13
             $table->increments('id');
14 14
             $table->integer('customer_id')->unsigned()->nullable()->index();
Please login to merge, or discard this patch.