Completed
Push — master ( a4eeb5...f9f04d )
by Scott
02:46
created
updates/dev_seeds.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -26,6 +26,9 @@
 block discarded – undo
26 26
         $child2 = Factory::create(new Category, ['name' => 'Child 2', 'slug' => 'child-2', 'parent_id' => $parent2->id]);
27 27
     }
28 28
 
29
+    /**
30
+     * @param integer $count
31
+     */
29 32
     protected function seedProducts($count)
30 33
     {
31 34
         $categories = Category::count();
Please login to merge, or discard this patch.
updates/1.0/create_category_discount_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@
 block discarded – undo
8 8
 {
9 9
     public function up()
10 10
     {
11
-        Schema::create('bedard_shop_category_discount', function (Blueprint $table) {
11
+        Schema::create('bedard_shop_category_discount', function(Blueprint $table) {
12 12
             $table->engine = 'InnoDB';
13 13
             $table->integer('category_id')->unsigned()->nullable();
14 14
             $table->integer('discount_id')->unsigned()->nullable();
15
-            $table->primary(['category_id', 'discount_id']);
15
+            $table->primary([ 'category_id', 'discount_id' ]);
16 16
         });
17 17
     }
18 18
 
Please login to merge, or discard this patch.
updates/1.0/create_discount_product_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@
 block discarded – undo
8 8
 {
9 9
     public function up()
10 10
     {
11
-        Schema::create('bedard_shop_discount_product', function (Blueprint $table) {
11
+        Schema::create('bedard_shop_discount_product', function(Blueprint $table) {
12 12
             $table->engine = 'InnoDB';
13 13
             $table->integer('discount_id')->unsigned()->nullable();
14 14
             $table->integer('product_id')->unsigned()->nullable();
15
-            $table->primary(['discount_id', 'product_id']);
15
+            $table->primary([ 'discount_id', 'product_id' ]);
16 16
         });
17 17
     }
18 18
 
Please login to merge, or discard this patch.
models/Discount.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     /**
46 46
      * @var array Guarded fields
47 47
      */
48
-    protected $guarded = ['*'];
48
+    protected $guarded = [ '*' ];
49 49
 
50 50
     /**
51 51
      * @var array Fillable fields
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     public function filterFields($fields)
123 123
     {
124 124
         $fields->amount_exact->hidden = $this->is_percentage;
125
-        $fields->amount_percentage->hidden = ! $this->is_percentage;
125
+        $fields->amount_percentage->hidden = !$this->is_percentage;
126 126
     }
127 127
 
128 128
     /**
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public function scopeIsExpired($query)
135 135
     {
136
-        return $query->where(function ($discount) {
136
+        return $query->where(function($discount) {
137 137
             return $discount->whereNotNull('end_at')
138 138
                 ->where('end_at', '<=', (string) Carbon::now());
139 139
         });
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      */
148 148
     public function scopeIsNotExpired($query)
149 149
     {
150
-        return $query->where(function ($discount) {
150
+        return $query->where(function($discount) {
151 151
             return $discount->whereNull('end_at')
152 152
                 ->orWhere('end_at', '>', (string) Carbon::now());
153 153
         });
Please login to merge, or discard this patch.