Passed
Push — develop ( 8daac1...a2b8ae )
by Mykola
04:44
created
application/controller/checkout/success.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     {
27 27
         $this->load->language('checkout/success');
28 28
         
29
-        if (isset($this->session->data['order_id']) && (! empty($this->session->data['order_id']))) {
29
+        if (isset($this->session->data['order_id']) && (!empty($this->session->data['order_id']))) {
30 30
             $this->session->data['last_order_id'] = $this->session->data['order_id'];
31 31
         }
32 32
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             unset($this->session->data['totals']);
45 45
         }
46 46
 
47
-        if (! empty($this->session->data['last_order_id'])) {
47
+        if (!empty($this->session->data['last_order_id'])) {
48 48
             $this->document->setTitle(sprintf($this->language->get('heading_title_customer'), $this->session->data['last_order_id']));
49 49
         } else {
50 50
             $this->document->setTitle($this->language->get('heading_title'));
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             'href' => $this->url->link('checkout/success')
73 73
         );
74 74
 
75
-        if (! empty($this->session->data['last_order_id'])) {
75
+        if (!empty($this->session->data['last_order_id'])) {
76 76
             $data['heading_title'] = sprintf($this->language->get('heading_title_customer'), $this->session->data['last_order_id']);
77 77
         } else {
78 78
             $data['heading_title'] = $this->language->get('heading_title');
Please login to merge, or discard this patch.
application/controller/extension/module/latestpercategory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
         if (isset($this->request->get['manufacturer_id'])) {
60 60
             $manufacturer_id = ($this->request->get['manufacturer_id']);
61 61
         } else {
62
-            $manufacturer_id  = null;
62
+            $manufacturer_id = null;
63 63
         }
64 64
 
65 65
         $filter_data = array(
Please login to merge, or discard this patch.
application/controller/extension/module/specialpercategory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
         if (isset($this->request->get['manufacturer_id'])) {
67 67
             $manufacturer_id = ($this->request->get['manufacturer_id']);
68 68
         } else {
69
-            $manufacturer_id  = null;
69
+            $manufacturer_id = null;
70 70
         }
71 71
 
72 72
 
Please login to merge, or discard this patch.
application/controller/product/category.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         }
68 68
 
69 69
         if (isset($this->request->get['limit'])) {
70
-            $limit = ((int) $this->request->get['limit'] > 100 ? 100 : (int) $this->request->get['limit']);
70
+            $limit = ((int)$this->request->get['limit'] > 100 ? 100 : (int)$this->request->get['limit']);
71 71
             $this->document->setRobots('noindex,follow');
72 72
         } else {
73 73
             $limit = $this->config->get('config_limit_store');
@@ -97,15 +97,15 @@  discard block
 block discarded – undo
97 97
 
98 98
             $path = '';
99 99
 
100
-            $parts = explode('_', (string) $this->request->get['path']);
100
+            $parts = explode('_', (string)$this->request->get['path']);
101 101
 
102
-            $category_id = (int) array_pop($parts);
102
+            $category_id = (int)array_pop($parts);
103 103
 
104 104
             foreach ($parts as $path_id) {
105 105
                 if (!$path) {
106
-                    $path = (int) $path_id;
106
+                    $path = (int)$path_id;
107 107
                 } else {
108
-                    $path .= '_' . (int) $path_id;
108
+                    $path .= '_' . (int)$path_id;
109 109
                 }
110 110
 
111 111
                 $category_info = $this->model_catalog_category->getCategory($path_id);
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
                     $price = false;
242 242
                 }
243 243
 
244
-                if ((float) $result['special']) {
244
+                if ((float)$result['special']) {
245 245
                     $special = $this->currency->format($result['special'], $this->session->data['currency']);
246 246
                 } else {
247 247
                     $special = false;
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
                     $description = \voku\helper\UTF8::substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get($this->config->get('config_theme') . '_product_description_length')) . '..';
254 254
                 }
255 255
 
256
-                if ((float) $result['special']) {
256
+                if ((float)$result['special']) {
257 257
                     $yousave_percent = round(((($result['price'] - $result['special']) / $result['price']) * 100), 0);
258 258
                 } else {
259 259
                     $yousave_percent = false;
Please login to merge, or discard this patch.
application/controller/product/product.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
         if (isset($this->request->get['path'])) {
52 52
             $path = '';
53 53
 
54
-            $parts = explode('_', (string) $this->request->get['path']);
54
+            $parts = explode('_', (string)$this->request->get['path']);
55 55
 
56
-            $category_id = (int) array_pop($parts);
56
+            $category_id = (int)array_pop($parts);
57 57
 
58 58
             foreach ($parts as $path_id) {
59 59
                 if (!$path) {
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
         // product_id
188 188
         if (isset($this->request->get['product_id'])) {
189
-            $product_id = (int) $this->request->get['product_id'];
189
+            $product_id = (int)$this->request->get['product_id'];
190 190
         } else {
191 191
             $product_id = 0;
192 192
         }
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
             $data['tab_attribute'] = $this->language->get('tab_attribute');
326 326
             $data['tab_review'] = sprintf($this->language->get('tab_review'), $product_info['reviews']);
327 327
 
328
-            $data['product_id'] = (int) $this->request->get['product_id'];
328
+            $data['product_id'] = (int)$this->request->get['product_id'];
329 329
             $data['manufacturer'] = $product_info['manufacturer'];
330 330
 
331 331
             // +++ category-in-the-product-page | All linked categories
@@ -378,19 +378,19 @@  discard block
 block discarded – undo
378 378
                 $data['price'] = false;
379 379
             }
380 380
 
381
-            if ((float) $product_info['special']) {
381
+            if ((float)$product_info['special']) {
382 382
                 $data['special'] = $this->currency->format($product_info['special'], $this->session->data['currency']);
383 383
             } else {
384 384
                 $data['special'] = false;
385 385
             }
386 386
 
387
-            if ((float) $product_info['special']) {
387
+            if ((float)$product_info['special']) {
388 388
                 $data['yousave_money'] = $this->currency->format(($product_info['price'] - $product_info['special']), $this->session->data['currency']);
389 389
             } else {
390 390
                 $data['yousave_money'] = false;
391 391
             }
392 392
 
393
-            if ((float) $product_info['special']) {
393
+            if ((float)$product_info['special']) {
394 394
                 $data['yousave_percent'] = round(((($product_info['price'] - $product_info['special']) / $product_info['price']) * 100), 0);
395 395
             } else {
396 396
                 $data['yousave_percent'] = false;
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 
443 443
                 foreach ($option['product_option_value'] as $option_value) {
444 444
                     if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) {
445
-                        if ((($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) && (float) $option_value['price']) {
445
+                        if ((($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) && (float)$option_value['price']) {
446 446
                             $price = $this->currency->format($option_value['price'], $this->session->data['currency']);
447 447
                         } else {
448 448
                             $price = false;
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
                 $data['customer_name'] = '';
493 493
             }
494 494
 
495
-            $data['reviews'] = sprintf($this->language->get('text_reviews'), (int) $product_info['reviews']);
495
+            $data['reviews'] = sprintf($this->language->get('text_reviews'), (int)$product_info['reviews']);
496 496
 
497 497
             $data['attribute_groups'] = $this->model_catalog_product->getProductAttributes($this->request->get['product_id']);
498 498
 
@@ -513,13 +513,13 @@  discard block
 block discarded – undo
513 513
                     $price = false;
514 514
                 }
515 515
 
516
-                if ((float) $result['special']) {
516
+                if ((float)$result['special']) {
517 517
                     $special = $this->currency->format($result['special'], $this->session->data['currency']);
518 518
                 } else {
519 519
                     $special = false;
520 520
                 }
521 521
 
522
-                if ((float) $result['special']) {
522
+                if ((float)$result['special']) {
523 523
                     $yousave_percent = round(((($result['price'] - $result['special']) / $result['price']) * 100), 0);
524 524
                 } else {
525 525
                     $yousave_percent = false;
Please login to merge, or discard this patch.
application/controller/product/manufacturer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
 
97 97
         if (isset($this->request->get['manufacturer_id'])) {
98
-            $manufacturer_id = (int) $this->request->get['manufacturer_id'];
98
+            $manufacturer_id = (int)$this->request->get['manufacturer_id'];
99 99
         } else {
100 100
             $manufacturer_id = 0;
101 101
         }
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
         }
122 122
 
123 123
         if (isset($this->request->get['limit'])) {
124
-            $limit = ((int) $this->request->get['limit'] > 100 ? 100 : (int) $this->request->get['limit']);
124
+            $limit = ((int)$this->request->get['limit'] > 100 ? 100 : (int)$this->request->get['limit']);
125 125
             $this->document->setRobots('noindex,follow');
126 126
         } else {
127
-            $limit = (int) $this->config->get('config_limit_store');
127
+            $limit = (int)$this->config->get('config_limit_store');
128 128
         }
129 129
 
130 130
         $data['breadcrumbs'] = array();
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
                     $price = false;
235 235
                 }
236 236
 
237
-                if ((float) $result['special']) {
237
+                if ((float)$result['special']) {
238 238
                     $special = $this->currency->format($result['special'], $this->session->data['currency']);
239 239
                 } else {
240 240
                     $special = false;
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
             $pagination->total = $product_total;
354 354
             $pagination->page = $page;
355 355
             $pagination->limit = $limit;
356
-            $pagination->url = $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] .  $url . '&page={page}');
356
+            $pagination->url = $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url . '&page={page}');
357 357
 
358 358
             $data['pagination'] = $pagination->render();
359 359
 
Please login to merge, or discard this patch.
application/controller/product/search.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -91,9 +91,9 @@  discard block
 block discarded – undo
91 91
         }
92 92
 
93 93
         if (isset($this->request->get['search'])) {
94
-            $this->document->setTitle($this->language->get('heading_title') .  ' - ' . $this->request->get['search']);
94
+            $this->document->setTitle($this->language->get('heading_title') . ' - ' . $this->request->get['search']);
95 95
         } elseif (isset($this->request->get['tag'])) {
96
-            $this->document->setTitle($this->language->get('heading_title') .  ' - ' . $this->language->get('heading_tag') . $this->request->get['tag']);
96
+            $this->document->setTitle($this->language->get('heading_title') . ' - ' . $this->language->get('heading_tag') . $this->request->get['tag']);
97 97
         } else {
98 98
             $this->document->setTitle($this->language->get('heading_title'));
99 99
         }
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         );
152 152
 
153 153
         if (isset($this->request->get['search'])) {
154
-            $data['heading_title'] = $this->language->get('heading_title') .  ' - ' . $this->request->get['search'];
154
+            $data['heading_title'] = $this->language->get('heading_title') . ' - ' . $this->request->get['search'];
155 155
         } else {
156 156
             $data['heading_title'] = $this->language->get('heading_title');
157 157
         }
Please login to merge, or discard this patch.
application/model/checkout/onepagecheckout.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
                 SET order_id = '" . (int)$order_id . "', 
104 104
                     code = 'total', 
105 105
                     title = 'Total', 
106
-                    `value` = '" . (float)$data['cart_total']."', 
106
+                    `value` = '" . (float)$data['cart_total'] . "', 
107 107
                     sort_order = ''
108 108
             ");
109 109
             $this->db->query("
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
                 SET order_id = '" . (int)$order_id . "', 
112 112
                     code = 'sub_total', 
113 113
                     title = 'Total', 
114
-                    `value` = '" . (float)$data['cart_total']."', 
114
+                    `value` = '" . (float)$data['cart_total'] . "', 
115 115
                     sort_order = ''
116 116
             ");
117 117
         }
@@ -152,18 +152,18 @@  discard block
 block discarded – undo
152 152
             $this->db->query("
153 153
                 INSERT INTO order_total 
154 154
                 SET order_id = '" . (int)$order_id . "', 
155
-                    code = '".$total['code']."', 
156
-                    title = '".$total['title']."', 
157
-                    `value` = '" . (float)$total['value']."', 
158
-                    sort_order = '".$i."'
155
+                    code = '".$total['code'] . "', 
156
+                    title = '".$total['title'] . "', 
157
+                    `value` = '" . (float)$total['value'] . "', 
158
+                    sort_order = '".$i . "'
159 159
             ");
160 160
             $i += 10;
161
-            $total_sum =  $total['value'];
161
+            $total_sum = $total['value'];
162 162
         }
163 163
         // Last row in totals should be final sum...
164 164
         $this->db->query("
165 165
             UPDATE order 
166
-            SET total='".$total_sum."' 
166
+            SET total='".$total_sum . "' 
167 167
             WHERE order_id = '" . (int)$order_id . "'
168 168
         ");
169 169
 
Please login to merge, or discard this patch.
application/model/extension/shipping/xshipping.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -29,16 +29,16 @@  discard block
 block discarded – undo
29 29
         $method_data = array();
30 30
         $quote_data = array();
31 31
 
32
-        for ($i=1;$i<=12;$i++) {
32
+        for ($i = 1; $i <= 12; $i++) {
33 33
             $query = $this->db->query("
34 34
 				SELECT * 
35 35
 				FROM zone_to_geo_zone 
36
-				WHERE geo_zone_id = '" . (int)$this->config->get('xshipping_geo_zone_id'.$i) . "' 
36
+				WHERE geo_zone_id = '" . (int)$this->config->get('xshipping_geo_zone_id' . $i) . "' 
37 37
 					AND country_id = '" . (int)$address['country_id'] . "' 
38 38
 					AND (zone_id = '" . (int)$address['zone_id'] . "' OR zone_id = '0')
39 39
 			");
40 40
 
41
-            if (!$this->config->get('xshipping_geo_zone_id'.$i)) {
41
+            if (!$this->config->get('xshipping_geo_zone_id' . $i)) {
42 42
                 $status = true;
43 43
             } elseif ($query->num_rows) {
44 44
                 $status = true;
@@ -46,28 +46,28 @@  discard block
 block discarded – undo
46 46
                 $status = false;
47 47
             }
48 48
 
49
-            if (!$this->config->get('xshipping_status'.$i)) {
49
+            if (!$this->config->get('xshipping_status' . $i)) {
50 50
                 $status = false;
51 51
             }
52 52
                 
53
-            if (!$this->config->get('xshipping_name'.$i)) {
53
+            if (!$this->config->get('xshipping_name' . $i)) {
54 54
                 $status = false;
55 55
             }
56 56
 
57
-            $shipping_cost=$this->config->get('xshipping_cost'.$i);
58
-            $free_shipping_cost=(float)$this->config->get('xshipping_free'.$i);
57
+            $shipping_cost = $this->config->get('xshipping_cost' . $i);
58
+            $free_shipping_cost = (float)$this->config->get('xshipping_free' . $i);
59 59
             if (empty($free_shipping_cost)) {
60
-                $free_shipping_cost=0;
60
+                $free_shipping_cost = 0;
61 61
             }
62 62
 
63
-            if ($this->cart->getSubTotal() >= $free_shipping_cost && $free_shipping_cost!=0) {
63
+            if ($this->cart->getSubTotal() >= $free_shipping_cost && $free_shipping_cost != 0) {
64 64
                 $shipping_cost = 0;
65 65
             }
66 66
 
67 67
             if ($status) {
68
-                $quote_data['xshipping'.$i] = array(
69
-                    'code'         => 'xshipping'.'.xshipping'.$i,
70
-                    'title'        => $this->config->get('xshipping_name'.$i),
68
+                $quote_data['xshipping' . $i] = array(
69
+                    'code'         => 'xshipping' . '.xshipping' . $i,
70
+                    'title'        => $this->config->get('xshipping_name' . $i),
71 71
                     'cost'         => $shipping_cost,
72 72
                     'text'         => $this->currency->format($shipping_cost, $this->session->data['currency'])
73 73
                 );
Please login to merge, or discard this patch.