Test Failed
Push — master ( 101480...045277 )
by Alexey
04:28
created
system/modules/UserForms/UserForms.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@
 block discarded – undo
14 14
         \App::$cur->view->customAsset('js', '/static/moduleAsset/UserForms/js/formCatcher.js');
15 15
         if (!empty($_POST['UserForms'])) {
16 16
             foreach ($_POST['UserForms'] as $form_id => $inputs) {
17
-                $form = \UserForms\Form::get((int)$form_id);
17
+                $form = \UserForms\Form::get((int) $form_id);
18 18
                 if (!$form) {
19 19
                     continue;
20 20
                 }
21 21
                 $formRecive = new \UserForms\Recive();
22
-                $formRecive->user_id = (int)\Users\User::$cur->id;
23
-                $formRecive->form_id = (int)$form_id;
22
+                $formRecive->user_id = (int) \Users\User::$cur->id;
23
+                $formRecive->form_id = (int) $form_id;
24 24
                 $data = [];
25 25
                 $error = false;
26 26
                 foreach ($form->inputs as $input) {
Please login to merge, or discard this patch.
system/modules/Ecommerce/objects/DeliveryProvider/PickPoint.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     static $name = 'PickPoint - курьерская служба';
17 17
 
18 18
     /**
19
-     * @param \Ecommerce\Cart $cart
19
+     * @param string $URL
20 20
      * @return \Money\Sums
21 21
      */
22 22
     static function curl_get_file_contents($URL, $data) {
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,8 +35,11 @@
 block discarded – undo
35 35
         $contents = curl_exec($c);
36 36
         curl_close($c);
37 37
 
38
-        if ($contents) return $contents;
39
-        else return FALSE;
38
+        if ($contents) {
39
+            return $contents;
40
+        } else {
41
+            return FALSE;
42
+        }
40 43
     }
41 44
 
42 45
     static function calcPrice($cart) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         curl_close($c);
37 37
 
38 38
         if ($contents) return $contents;
39
-        else return FALSE;
39
+        else return false;
40 40
     }
41 41
 
42 42
     static function calcPrice($cart) {
Please login to merge, or discard this patch.
system/modules/Ecommerce/objects/DeliveryProvider/RussianPost.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,6 +49,6 @@
 block discarded – undo
49 49
         ];
50 50
         $result = json_decode(file_get_contents($url . http_build_query($data)), true);
51 51
         $sum = !empty($result['tariff'][0]['ground']['valnds']) ? $result['tariff'][0]['ground']['valnds'] : (!empty($result['tariff'][0]['avia']['valnds']) ? $result['tariff'][0]['avia']['valnds'] : 0);
52
-        return new \Money\Sums([$cart->delivery->currency_id => $sum/100]);
52
+        return new \Money\Sums([$cart->delivery->currency_id => $sum / 100]);
53 53
     }
54 54
 }
55 55
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Users/appControllers/UsersController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
     }
113 113
 
114 114
     public function activationAction($userId = 0, $hash = '') {
115
-        $user = \Users\User::get((int)$userId);
116
-        if (!$user || !$hash || $user->activation !== (string)$hash) {
115
+        $user = \Users\User::get((int) $userId);
116
+        if (!$user || !$hash || $user->activation !== (string) $hash) {
117 117
             Tools::redirect('/', 'Во время активации произошли ошибки', 'danger');
118 118
         }
119 119
         $user->activation = '';
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     }
157 157
 
158 158
     public function resendActivationAction($userId = 0) {
159
-        $user = \Users\User::get((int)$userId);
159
+        $user = \Users\User::get((int) $userId);
160 160
         if (!$user) {
161 161
             Tools::redirect('/', 'Не указан пользователь', 'danger');
162 162
         }
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     }
173 173
 
174 174
     public function getPartnerInfoAction($userId = 0) {
175
-        $userId = (int)$userId;
175
+        $userId = (int) $userId;
176 176
         $result = new \Server\Result();
177 177
         if (!$userId) {
178 178
             $result->success = false;
Please login to merge, or discard this patch.
system/modules/Ecommerce/models/Item/Offer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -102,12 +102,12 @@  discard block
 block discarded – undo
102 102
     public function changeWarehouse($count) {
103 103
         $warehouse = Offer\Warehouse::get([['count', '0', '>'], ['item_offer_id', $this->id]]);
104 104
         if ($warehouse) {
105
-            $warehouse->count += (float)$count;
105
+            $warehouse->count += (float) $count;
106 106
             $warehouse->save();
107 107
         } else {
108 108
             $warehouse = Offer\Warehouse::get([['item_offer_id', $this->id]]);
109 109
             if ($warehouse) {
110
-                $warehouse->count += (float)$count;
110
+                $warehouse->count += (float) $count;
111 111
                 $warehouse->save();
112 112
             }
113 113
         }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         \App::$cur->db->cols = 'COALESCE(sum(' . \Ecommerce\Warehouse\Block::colPrefix() . 'count) ,0) as `sum` ';
135 135
         \App::$cur->db->where(\Ecommerce\Warehouse\Block::colPrefix() . \Ecommerce\Item\Offer::index(), $this->id);
136 136
         if ($cart_id) {
137
-            \App::$cur->db->where(\Ecommerce\Warehouse\Block::colPrefix() . \Ecommerce\Cart::index(), (int)$cart_id, '!=');
137
+            \App::$cur->db->where(\Ecommerce\Warehouse\Block::colPrefix() . \Ecommerce\Cart::index(), (int) $cart_id, '!=');
138 138
         }
139 139
         $on = '
140 140
             ' . \Ecommerce\Cart::index() . ' = ' . \Ecommerce\Warehouse\Block::colPrefix() . \Ecommerce\Cart::index() . ' AND (
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 
147 147
 
148 148
         $blocked = \App::$cur->db->select(\Ecommerce\Warehouse\Block::table())->fetch();
149
-        return (float)$warehouse['sum'] - (float)$blocked['sum'];
149
+        return (float) $warehouse['sum'] - (float) $blocked['sum'];
150 150
     }
151 151
 
152 152
     public function beforeDelete() {
Please login to merge, or discard this patch.