Completed
Push — master ( 6d6c81...5c7eb6 )
by Scott
02:37
created
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.
models/Price.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -16,24 +16,24 @@
 block discarded – undo
16 16
     /**
17 17
      * @var array Guarded fields
18 18
      */
19
-    protected $guarded = ['*'];
19
+    protected $guarded = [ '*' ];
20 20
 
21 21
     /**
22 22
      * @var array Fillable fields
23 23
      */
24
-    protected $fillable = [];
24
+    protected $fillable = [ ];
25 25
 
26 26
     /**
27 27
      * @var array Relations
28 28
      */
29
-    public $hasOne = [];
30
-    public $hasMany = [];
31
-    public $belongsTo = [];
32
-    public $belongsToMany = [];
33
-    public $morphTo = [];
34
-    public $morphOne = [];
35
-    public $morphMany = [];
36
-    public $attachOne = [];
37
-    public $attachMany = [];
29
+    public $hasOne = [ ];
30
+    public $hasMany = [ ];
31
+    public $belongsTo = [ ];
32
+    public $belongsToMany = [ ];
33
+    public $morphTo = [ ];
34
+    public $morphOne = [ ];
35
+    public $morphMany = [ ];
36
+    public $attachOne = [ ];
37
+    public $attachMany = [ ];
38 38
 
39 39
 }
40 40
\ No newline at end of file
Please login to merge, or discard this patch.