@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | $this->syncInheritedProductsAfterSave(); |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | - protected function applyCustomOrder(Builder &$products) |
|
| 139 | + protected function applyCustomOrder(Builder & $products) |
|
| 140 | 140 | { |
| 141 | 141 | $customOrder = ""; |
| 142 | 142 | foreach ($this->product_order as $index => $id) { |
@@ -152,9 +152,9 @@ discard block |
||
| 152 | 152 | * @param \October\Rain\Database\Builder $products |
| 153 | 153 | * @return void |
| 154 | 154 | */ |
| 155 | - protected function applyProductFilters(Builder &$products) |
|
| 155 | + protected function applyProductFilters(Builder & $products) |
|
| 156 | 156 | { |
| 157 | - $products->where(function ($query) { |
|
| 157 | + $products->where(function($query) { |
|
| 158 | 158 | foreach ($this->filters as $filter) { |
| 159 | 159 | $right = $filter->getRightClause(); |
| 160 | 160 | $query->where($filter->left, $filter->comparator, $right); |
@@ -182,12 +182,12 @@ discard block |
||
| 182 | 182 | */ |
| 183 | 183 | protected function deleteRelatedFilters(array $filters) |
| 184 | 184 | { |
| 185 | - return array_filter($filters, function ($filter) { |
|
| 185 | + return array_filter($filters, function($filter) { |
|
| 186 | 186 | if ($filter['id'] !== null && $filter['is_deleted']) { |
| 187 | 187 | Filter::find($filter['id'])->delete(); |
| 188 | 188 | } |
| 189 | 189 | |
| 190 | - return ! $filter['is_deleted']; |
|
| 190 | + return !$filter['is_deleted']; |
|
| 191 | 191 | }); |
| 192 | 192 | } |
| 193 | 193 | |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | |
| 238 | 238 | public static function getParentIds($children, \October\Rain\Database\Collection $categories = null) |
| 239 | 239 | { |
| 240 | - if (! is_array($children)) { |
|
| 240 | + if (!is_array($children)) { |
|
| 241 | 241 | $children = [$children]; |
| 242 | 242 | } |
| 243 | 243 | |
@@ -247,13 +247,13 @@ discard block |
||
| 247 | 247 | |
| 248 | 248 | $parents = []; |
| 249 | 249 | foreach ($children as $child) { |
| 250 | - $category = $categories->filter(function ($model) use ($child) { |
|
| 250 | + $category = $categories->filter(function($model) use ($child) { |
|
| 251 | 251 | return $model->id == $child; |
| 252 | 252 | })->first(); |
| 253 | 253 | |
| 254 | 254 | while ($category && $category->parent_id) { |
| 255 | 255 | $parents[] = $category->parent_id; |
| 256 | - $category = $categories->filter(function ($model) use ($category) { |
|
| 256 | + $category = $categories->filter(function($model) use ($category) { |
|
| 257 | 257 | return $model->id == $category->parent_id; |
| 258 | 258 | })->first(); |
| 259 | 259 | } |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | */ |
| 325 | 325 | public function isCustomSorted() |
| 326 | 326 | { |
| 327 | - return ! $this->product_sort_column && ! $this->product_sort_direction; |
|
| 327 | + return !$this->product_sort_column && !$this->product_sort_direction; |
|
| 328 | 328 | } |
| 329 | 329 | |
| 330 | 330 | /** |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | { |
| 347 | 347 | $filters = $this->getOriginalPurgeValue('category_filters'); |
| 348 | 348 | |
| 349 | - if (is_array($filters) && ! empty($filters)) { |
|
| 349 | + if (is_array($filters) && !empty($filters)) { |
|
| 350 | 350 | $filters = $this->deleteRelatedFilters($filters); |
| 351 | 351 | $this->saveRelatedFilters($filters); |
| 352 | 352 | } |
@@ -448,7 +448,7 @@ discard block |
||
| 448 | 448 | */ |
| 449 | 449 | protected function setNullParentId() |
| 450 | 450 | { |
| 451 | - if (! $this->parent_id) { |
|
| 451 | + if (!$this->parent_id) { |
|
| 452 | 452 | $this->parent_id = null; |
| 453 | 453 | } |
| 454 | 454 | } |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | */ |
| 490 | 490 | public function syncInheritedProductsAfterDelete() |
| 491 | 491 | { |
| 492 | - if (! $this->dontSyncAfterDelete) { |
|
| 492 | + if (!$this->dontSyncAfterDelete) { |
|
| 493 | 493 | Product::syncAllInheritedCategories(); |
| 494 | 494 | } |
| 495 | 495 | } |