@@ -15,7 +15,7 @@ |
||
| 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 |
@@ -27,7 +27,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | }); |