Passed
Push — develop ( 7fd0a7...b40d4d )
by Mykola
04:17
created
application/controller/information/information.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         );
39 39
 
40 40
         if (isset($this->request->get['information_id'])) {
41
-            $information_id = (int) $this->request->get['information_id'];
41
+            $information_id = (int)$this->request->get['information_id'];
42 42
         } else {
43 43
             $information_id = 0;
44 44
         }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
             $data['breadcrumbs'][] = array(
69 69
                 'text' => $information_info[0]['title'],
70
-                'href' => $this->url->link('information/information', 'information_id=' .  $information_id)
70
+                'href' => $this->url->link('information/information', 'information_id=' . $information_id)
71 71
             );
72 72
 
73 73
             $data['button_continue'] = $this->language->get('button_continue');
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         $this->load->model('catalog/information');
118 118
 
119 119
         if (isset($this->request->get['information_id'])) {
120
-            $information_id = (int) $this->request->get['information_id'];
120
+            $information_id = (int)$this->request->get['information_id'];
121 121
         } else {
122 122
             $information_id = 0;
123 123
         }
Please login to merge, or discard this patch.
application/model/catalog/information.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
             SELECT DISTINCT * 
30 30
             FROM information i 
31 31
             LEFT JOIN information_description id ON (i.information_id = id.information_id) 
32
-            WHERE i.information_id = '" . (int) $information_id . "' 
33
-                AND id.language_id = '" . (int) $this->config->get('config_language_id') . "' 
32
+            WHERE i.information_id = '" . (int)$information_id . "' 
33
+                AND id.language_id = '" . (int)$this->config->get('config_language_id') . "' 
34 34
                 AND i.status = '1'
35 35
         ");
36 36
 
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
             ->select('DISTINCT *')
42 42
             ->from('information', 'i')
43 43
             ->leftJoin('i', 'information_description', 'id', 'i.information_id = id.information_id')
44
-            ->where('i.information_id = ' . (int) $information_id)
45
-            ->andWhere('id.language_id = ' . (int) $this->config->get('config_language_id'))
44
+            ->where('i.information_id = ' . (int)$information_id)
45
+            ->andWhere('id.language_id = ' . (int)$this->config->get('config_language_id'))
46 46
             ->andWhere('i.status = 1')
47 47
             ->execute()
48 48
             ->fetchAll();
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             SELECT * 
60 60
             FROM information i 
61 61
             LEFT JOIN information_description id ON (i.information_id = id.information_id) 
62
-            WHERE id.language_id = '" . (int) $this->config->get('config_language_id') . "' 
62
+            WHERE id.language_id = '" . (int)$this->config->get('config_language_id') . "' 
63 63
                 AND i.status = '1' 
64 64
             ORDER BY i.sort_order, 
65 65
             LCASE(id.title) ASC
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         $query = $this->db->query("
74 74
             SELECT * 
75 75
             FROM information_to_layout 
76
-            WHERE information_id = '" . (int) $information_id . "'
76
+            WHERE information_id = '" . (int)$information_id . "'
77 77
         ");
78 78
 
79 79
         if ($query->num_rows) {
Please login to merge, or discard this patch.
engine/library/Customer.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             $customer_query = $this->db->query("
46 46
                 SELECT * 
47 47
                 FROM customer 
48
-                WHERE customer_id = '" . (int) $this->session->data['customer_id'] . "' 
48
+                WHERE customer_id = '" . (int)$this->session->data['customer_id'] . "' 
49 49
                     AND status = '1'
50 50
             ");
51 51
 
@@ -62,22 +62,22 @@  discard block
 block discarded – undo
62 62
 
63 63
                 $this->db->query("
64 64
                     UPDATE customer 
65
-                    SET language_id = '" . (int) $this->config->get('config_language_id') . "', 
65
+                    SET language_id = '" . (int)$this->config->get('config_language_id') . "', 
66 66
                         ip = '" . $this->db->escape($this->request->server['REMOTE_ADDR']) . "' 
67
-                    WHERE customer_id = '" . (int) $this->customer_id . "'
67
+                    WHERE customer_id = '" . (int)$this->customer_id . "'
68 68
                 ");
69 69
 
70 70
                 $query = $this->db->query("
71 71
                     SELECT * 
72 72
                     FROM customer_ip 
73
-                    WHERE customer_id = '" . (int) $this->session->data['customer_id'] . "' 
73
+                    WHERE customer_id = '" . (int)$this->session->data['customer_id'] . "' 
74 74
                         AND ip = '" . $this->db->escape($this->request->server['REMOTE_ADDR']) . "'
75 75
                 ");
76 76
 
77 77
                 if (!$query->num_rows) {
78 78
                     $this->db->query("
79 79
                         INSERT INTO customer_ip 
80
-                        SET customer_id = '" . (int) $this->session->data['customer_id'] . "', 
80
+                        SET customer_id = '" . (int)$this->session->data['customer_id'] . "', 
81 81
                             ip = '" . $this->db->escape($this->request->server['REMOTE_ADDR']) . "', 
82 82
                             date_added = NOW()
83 83
                     ");
@@ -123,9 +123,9 @@  discard block
 block discarded – undo
123 123
 
124 124
             $this->db->query("
125 125
                 UPDATE customer 
126
-                SET language_id = '" . (int) $this->config->get('config_language_id') . "', 
126
+                SET language_id = '" . (int)$this->config->get('config_language_id') . "', 
127 127
                     ip = '" . $this->db->escape($this->request->server['REMOTE_ADDR']) . "' 
128
-                WHERE customer_id = '" . (int) $this->customer_id . "'
128
+                WHERE customer_id = '" . (int)$this->customer_id . "'
129 129
             ");
130 130
 
131 131
             return true;
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         $query = $this->db->query("
205 205
             SELECT SUM(amount) AS total 
206 206
             FROM customer_transaction 
207
-            WHERE customer_id = '" . (int) $this->customer_id . "'
207
+            WHERE customer_id = '" . (int)$this->customer_id . "'
208 208
         ");
209 209
 
210 210
         return $query->row['total'];
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         $query = $this->db->query("
216 216
             SELECT SUM(points) AS total 
217 217
             FROM customer_reward 
218
-            WHERE customer_id = '" . (int) $this->customer_id . "'
218
+            WHERE customer_id = '" . (int)$this->customer_id . "'
219 219
         ");
220 220
 
221 221
         return $query->row['total'];
Please login to merge, or discard this patch.
engine/library/Currency.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
             $value = $this->currencies[$currency]['value'];
59 59
         }
60 60
 
61
-        $amount = $value ? (float) $number * $value : (float) $number;
61
+        $amount = $value ? (float)$number * $value : (float)$number;
62 62
 
63
-        $amount = round($amount, (int) $decimal_place);
63
+        $amount = round($amount, (int)$decimal_place);
64 64
 
65 65
         if (!$format) {
66 66
             return $amount;
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             $string .= $symbol_left;
73 73
         }
74 74
 
75
-        $string .= number_format($amount, (int) $decimal_place, $this->language->get('decimal_point'), $this->language->get('thousand_point'));
75
+        $string .= number_format($amount, (int)$decimal_place, $this->language->get('decimal_point'), $this->language->get('thousand_point'));
76 76
 
77 77
         if ($symbol_right) {
78 78
             $string .= $symbol_right;
Please login to merge, or discard this patch.
engine/library/Cart.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             $this->db->query("
46 46
                 UPDATE cart 
47 47
                 SET session_id = '" . $this->db->escape($this->session->getId()) . "' 
48
-                WHERE customer_id = '" . (int) $this->customer->getId() . "'
48
+                WHERE customer_id = '" . (int)$this->customer->getId() . "'
49 49
             ");
50 50
 
51 51
             // Once the customer is logged in we want to update the customers cart
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             foreach ($cart_query->rows as $cart) {
60 60
                 $this->db->query("
61 61
                     DELETE FROM cart 
62
-                    WHERE cart_id = '" . (int) $cart['cart_id'] . "'
62
+                    WHERE cart_id = '" . (int)$cart['cart_id'] . "'
63 63
                 ");
64 64
 
65 65
                 // The advantage of using $this->add is that it will check if the products already exist and increaser the quantity if necessary.
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         $cart_query = $this->db->query("
76 76
             SELECT * 
77 77
             FROM cart 
78
-            WHERE customer_id = '" . (int) $this->customer->getId() . "' 
78
+            WHERE customer_id = '" . (int)$this->customer->getId() . "' 
79 79
                 AND session_id = '" . $this->db->escape($this->session->getId()) . "'
80 80
         ");
81 81
 
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
                 SELECT * 
87 87
                 FROM product p 
88 88
                 LEFT JOIN product_description pd ON (p.product_id = pd.product_id) 
89
-                WHERE p.product_id = '" . (int) $cart['product_id'] . "' 
90
-                    AND pd.language_id = '" . (int) $this->config->get('config_language_id') . "' 
89
+                WHERE p.product_id = '" . (int)$cart['product_id'] . "' 
90
+                    AND pd.language_id = '" . (int)$this->config->get('config_language_id') . "' 
91 91
                     AND p.status = '1'
92 92
             ");
93 93
 
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
                         FROM product_option po 
104 104
                         LEFT JOIN `option` o ON (po.option_id = o.option_id) 
105 105
                         LEFT JOIN option_description od ON (o.option_id = od.option_id) 
106
-                        WHERE po.product_option_id = '" . (int) $product_option_id . "' 
107
-                            AND po.product_id = '" . (int) $cart['product_id'] . "' 
108
-                            AND od.language_id = '" . (int) $this->config->get('config_language_id') . "'
106
+                        WHERE po.product_option_id = '" . (int)$product_option_id . "' 
107
+                            AND po.product_id = '" . (int)$cart['product_id'] . "' 
108
+                            AND od.language_id = '" . (int)$this->config->get('config_language_id') . "'
109 109
                     ");
110 110
 
111 111
                     if ($option_query->num_rows) {
@@ -115,9 +115,9 @@  discard block
 block discarded – undo
115 115
                                 FROM product_option_value pov 
116 116
                                 LEFT JOIN option_value ov ON (pov.option_value_id = ov.option_value_id) 
117 117
                                 LEFT JOIN option_value_description ovd ON (ov.option_value_id = ovd.option_value_id) 
118
-                                WHERE pov.product_option_value_id = '" . (int) $value . "' 
119
-                                    AND pov.product_option_id = '" . (int) $product_option_id . "' 
120
-                                    AND ovd.language_id = '" . (int) $this->config->get('config_language_id') . "'
118
+                                WHERE pov.product_option_value_id = '" . (int)$value . "' 
119
+                                    AND pov.product_option_id = '" . (int)$product_option_id . "' 
120
+                                    AND ovd.language_id = '" . (int)$this->config->get('config_language_id') . "'
121 121
                             ");
122 122
 
123 123
                             if ($option_value_query->num_rows) {
@@ -159,9 +159,9 @@  discard block
 block discarded – undo
159 159
                                     SELECT pov.option_value_id, pov.quantity, pov.subtract, pov.price, pov.price_prefix, pov.points, pov.points_prefix, ovd.name 
160 160
                                     FROM product_option_value pov 
161 161
                                     LEFT JOIN option_value_description ovd ON (pov.option_value_id = ovd.option_value_id) 
162
-                                    WHERE pov.product_option_value_id = '" . (int) $product_option_value_id . "' 
163
-                                        AND pov.product_option_id = '" . (int) $product_option_id . "' 
164
-                                        AND ovd.language_id = '" . (int) $this->config->get('config_language_id') . "'
162
+                                    WHERE pov.product_option_value_id = '" . (int)$product_option_value_id . "' 
163
+                                        AND pov.product_option_id = '" . (int)$product_option_id . "' 
164
+                                        AND ovd.language_id = '" . (int)$this->config->get('config_language_id') . "'
165 165
                                 ");
166 166
 
167 167
                                 if ($option_value_query->num_rows) {
@@ -232,9 +232,9 @@  discard block
 block discarded – undo
232 232
                 $product_discount_query = $this->db->query("
233 233
                     SELECT price 
234 234
                     FROM product_discount 
235
-                    WHERE product_id = '" . (int) $cart['product_id'] . "' 
236
-                        AND customer_group_id = '" . (int) $this->config->get('config_customer_group_id') . "' 
237
-                        AND quantity <= '" . (int) $discount_quantity . "' 
235
+                    WHERE product_id = '" . (int)$cart['product_id'] . "' 
236
+                        AND customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "' 
237
+                        AND quantity <= '" . (int)$discount_quantity . "' 
238 238
                         AND ((date_start = '2000-01-01' OR date_start < NOW()) 
239 239
                         AND (date_end = '2000-01-01' OR date_end > NOW())) 
240 240
                     ORDER BY quantity DESC, priority ASC, price ASC 
@@ -249,8 +249,8 @@  discard block
 block discarded – undo
249 249
                 $product_special_query = $this->db->query("
250 250
                     SELECT price 
251 251
                     FROM product_special 
252
-                    WHERE product_id = '" . (int) $cart['product_id'] . "' 
253
-                        AND customer_group_id = '" . (int) $this->config->get('config_customer_group_id') . "' 
252
+                    WHERE product_id = '" . (int)$cart['product_id'] . "' 
253
+                        AND customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "' 
254 254
                         AND ((date_start = '2000-01-01' OR date_start < NOW()) 
255 255
                         AND (date_end = '2000-01-01' OR date_end > NOW())) 
256 256
                     ORDER BY priority ASC, price ASC 
@@ -265,8 +265,8 @@  discard block
 block discarded – undo
265 265
                 $product_reward_query = $this->db->query("
266 266
                     SELECT points 
267 267
                     FROM product_reward 
268
-                    WHERE product_id = '" . (int) $cart['product_id'] . "' 
269
-                        AND customer_group_id = '" . (int) $this->config->get('config_customer_group_id') . "'
268
+                    WHERE product_id = '" . (int)$cart['product_id'] . "' 
269
+                        AND customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "'
270 270
                 ");
271 271
 
272 272
                 if ($product_reward_query->num_rows) {
@@ -283,8 +283,8 @@  discard block
 block discarded – undo
283 283
                     FROM product_to_download p2d 
284 284
                     LEFT JOIN download d ON (p2d.download_id = d.download_id) 
285 285
                     LEFT JOIN download_description dd ON (d.download_id = dd.download_id) 
286
-                    WHERE p2d.product_id = '" . (int) $cart['product_id'] . "' 
287
-                        AND dd.language_id = '" . (int) $this->config->get('config_language_id') . "'
286
+                    WHERE p2d.product_id = '" . (int)$cart['product_id'] . "' 
287
+                        AND dd.language_id = '" . (int)$this->config->get('config_language_id') . "'
288 288
                 ");
289 289
 
290 290
                 foreach ($download_query->rows as $download) {
@@ -334,29 +334,29 @@  discard block
 block discarded – undo
334 334
         $query = $this->db->query("
335 335
             SELECT COUNT(*) AS total 
336 336
             FROM cart 
337
-            WHERE customer_id = '" . (int) $this->customer->getId() . "' 
337
+            WHERE customer_id = '" . (int)$this->customer->getId() . "' 
338 338
                 AND session_id = '" . $this->db->escape($this->session->getId()) . "' 
339
-                AND product_id = '" . (int) $product_id . "' 
339
+                AND product_id = '" . (int)$product_id . "' 
340 340
                 AND `option` = '" . $this->db->escape(json_encode($option)) . "'
341 341
         ");
342 342
 
343 343
         if (!$query->row['total']) {
344 344
             $this->db->query("
345 345
                 INSERT cart 
346
-                SET customer_id = '" . (int) $this->customer->getId() . "', 
346
+                SET customer_id = '" . (int)$this->customer->getId() . "', 
347 347
                     session_id = '" . $this->db->escape($this->session->getId()) . "', 
348
-                    product_id = '" . (int) $product_id . "', 
348
+                    product_id = '" . (int)$product_id . "', 
349 349
                     `option` = '" . $this->db->escape(json_encode($option)) . "', 
350
-                    quantity = '" . (int) $quantity . "', 
350
+                    quantity = '" . (int)$quantity . "', 
351 351
                     date_added = NOW()
352 352
             ");
353 353
         } else {
354 354
             $this->db->query("
355 355
                 UPDATE cart 
356
-                SET quantity = (quantity + " . (int) $quantity . ") 
357
-                WHERE customer_id = '" . (int) $this->customer->getId() . "' 
356
+                SET quantity = (quantity + " . (int)$quantity . ") 
357
+                WHERE customer_id = '" . (int)$this->customer->getId() . "' 
358 358
                     AND session_id = '" . $this->db->escape($this->session->getId()) . "' 
359
-                    AND product_id = '" . (int) $product_id . "' 
359
+                    AND product_id = '" . (int)$product_id . "' 
360 360
                     AND `option` = '" . $this->db->escape(json_encode($option)) . "'
361 361
             ");
362 362
         }
@@ -366,9 +366,9 @@  discard block
 block discarded – undo
366 366
     {
367 367
         $this->db->query("
368 368
             UPDATE cart 
369
-            SET quantity = '" . (int) $quantity . "' 
370
-            WHERE cart_id = '" . (int) $cart_id . "' 
371
-                AND customer_id = '" . (int) $this->customer->getId() . "' 
369
+            SET quantity = '" . (int)$quantity . "' 
370
+            WHERE cart_id = '" . (int)$cart_id . "' 
371
+                AND customer_id = '" . (int)$this->customer->getId() . "' 
372 372
                 AND session_id = '" . $this->db->escape($this->session->getId()) . "'
373 373
         ");
374 374
     }
@@ -377,8 +377,8 @@  discard block
 block discarded – undo
377 377
     {
378 378
         $this->db->query("
379 379
             DELETE FROM cart 
380
-            WHERE cart_id = '" . (int) $cart_id . "' 
381
-                AND customer_id = '" . (int) $this->customer->getId() . "' 
380
+            WHERE cart_id = '" . (int)$cart_id . "' 
381
+                AND customer_id = '" . (int)$this->customer->getId() . "' 
382 382
                 AND session_id = '" . $this->db->escape($this->session->getId()) . "'
383 383
         ");
384 384
     }
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
     {
388 388
         $this->db->query("
389 389
             DELETE FROM cart 
390
-            WHERE customer_id = '" . (int) $this->customer->getId() . "' 
390
+            WHERE customer_id = '" . (int)$this->customer->getId() . "' 
391 391
                 AND session_id = '" . $this->db->escape($this->session->getId()) . "'
392 392
         ");
393 393
     }
Please login to merge, or discard this patch.
engine/core/Action.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     {
33 33
         $this->id = $route;
34 34
 
35
-        $parts = explode('/', preg_replace('/[^a-zA-Z0-9_\/]/', '', (string) $route));
35
+        $parts = explode('/', preg_replace('/[^a-zA-Z0-9_\/]/', '', (string)$route));
36 36
 
37 37
         // Break apart the route
38 38
         while ($parts) {
Please login to merge, or discard this patch.