Completed
Push — master ( 104ef7...ae9661 )
by Lawrence
01:58
created
src/Prestashop.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                 $choices = array_slice($vars, 1);
68 68
                 $id_product_attribute = $this->getAttribute($product, $choices);
69 69
                 Analog::log("Product combination: $id_product_attribute");
70
-                $combo_groups = $this->getCombination($product,$id_product_attribute);
70
+                $combo_groups = $this->getCombination($product, $id_product_attribute);
71 71
                 if (!empty($combo_groups) && is_array($combo_groups) && $combo_groups) {
72 72
                     foreach ($combo_groups as $k => $row) {
73 73
                         $combinations = $this->buildAttributes($combinations, $id_product_attribute, $row);
@@ -206,20 +206,20 @@  discard block
 block discarded – undo
206 206
     /**
207 207
      * @param null|string $id_product_attribute
208 208
      */
209
-    private function getCombination($product,$id_product_attribute)
209
+    private function getCombination($product, $id_product_attribute)
210 210
     {
211 211
         $combo = $this->getAttributeBase($id_product_attribute);
212 212
 
213 213
         if (is_array($combo))
214 214
         {
215
-         foreach($combo as $key => $value)
215
+         foreach ($combo as $key => $value)
216 216
         {
217 217
             $combo['base_price'] = (float) $this->getOrderPrice($product);
218
-            $combo['quantity'] = (int) $this->getStockQuantity($product,$id_product_attribute);
218
+            $combo['quantity'] = (int) $this->getStockQuantity($product, $id_product_attribute);
219 219
             $combo['id_product'] = (int) $product;
220 220
             $combo['product_name'] = (int) $this->getProductName($product);
221 221
             $pricing = $this->getAttributePricing($id_product_attribute);
222
-            foreach($pricing as $ki => $val)
222
+            foreach ($pricing as $ki => $val)
223 223
             {   
224 224
               $combo[$ki] = $val;
225 225
             }
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 
389 389
         if (is_array($result))
390 390
         {
391
-         foreach($result as $key => $value)
391
+         foreach ($result as $key => $value)
392 392
         {
393 393
             $result['cat_id'] = $value['id_category_default'];
394 394
             $result['orderprice'] = $this->getOrderPrice($product);
Please login to merge, or discard this patch.