Completed
Push — master ( c99589...beb3f5 )
by Scott
02:24
created
models/Category.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 
179 179
     public static function getParentIds($children, \October\Rain\Database\Collection $categories = null)
180 180
     {
181
-        if (! is_array($children)) {
181
+        if (!is_array($children)) {
182 182
             $children = [$children];
183 183
         }
184 184
 
@@ -188,13 +188,13 @@  discard block
 block discarded – undo
188 188
 
189 189
         $parents = [];
190 190
         foreach ($children as $child) {
191
-            $category = $categories->filter(function ($model) use ($child) {
191
+            $category = $categories->filter(function($model) use ($child) {
192 192
                 return $model->id == $child;
193 193
             })->first();
194 194
 
195 195
             while ($category && $category->parent_id) {
196 196
                 $parents[] = $category->parent_id;
197
-                $category = $categories->filter(function ($model) use ($category) {
197
+                $category = $categories->filter(function($model) use ($category) {
198 198
                     return $model->id == $category->parent_id;
199 199
                 })->first();
200 200
             }
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
      */
227 227
     public function isCustomSorted()
228 228
     {
229
-        return ! $this->product_sort_column && ! $this->product_sort_direction;
229
+        return !$this->product_sort_column && !$this->product_sort_direction;
230 230
     }
231 231
 
232 232
     /**
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
      */
307 307
     protected function setNullParentId()
308 308
     {
309
-        if (! $this->parent_id) {
309
+        if (!$this->parent_id) {
310 310
             $this->parent_id = null;
311 311
         }
312 312
     }
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
      */
348 348
     public function syncInheritedProductsAfterDelete()
349 349
     {
350
-        if (! $this->dontSyncAfterDelete) {
350
+        if (!$this->dontSyncAfterDelete) {
351 351
             Product::syncAllInheritedCategories();
352 352
         }
353 353
     }
Please login to merge, or discard this patch.
updates/1.0/create_inventory_option_values_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_inventory_option_values', function (Blueprint $table) {
11
+        Schema::create('bedard_shop_inventory_option_values', function(Blueprint $table) {
12 12
             $table->engine = 'InnoDB';
13 13
             $table->integer('inventory_id')->unsigned();
14 14
             $table->integer('option_value_id')->unsigned();
Please login to merge, or discard this patch.
repositories/CategoryRepository.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function get(array $params = [])
15 15
     {
16
-        if (! array_key_exists('select', $params) || ! is_array($params['select']) || empty($params['select'])) {
16
+        if (!array_key_exists('select', $params) || !is_array($params['select']) || empty($params['select'])) {
17 17
             throw new Exception('Categories get() must select at least one column.');
18 18
         }
19 19
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function show($slug, array $params = [])
44 44
     {
45
-        if (! array_key_exists('select', $params) || ! is_array($params['select']) || empty($params['select'])) {
45
+        if (!array_key_exists('select', $params) || !is_array($params['select']) || empty($params['select'])) {
46 46
             throw new Exception('Category show() must select at least one column.');
47 47
         }
48 48
 
@@ -53,16 +53,16 @@  discard block
 block discarded – undo
53 53
 
54 54
         if ($params['load_products']) {
55 55
             $category->load(['products' => function($products) use ($category, $params) {
56
-                if (! array_key_exists('products_select', $params) ||
57
-                    ! is_array($params['products_select']) ||
56
+                if (!array_key_exists('products_select', $params) ||
57
+                    !is_array($params['products_select']) ||
58 58
                     empty($params['products_select'])) {
59 59
                     throw new Exception('Category show() products must select at least one column.');
60 60
                 }
61 61
 
62 62
                 $products->select($params['products_select']);
63 63
 
64
-                if (! is_null($category->product_sort_column) &&
65
-                    ! is_null($category->product_sort_direction)) {
64
+                if (!is_null($category->product_sort_column) &&
65
+                    !is_null($category->product_sort_direction)) {
66 66
                     $products->orderBy($category->product_sort_column, $category->product_sort_direction);
67 67
                 }
68 68
             }]);
Please login to merge, or discard this patch.