Completed
Push — master ( 8a92d6...46e7ad )
by Scott
02:08
created
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   +7 added lines, -7 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
 
@@ -52,17 +52,17 @@  discard block
 block discarded – undo
52 52
             ->firstOrFail();
53 53
 
54 54
         if ($params['load_products']) {
55
-            $category->load(['products' => function ($products) use ($category, $params) {
56
-                if (! array_key_exists('products_select', $params) ||
57
-                    ! is_array($params['products_select']) ||
55
+            $category->load(['products' => function($products) use ($category, $params) {
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.
models/Product.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -159,12 +159,12 @@  discard block
 block discarded – undo
159 159
      */
160 160
     protected function deleteRelatedInventories($inventories)
161 161
     {
162
-        return array_filter($inventories, function ($inventory) {
162
+        return array_filter($inventories, function($inventory) {
163 163
             if ($inventory['id'] !== null && $inventory['is_deleted']) {
164 164
                 Inventory::find($inventory['id'])->delete();
165 165
             }
166 166
 
167
-            return ! $inventory['is_deleted'];
167
+            return !$inventory['is_deleted'];
168 168
         });
169 169
     }
170 170
 
@@ -176,12 +176,12 @@  discard block
 block discarded – undo
176 176
      */
177 177
     protected function deleteRelatedOptions($options)
178 178
     {
179
-        return array_filter($options, function ($option) {
179
+        return array_filter($options, function($option) {
180 180
             if ($option['id'] !== null && $option['is_deleted']) {
181 181
                 Option::find($option['id'])->delete();
182 182
             }
183 183
 
184
-            return ! $option['is_deleted'];
184
+            return !$option['is_deleted'];
185 185
         });
186 186
     }
187 187
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                 OptionValue::find($optionValue['id'])->delete();
199 199
             }
200 200
 
201
-            return ! $optionValue['is_deleted'];
201
+            return !$optionValue['is_deleted'];
202 202
         });
203 203
     }
204 204
 
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
      * @param  string $sessionKey
330 330
      * @return void
331 331
      */
332
-    protected function saveRelatedOptionValues(Option &$option, array $values, $sessionKey)
332
+    protected function saveRelatedOptionValues(Option & $option, array $values, $sessionKey)
333 333
     {
334 334
         foreach ($values as $index => $value) {
335 335
             $model = array_key_exists('id', $value) && $value['id'] !== null
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
      */
383 383
     public static function syncAllInheritedCategories()
384 384
     {
385
-        Queue::push(function ($job) {
385
+        Queue::push(function($job) {
386 386
             $data = [];
387 387
             $products = Product::with('categories')->get();
388 388
             $categoryTree = Category::getParentCategoryIds();
@@ -445,8 +445,8 @@  discard block
 block discarded – undo
445 445
      */
446 446
     protected function validateInventories()
447 447
     {
448
-        if (! is_array($this->optionsInventories) ||
449
-            ! is_array($this->optionsInventories['options'])) {
448
+        if (!is_array($this->optionsInventories) ||
449
+            !is_array($this->optionsInventories['options'])) {
450 450
             return;
451 451
         }
452 452
 
@@ -477,8 +477,8 @@  discard block
 block discarded – undo
477 477
      */
478 478
     protected function validateOptions()
479 479
     {
480
-        if (! is_array($this->optionsInventories) ||
481
-            ! is_array($this->optionsInventories['options'])) {
480
+        if (!is_array($this->optionsInventories) ||
481
+            !is_array($this->optionsInventories['options'])) {
482 482
             return;
483 483
         }
484 484
 
Please login to merge, or discard this patch.