@@ -140,7 +140,7 @@ |
||
| 140 | 140 | */ |
| 141 | 141 | public function scopeIsEnabled($query) |
| 142 | 142 | { |
| 143 | - return $query->whereHas('product', function ($product) { |
|
| 143 | + return $query->whereHas('product', function($product) { |
|
| 144 | 144 | $product->isEnabled(); |
| 145 | 145 | }); |
| 146 | 146 | } |
@@ -139,8 +139,8 @@ |
||
| 139 | 139 | $values = $this->value_data ?: []; |
| 140 | 140 | |
| 141 | 141 | // don't validate deleted values |
| 142 | - $nonDeletedValues = array_filter($values, function ($value) { |
|
| 143 | - return ! array_key_exists('_deleted', $value) || ! $value['_deleted']; |
|
| 142 | + $nonDeletedValues = array_filter($values, function($value) { |
|
| 143 | + return !array_key_exists('_deleted', $value) || !$value['_deleted']; |
|
| 144 | 144 | }); |
| 145 | 145 | |
| 146 | 146 | foreach ($nonDeletedValues as $value) { |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | sort($old); |
| 151 | 151 | sort($new); |
| 152 | 152 | |
| 153 | - return ! count($old) || ! count($new) || $old != $new; |
|
| 153 | + return !count($old) || !count($new) || $old != $new; |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | /** |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | { |
| 195 | 195 | // if the categories haven't changed, do nothing |
| 196 | 196 | $directIds = $this->getOriginalPurgeValue('categories_field') ?: []; |
| 197 | - if (! $this->categoriesAreChanged($directIds)) { |
|
| 197 | + if (!$this->categoriesAreChanged($directIds)) { |
|
| 198 | 198 | return; |
| 199 | 199 | } |
| 200 | 200 | |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | */ |
| 282 | 282 | protected function saveOptionsAndInventories() |
| 283 | 283 | { |
| 284 | - if (! $data = $this->getOriginalPurgeValue('options_inventories')) { |
|
| 284 | + if (!$data = $this->getOriginalPurgeValue('options_inventories')) { |
|
| 285 | 285 | return; |
| 286 | 286 | } |
| 287 | 287 | |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | $slugs = explode(',', $slugs); |
| 305 | 305 | } |
| 306 | 306 | |
| 307 | - return $query->whereHas('categories', function ($category) use ($slugs) { |
|
| 307 | + return $query->whereHas('categories', function($category) use ($slugs) { |
|
| 308 | 308 | $category->whereIn('slug', array_map('trim', $slugs)); |
| 309 | 309 | }); |
| 310 | 310 | } |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | // figure out what our branches are |
| 386 | 386 | $branches = []; |
| 387 | 387 | $categories = Category::select('id', 'parent_id')->get(); |
| 388 | - $categories->each(function ($category) use (&$branches, $categories) { |
|
| 388 | + $categories->each(function($category) use (&$branches, $categories) { |
|
| 389 | 389 | $branches[$category->id] = Category::getParentIds($category->id, $categories); |
| 390 | 390 | }); |
| 391 | 391 | |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | */ |
| 448 | 448 | protected function validateOptionsAndInventories() |
| 449 | 449 | { |
| 450 | - if (! $data = $this->getOriginalPurgeValue('options_inventories')) { |
|
| 450 | + if (!$data = $this->getOriginalPurgeValue('options_inventories')) { |
|
| 451 | 451 | return; |
| 452 | 452 | } |
| 453 | 453 | |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | */ |
| 85 | 85 | public function reduceAvailableInventory() |
| 86 | 86 | { |
| 87 | - if (! $this->is_reduced) { |
|
| 87 | + if (!$this->is_reduced) { |
|
| 88 | 88 | $this->load('inventory'); |
| 89 | 89 | $this->inventory->quantity -= $this->quantity; |
| 90 | 90 | $this->inventory->save(); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | */ |
| 91 | 91 | public function beforeDelete() |
| 92 | 92 | { |
| 93 | - if (! $this->isDeleteable()) { |
|
| 93 | + if (!$this->isDeleteable()) { |
|
| 94 | 94 | return false; |
| 95 | 95 | } |
| 96 | 96 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | public function isDeleteable() |
| 115 | 115 | { |
| 116 | - return ! $this->is_default && ! $this->is_abandoned; |
|
| 116 | + return !$this->is_default && !$this->is_abandoned; |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | /** |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | */ |
| 125 | 125 | protected function preventDefaultRemoval() |
| 126 | 126 | { |
| 127 | - if ($this->getOriginal('is_default') && ! $this->is_default) { |
|
| 127 | + if ($this->getOriginal('is_default') && !$this->is_default) { |
|
| 128 | 128 | $message = Lang::get('bedard.shop::lang.statuses.form.is_default_removed'); |
| 129 | 129 | |
| 130 | 130 | Flash::error($message); |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | */ |
| 67 | 67 | public static function getParentIds($id, $categories = null) |
| 68 | 68 | { |
| 69 | - if (! $categories) { |
|
| 69 | + if (!$categories) { |
|
| 70 | 70 | $categories = self::all(); |
| 71 | 71 | } |
| 72 | 72 | |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | { |
| 31 | 31 | $options = ApiSettings::getCartOptions(); |
| 32 | 32 | |
| 33 | - if (! array_key_exists('is_enabled', $options) || ! $options['is_enabled']) { |
|
| 33 | + if (!array_key_exists('is_enabled', $options) || !$options['is_enabled']) { |
|
| 34 | 34 | return abort(403, 'Forbidden'); |
| 35 | 35 | } |
| 36 | 36 | |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | $query = input(); |
| 18 | 18 | $options = ApiSettings::getCategoriesOptions(); |
| 19 | 19 | |
| 20 | - if (! $options['is_enabled']) { |
|
| 20 | + if (!$options['is_enabled']) { |
|
| 21 | 21 | return abort(403, 'Forbidden'); |
| 22 | 22 | } |
| 23 | 23 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | $query = input(); |
| 37 | 37 | $options = ApiSettings::getCategoryOptions(); |
| 38 | 38 | |
| 39 | - if (! $options['is_enabled']) { |
|
| 39 | + if (!$options['is_enabled']) { |
|
| 40 | 40 | return abort(403, 'Forbidden'); |
| 41 | 41 | } |
| 42 | 42 | |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | $query = input(); |
| 17 | 17 | $options = ApiSettings::getProductsOptions(); |
| 18 | 18 | |
| 19 | - if (! $options['is_enabled']) { |
|
| 19 | + if (!$options['is_enabled']) { |
|
| 20 | 20 | return abort(403, 'Forbidden'); |
| 21 | 21 | } |
| 22 | 22 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | $query = input(); |
| 36 | 36 | $options = ApiSettings::getProductOptions(); |
| 37 | 37 | |
| 38 | - if (! $options['is_enabled']) { |
|
| 38 | + if (!$options['is_enabled']) { |
|
| 39 | 39 | return abort(403, 'Forbidden'); |
| 40 | 40 | } |
| 41 | 41 | |