Completed
Push — master ( 559695...b26393 )
by Scott
02:54
created
models/Product.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -132,12 +132,12 @@  discard block
 block discarded – undo
132 132
      */
133 133
     protected function deleteRelatedInventories($inventories)
134 134
     {
135
-        return array_filter($inventories, function ($inventory) {
135
+        return array_filter($inventories, function($inventory) {
136 136
             if ($inventory['id'] !== null && $inventory['is_deleted']) {
137 137
                 Inventory::find($inventory['id'])->delete();
138 138
             }
139 139
 
140
-            return ! $inventory['is_deleted'];
140
+            return !$inventory['is_deleted'];
141 141
         });
142 142
     }
143 143
 
@@ -149,12 +149,12 @@  discard block
 block discarded – undo
149 149
      */
150 150
     protected function deleteRelatedOptions($options)
151 151
     {
152
-        return array_filter($options, function ($option) {
152
+        return array_filter($options, function($option) {
153 153
             if ($option['id'] !== null && $option['is_deleted']) {
154 154
                 Option::find($option['id'])->delete();
155 155
             }
156 156
 
157
-            return ! $option['is_deleted'];
157
+            return !$option['is_deleted'];
158 158
         });
159 159
     }
160 160
 
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
      * @param  string $sessionKey
276 276
      * @return void
277 277
      */
278
-    protected function saveRelatedOptionValues(Option &$option, array $values, $sessionKey)
278
+    protected function saveRelatedOptionValues(Option & $option, array $values, $sessionKey)
279 279
     {
280 280
         foreach ($values as $value) {
281 281
             $model = $value['id'] !== null
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
      */
318 318
     public static function syncAllInheritedCategories()
319 319
     {
320
-        Queue::push(function ($job) {
320
+        Queue::push(function($job) {
321 321
             $data = [];
322 322
             $products = Product::with('categories')->get();
323 323
             $categoryTree = Category::getParentCategoryIds();
@@ -380,8 +380,8 @@  discard block
 block discarded – undo
380 380
      */
381 381
     protected function validateInventories()
382 382
     {
383
-        if (! is_array($this->optionsInventories) ||
384
-            ! is_array($this->optionsInventories['options'])) {
383
+        if (!is_array($this->optionsInventories) ||
384
+            !is_array($this->optionsInventories['options'])) {
385 385
             return;
386 386
         }
387 387
 
@@ -412,8 +412,8 @@  discard block
 block discarded – undo
412 412
      */
413 413
     protected function validateOptions()
414 414
     {
415
-        if (! is_array($this->optionsInventories) ||
416
-            ! is_array($this->optionsInventories['options'])) {
415
+        if (!is_array($this->optionsInventories) ||
416
+            !is_array($this->optionsInventories['options'])) {
417 417
             return;
418 418
         }
419 419
 
Please login to merge, or discard this patch.