Test Failed
Push — master ( e3cf3e...2e584a )
by Alexey
04:58
created
system/modules/Ecommerce/models/Item/Option.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         'manager' => [
79 79
             'name' => 'Свойства товаров',
80 80
             'cols' => [
81
-                'name','item_option_group_id', 'code', 'type', 'item', 'view', 'searchable', 'user_id', 'date_create'
81
+                'name', 'item_option_group_id', 'code', 'type', 'item', 'view', 'searchable', 'user_id', 'date_create'
82 82
             ],
83 83
             'sortMode' => true
84 84
         ]
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
                 ['name', 'filter_name'],
90 90
                 ['code', 'type', 'image_file_id'],
91 91
                 ['default_val', 'postfix'],
92
-                ['view', 'searchable','item_option_group_id'],
92
+                ['view', 'searchable', 'item_option_group_id'],
93 93
                 ['item']
94 94
             ]
95 95
         ]
Please login to merge, or discard this patch.
system/modules/Ecommerce/appControllers/EcommerceController.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     public function submitReviewAction() {
14 14
         $result = new \Server\Result();
15 15
         if (!empty($_POST['review']['item_id']) && !empty($_POST['review']['name']) && !empty($_POST['review']['text'])) {
16
-            $item = Ecommerce\Item::get((int)$_POST['review']['item_id']);
16
+            $item = Ecommerce\Item::get((int) $_POST['review']['item_id']);
17 17
             if (!$item) {
18 18
                 $result->success = false;
19 19
                 $result->content = ['errorText' => 'Товар не найден'];
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
                 'item_id' => $item->id,
24 24
                 'user_id' => \Users\User::$cur->id,
25 25
                 'name' => htmlspecialchars($_POST['review']['name']),
26
-                'rating' => (int)$_POST['review']['rating'],
26
+                'rating' => (int) $_POST['review']['rating'],
27 27
                 'text' => htmlspecialchars($_POST['review']['text']),
28 28
                 'mail' => !empty($_POST['review']['email']) ? htmlspecialchars($_POST['review']['email']) : '',
29 29
                 'file_id' => !empty($_FILES['review']['tmp_name']['file']) ? App::$cur->files->upload([
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $user = Users\User::$cur;
48 48
         if (!empty($_POST) && !empty($_POST['card_id'])) {
49 49
             $error = false;
50
-            $card = \Ecommerce\Card::get((int)$_POST['card_id']);
50
+            $card = \Ecommerce\Card::get((int) $_POST['card_id']);
51 51
             if (!$card) {
52 52
                 $error = true;
53 53
                 Msg::add('Такой карты не существует', 'danger');
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         //search
134 134
         if (!empty($_GET['search'])) {
135 135
             if (!empty($_GET['inCatalog'])) {
136
-                $category_id = (int)$_GET['inCatalog'];
136
+                $category_id = (int) $_GET['inCatalog'];
137 137
             }
138 138
             $search = $_GET['search'];
139 139
         } else {
@@ -158,10 +158,10 @@  discard block
 block discarded – undo
158 158
         if ($category_id) {
159 159
 
160 160
             if (is_numeric($category_id)) {
161
-                $category = $categoryClass::get((int)$category_id);
161
+                $category = $categoryClass::get((int) $category_id);
162 162
             }
163 163
             if (!$category) {
164
-                $category = $categoryClass::get((int)$category_id, 'alias');
164
+                $category = $categoryClass::get((int) $category_id, 'alias');
165 165
             }
166 166
             if ($category) {
167 167
                 $category_id = $category->id;
@@ -236,11 +236,11 @@  discard block
 block discarded – undo
236 236
                 $opts = array_merge($opts, array_keys($cat->options(['key' => 'item_option_id'])));
237 237
             }
238 238
             $opts = array_unique($opts);
239
-            if($opts) {
239
+            if ($opts) {
240 240
                 $options = \Ecommerce\Item\Option::getList(['where' => [['item_option_searchable', 1], ['id', $opts, 'IN']], 'order' => ['weight', 'asc']]);
241 241
             }
242 242
             else {
243
-                $options=[];
243
+                $options = [];
244 244
             }
245 245
         } elseif (empty(App::$cur->ecommerce->config['filtersInLast'])) {
246 246
             $options = \Ecommerce\Item\Option::getList(['where' => ['item_option_searchable', 1], 'order' => ['weight', 'asc']]);
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
     }
304 304
 
305 305
     public function viewAction($id = '', $quick = 0) {
306
-        $item = \Ecommerce\Item::get((int)$id);
306
+        $item = \Ecommerce\Item::get((int) $id);
307 307
         if (!$item) {
308 308
             Tools::redirect('/ecommerce/', 'Такой товар не найден');
309 309
         }
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 
352 352
     public function toggleFavAction($itemId) {
353 353
         $result = new Server\Result();
354
-        $item = \Ecommerce\Item::get((int)$itemId);
354
+        $item = \Ecommerce\Item::get((int) $itemId);
355 355
         if (!$item) {
356 356
             $result->success = false;
357 357
             $result->content = 'Товар не найден';
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -238,8 +238,7 @@
 block discarded – undo
238 238
             $opts = array_unique($opts);
239 239
             if($opts) {
240 240
                 $options = \Ecommerce\Item\Option::getList(['where' => [['item_option_searchable', 1], ['id', $opts, 'IN']], 'order' => ['weight', 'asc']]);
241
-            }
242
-            else {
241
+            } else {
243 242
                 $options=[];
244 243
             }
245 244
         } elseif (empty(App::$cur->ecommerce->config['filtersInLast'])) {
Please login to merge, or discard this patch.
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.