Completed
Push — master ( 4553c1...3838fd )
by Scott
02:42
created
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   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     /**
16 16
      * @var array Guarded fields
17 17
      */
18
-    protected $guarded = ['*'];
18
+    protected $guarded = [ '*' ];
19 19
 
20 20
     /**
21 21
      * @var array Fillable fields
Please login to merge, or discard this patch.
models/Product.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     /**
28 28
      * @var array Guarded fields
29 29
      */
30
-    protected $guarded = ['*'];
30
+    protected $guarded = [ '*' ];
31 31
 
32 32
     /**
33 33
      * @var array Fillable fields
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         }
101 101
 
102 102
         foreach (Category::isParentOf($categoryIds)->lists('id') as $parentId) {
103
-            $this->categories()->attach($parentId, ['is_inherited' => true]);
103
+            $this->categories()->attach($parentId, [ 'is_inherited' => true ]);
104 104
         }
105 105
     }
106 106
 
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
     public function saveBasePrice()
146 146
     {
147 147
         Price::updateOrCreate(
148
-            ['product_id' => $this->id, 'discount_id' => null],
149
-            ['price' => $this->base_price]
148
+            [ 'product_id' => $this->id, 'discount_id' => null ],
149
+            [ 'price' => $this->base_price ]
150 150
         );
151 151
     }
152 152
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     public static function syncAllInheritedCategories()
174 174
     {
175 175
         foreach (self::lists('id') as $id) {
176
-            Queue::push(function ($job) use ($id) {
176
+            Queue::push(function($job) use ($id) {
177 177
                 Product::findOrFail($id)->syncInheritedCategories();
178 178
                 $job->delete();
179 179
             });
Please login to merge, or discard this patch.
updates/1.0/create_prices_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_prices', function (Blueprint $table) {
11
+        Schema::create('bedard_shop_prices', function(Blueprint $table) {
12 12
             $table->engine = 'InnoDB';
13 13
             $table->increments('id');
14 14
             $table->decimal('price', 10, 2)->unsigned();
Please login to merge, or discard this patch.