Test Failed
Push — master ( 476483...1aeff4 )
by Alexey
05:07
created
system/modules/Materials/appControllers/MaterialsController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
         $path = trim(implode('/', $args));
18 18
 
19 19
         if (is_numeric($path)) {
20
-            $material = Materials\Material::get([['id', (int)$path], ['date_publish', null, 'IS NOT']]);
20
+            $material = Materials\Material::get([['id', (int) $path], ['date_publish', null, 'IS NOT']]);
21 21
         }
22 22
         if (!$material && $args) {
23 23
             foreach ($args as $key => $alias) {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
                 if ($category) {
43 43
                     $where = [
44 44
                         ['category_id', $category->id],
45
-                        ['id', (int)$args[count($args) - 1]],
45
+                        ['id', (int) $args[count($args) - 1]],
46 46
                         ['date_publish', null, 'IS NOT']
47 47
                     ];
48 48
                 } else {
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         $path = trim(implode('/', $args));
76 76
         $category = null;
77 77
         if (is_numeric($path)) {
78
-            $category = Materials\Category::get((int)$path);
78
+            $category = Materials\Category::get((int) $path);
79 79
         }
80 80
         if (!$category) {
81 81
             foreach ($args as $alias) {
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         $material = false;
111 111
         if ($alias) {
112 112
             if (is_numeric($alias)) {
113
-                $material = Materials\Material::get([['id', (int)$alias], ['date_publish', null, 'IS NOT']]);
113
+                $material = Materials\Material::get([['id', (int) $alias], ['date_publish', null, 'IS NOT']]);
114 114
             }
115 115
             if (!$material) {
116 116
                 $material = Materials\Material::get([['alias', $alias], ['date_publish', null, 'IS NOT']]);
Please login to merge, or discard this patch.
system/modules/Money/appControllers/MerchantsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,8 +71,8 @@
 block discarded – undo
71 71
                 $where[] = ['data', $_GET['data']];
72 72
             }
73 73
             $pays = Money\Pay::getList(['where' => $where, 'order' => ['date_create', 'DESC']]);
74
-            if(count($pays)===1){
75
-                Tools::redirect('/money/merchants/pay/'.current($pays)->id);
74
+            if (count($pays) === 1) {
75
+                Tools::redirect('/money/merchants/pay/' . current($pays)->id);
76 76
             }
77 77
             $this->view->page(['content' => 'pays', 'data' => compact('bread', 'pays')]);
78 78
         } else {
Please login to merge, or discard this patch.
system/modules/Chats/models/Chat.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@
 block discarded – undo
16 16
     public static $cols = [
17 17
         'name' => ['type' => 'text'],
18 18
         'code' => ['type' => 'text'],
19
-        'message' => ['type' => 'dataManager','relation'=>'messages'],
19
+        'message' => ['type' => 'dataManager', 'relation'=>'messages'],
20 20
     ];
21 21
     public static $dataManagers = [
22 22
         'manager' => [
23
-            'cols' => ['name', 'code','message']
23
+            'cols' => ['name', 'code', 'message']
24 24
         ]
25 25
     ];
26 26
     public static $forms = [
Please login to merge, or discard this patch.
system/modules/Ui/widgets/Form/autocomplete.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
 <div class="form-search-results"></div>
39 39
 <script>
40
-  window.autocomplete<?=$id;?> = function (element, snippet, snippetParams) {
40
+  window.autocomplete<?=$id; ?> = function (element, snippet, snippetParams) {
41 41
     element.element.onkeyup = function () {
42 42
       var inputContainer = element.element.parentNode;
43 43
       var selectedDiv = inputContainer.querySelector('.form-search-cur');
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
   };
91 91
   inji.onLoad(function () {
92 92
     setTimeout(function () {
93
-      new window.autocomplete<?=$id;?>(inji.get('#<?=$id;?>'), '<?=$options['snippet'];?>', <?=json_encode($options['snippetParams']);?>);
93
+      new window.autocomplete<?=$id; ?>(inji.get('#<?=$id; ?>'), '<?=$options['snippet']; ?>', <?=json_encode($options['snippetParams']); ?>);
94 94
     },100);
95 95
   });
96 96
 </script>
Please login to merge, or discard this patch.
system/modules/Sliders/widgets/slider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 if (!empty($alias)) {
9 9
     $slider = Sliders\Slider::get($alias, 'alias');
10 10
 }
11
-if(empty($slider)){
11
+if (empty($slider)) {
12 12
     echo 'Slider not found';
13 13
     return;
14 14
 }
Please login to merge, or discard this patch.
system/modules/Ui/widgets/Form/select.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
     $primaryValue = isset($options['value']) ? $options['value'] : null;
10 10
     $primaryValue = is_array($primaryValue) && isset($primaryValue['primary']) ? $primaryValue['primary'] : $primaryValue;
11 11
     if (is_numeric($key) && !is_array($primaryValue) && $primaryValue !== '') {
12
-        $primaryValue = (int)$primaryValue;
12
+        $primaryValue = (int) $primaryValue;
13 13
     }
14 14
     if (
15 15
         (!is_array($primaryValue) && ($key === $primaryValue || (isset($form->userDataTree[$name]) && $form->userDataTree[$name] === $key))) ||
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.
system/modules/Ui/objects/DataManager.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         ob_end_clean();
197 197
 
198 198
         $cols = [];
199
-        if($actions) {
199
+        if ($actions) {
200 200
             $cols[] = ['label' => $dropdown];
201 201
         }
202 202
         $cols['id'] = ['label' => '№', 'sortable' => true];
@@ -244,10 +244,10 @@  discard block
 block discarded – undo
244 244
         $queryParams = [];
245 245
         if (empty($params['all'])) {
246 246
             if (!empty($params['limit'])) {
247
-                $this->limit = (int)$params['limit'];
247
+                $this->limit = (int) $params['limit'];
248 248
             }
249 249
             if (!empty($params['page'])) {
250
-                $this->page = (int)$params['page'];
250
+                $this->page = (int) $params['page'];
251 251
             }
252 252
             $queryParams['limit'] = $this->limit;
253 253
             $queryParams['start'] = $this->page * $this->limit - $this->limit;
@@ -557,10 +557,10 @@  discard block
 block discarded – undo
557 557
             return [];
558 558
         }
559 559
         if (!empty($params['limit'])) {
560
-            $this->limit = (int)$params['limit'];
560
+            $this->limit = (int) $params['limit'];
561 561
         }
562 562
         if (!empty($params['page'])) {
563
-            $this->page = (int)$params['page'];
563
+            $this->page = (int) $params['page'];
564 564
         }
565 565
         $queryParams = [
566 566
             'count' => true
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.