Test Failed
Push — master ( 8d6371...123ab3 )
by Alexey
09:12 queued 04:24
created
system/modules/Ecommerce/models/Cart.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -336,6 +336,9 @@
 block discarded – undo
336 336
         return false;
337 337
     }
338 338
 
339
+    /**
340
+     * @return \Money\Sums
341
+     */
339 342
     public function deliverySum() {
340 343
         $sum = new \Money\Sums([]);
341 344
         if ($this->delivery && $this->needDelivery()) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
     }
367 367
 
368 368
     public function hasDiscount() {
369
-        return (bool)$this->card || $this->discounts;
369
+        return (bool) $this->card || $this->discounts;
370 370
     }
371 371
 
372 372
     public function discountSum() {
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
     }
398 398
 
399 399
     public function addItem($offer_price_id, $count = 1, $final_price = 0) {
400
-        $price = Item\Offer\Price::get((int)$offer_price_id);
400
+        $price = Item\Offer\Price::get((int) $offer_price_id);
401 401
 
402 402
         if (!$price) {
403 403
             return false;
Please login to merge, or discard this patch.
system/modules/Ecommerce/models/Delivery/Field.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     public static $dataManagers = [
40 40
         'manager' => [
41 41
             'cols' => [
42
-                'name','code', 'type', 'userfield', 'required', 'fieldItem', 'save'
42
+                'name', 'code', 'type', 'userfield', 'required', 'fieldItem', 'save'
43 43
             ],
44 44
         ]
45 45
     ];
Please login to merge, or discard this patch.
system/modules/Ecommerce/models/Delivery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
     public static $forms = [
84 84
         'manager' => [
85 85
             'map' => [
86
-                ['name','delivery_provider_id', 'disabled'],
86
+                ['name', 'delivery_provider_id', 'disabled'],
87 87
                 ['price', 'currency_id'],
88 88
                 ['max_cart_price', 'icon_file_id'],
89 89
                 ['price_text'],
Please login to merge, or discard this patch.
system/modules/Ecommerce/appControllers/CartController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
                 $ids = [];
32 32
                 if (!empty($_POST['cartItems'])) {
33 33
                     foreach ($_POST['cartItems'] as $cartItemId => $cartItemCont) {
34
-                        $cartItem = \Ecommerce\Cart\Item::get((int)$cartItemId);
34
+                        $cartItem = \Ecommerce\Cart\Item::get((int) $cartItemId);
35 35
                         if (!$cartItem) {
36 36
                             continue;
37 37
                         }
38 38
                         if ($cartItem->cart_id != $cart->id) {
39 39
                             continue;
40 40
                         }
41
-                        $count = (float)$cartItemCont;
41
+                        $count = (float) $cartItemCont;
42 42
                         if ($count < 0.001) {
43 43
                             $count = 1;
44 44
                         }
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                     }
94 94
                 }
95 95
                 if (!empty($_POST['discounts']['card_item_id'])) {
96
-                    $userCard = \Ecommerce\Card\Item::get((int)$_POST['discounts']['card_item_id']);
96
+                    $userCard = \Ecommerce\Card\Item::get((int) $_POST['discounts']['card_item_id']);
97 97
                     if (!$userCard) {
98 98
                         $error = true;
99 99
                         Msg::add('Такой карты не существует', 'danger');
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     }
165 165
 
166 166
     public function orderDetailAction($id = 0) {
167
-        $cart = Ecommerce\Cart::get((int)$id);
167
+        $cart = Ecommerce\Cart::get((int) $id);
168 168
         if ($cart->user_id != Users\User::$cur->id) {
169 169
             $this->url->redirect('/', 'Это не ваша корзина');
170 170
         }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
     }
187 187
 
188 188
     public function continueAction($id = 0) {
189
-        $cart = \Ecommerce\Cart::get((int)$id);
189
+        $cart = \Ecommerce\Cart::get((int) $id);
190 190
         if ($cart->user_id != Users\User::$cur->id) {
191 191
             Tools::redirect('/', 'Это не ваша корзина');
192 192
         }
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
     }
199 199
 
200 200
     public function deleteAction($id = 0) {
201
-        $cart = \Ecommerce\Cart::get((int)$id);
201
+        $cart = \Ecommerce\Cart::get((int) $id);
202 202
         if ($cart->user_id != Users\User::$cur->id) {
203 203
             Tools::redirect('/', 'Это не ваша корзина');
204 204
         }
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
     }
214 214
 
215 215
     public function refillAction($id = 0) {
216
-        $cart = \Ecommerce\Cart::get((int)$id);
216
+        $cart = \Ecommerce\Cart::get((int) $id);
217 217
         if ($cart->user_id != Users\User::$cur->id) {
218 218
             Tools::redirect('/', 'Это не ваша корзина');
219 219
         }
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
             $result->content = 'Произошла непредвиденная ошибка при добавлении товара';
256 256
             $result->send();
257 257
         }
258
-        $price = \Ecommerce\Item\Offer\Price::get((int)$_GET['itemOfferPriceId']);
258
+        $price = \Ecommerce\Item\Offer\Price::get((int) $_GET['itemOfferPriceId']);
259 259
         if (!$price) {
260 260
             $result->success = false;
261 261
             $result->content = 'Такой цены не найдено';
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
         if (empty($_GET['count'])) {
276 276
             $count = 1;
277 277
         } else {
278
-            $count = (float)$_GET['count'];
278
+            $count = (float) $_GET['count'];
279 279
         }
280 280
 
281 281
         $cart = $this->ecommerce->getCurCart();
Please login to merge, or discard this patch.