Passed
Push — master ( 1e23cf...788215 )
by Alexey
04:36
created
system/Inji/Msg.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,9 @@
 block discarded – undo
52 52
      */
53 53
     static function get($clean = false)
54 54
     {
55
-        if (empty($_SESSION['_INJI_MSG']))
56
-            return [];
55
+        if (empty($_SESSION['_INJI_MSG'])) {
56
+                    return [];
57
+        }
57 58
         $msgs = $_SESSION['_INJI_MSG'];
58 59
         if ($clean) {
59 60
             $_SESSION['_INJI_MSG'] = [];
Please login to merge, or discard this patch.
system/objects/CodeGenerator.php 1 patch
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,20 +13,22 @@
 block discarded – undo
13 13
     static function genArray($data, $level = 0)
14 14
     {
15 15
         $return = '';
16
-        if ($level == 0)
17
-            $return = "[";
16
+        if ($level == 0) {
17
+                    $return = "[";
18
+        }
18 19
         foreach ($data as $key => $item) {
19 20
             $return .= "\n" . str_repeat(' ', ( $level * 4 + 4)) . "'{$key}' => ";
20
-            if (!is_array($item))
21
-                $return .= "'{$item}',";
22
-            else {
21
+            if (!is_array($item)) {
22
+                            $return .= "'{$item}',";
23
+            } else {
23 24
                 $return .= "[";
24 25
                 $return .= rtrim(self::genArray($item, $level + 1), ',');
25 26
                 $return .= "\n" . str_repeat(' ', ( $level * 4 + 4)) . "],";
26 27
             }
27 28
         }
28
-        if ($level == 0)
29
-            $return = rtrim($return, ',') . "\n];";
29
+        if ($level == 0) {
30
+                    $return = rtrim($return, ',') . "\n];";
31
+        }
30 32
 
31 33
         return $return;
32 34
     }
Please login to merge, or discard this patch.
system/modules/Users/Users.php 1 patch
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -189,17 +189,20 @@
 block discarded – undo
189 189
 
190 190
     public function get($idn = false, $ltype = 'id')
191 191
     {
192
-        if (!$idn)
193
-            return false;
192
+        if (!$idn) {
193
+                    return false;
194
+        }
194 195
 
195
-        if (is_numeric($idn) && $ltype != 'login')
196
-            $user = Users\User::get($idn, 'id');
197
-        elseif ($ltype == 'login')
198
-            $user = Users\User::get($idn, 'login');
199
-        else
200
-            $user = Users\User::get($idn, 'mail');
201
-        if (!$user)
202
-            return [];
196
+        if (is_numeric($idn) && $ltype != 'login') {
197
+                    $user = Users\User::get($idn, 'id');
198
+        } elseif ($ltype == 'login') {
199
+                    $user = Users\User::get($idn, 'login');
200
+        } else {
201
+                    $user = Users\User::get($idn, 'mail');
202
+        }
203
+        if (!$user) {
204
+                    return [];
205
+        }
203 206
 
204 207
         return $user;
205 208
     }
Please login to merge, or discard this patch.
system/modules/Users/snippets/cabinetSection/usersTree.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (App::$cur->users->config['invites']) {
3
+if (App::$cur->users->config['invites']) {
4 4
     return [
5 5
         'name' => 'Мои партнеры',
6 6
         'fullWidget' => 'Users\cabinet/usersTree'
Please login to merge, or discard this patch.
system/modules/View/appAdminControllers/content/Template/chooseFile.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 <a href ='/admin/view/template/editFile/<?= $template->name; ?>?path=<?= $template->config['file']; ?>'>Основной файл темы</a>
3 3
 <hr/>
4 4
 <?php
5
-foreach ($template->config['css'] as $file) {
6
-    if (file_exists($template->path . '/css/' . $file)) {
5
+foreach ($template->config['css'] as $file) {
6
+    if (file_exists($template->path . '/css/' . $file)) {
7 7
         ?>
8 8
         <a href ='/admin/view/template/editFile/<?= $template->name; ?>?path=<?= 'css/' . $file; ?>'><?= $file; ?></a>
9 9
         <?php
Please login to merge, or discard this patch.
system/modules/Money/widgets/cabinet/walletsWidget.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 <?php
3 3
 $blocked = App::$cur->money->getUserBlocks();
4 4
 $wallets = App::$cur->money->getUserWallets();
5
-foreach ($wallets as $wallet) {
5
+foreach ($wallets as $wallet) {
6 6
     ?>
7 7
     <b><?= $wallet->showAmount(); ?></b> <?= $wallet->currency->acronym(); ?><br />
8 8
     <?php
Please login to merge, or discard this patch.
system/modules/UserForms/widgets/userForm.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!empty($params[0])) {
2
+if (!empty($params[0])) {
3 3
     $form_id = $params[0];
4 4
 }
5
-if (empty($form_id)) {
5
+if (empty($form_id)) {
6 6
     echo('form not found');
7 7
     return;
8 8
 }
9 9
 $userForm = \UserForms\Form::get((int) $form_id);
10
-if (!$userForm) {
10
+if (!$userForm) {
11 11
     echo('form not found');
12 12
     return;
13 13
 }
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
 $form->begin();
16 16
 ?>
17 17
 <?php
18
-if ($userForm->description) {
18
+if ($userForm->description) {
19 19
     echo "<p class = 'text-center'>{$userForm->description}</p>";
20 20
 }
21
-foreach ($userForm->inputs(['order' => ['weight']]) as $input) {
21
+foreach ($userForm->inputs(['order' => ['weight']]) as $input) {
22 22
     $form->input($input->type, 'UserForms[' . (int) $form_id . '][input' . $input->id . ']', $input->label, ['required' => $input->required]);
23 23
 }
24 24
 ?>
Please login to merge, or discard this patch.
system/modules/Money/widgets/cabinet/walletHistory.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2,17 +2,17 @@  discard block
 block discarded – undo
2 2
 <?php
3 3
 $currency_id = !empty($_GET['currency_id']) ? (int) $_GET['currency_id'] : 0;
4 4
 $wallets = App::$cur->money->getUserWallets();
5
-if ($currency_id && empty($wallets[$currency_id])) {
5
+if ($currency_id && empty($wallets[$currency_id])) {
6 6
     Msg::add('У вас нет такого кошелька');
7 7
     Msg::show();
8 8
     return;
9 9
 }
10 10
 
11
-if ($currency_id) {
11
+if ($currency_id) {
12 12
     $ids = $wallets[$currency_id]->id;
13
-} else {
13
+} else {
14 14
     $ids = [];
15
-    foreach ($wallets as $wallet) {
15
+    foreach ($wallets as $wallet) {
16 16
         $ids[] = $wallet->id;
17 17
     }
18 18
     $ids = implode(',', $ids);
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             'start' => $pages->params['start'],
34 34
             'limit' => $pages->params['limit'],
35 35
         ]);
36
-foreach ($histories as $history) {
36
+foreach ($histories as $history) {
37 37
     $amount = $history->amount ? $history->amount : $history->new - $history->old;
38 38
     $table->addRow([
39 39
         $history->id,
Please login to merge, or discard this patch.
system/modules/Money/widgets/cabinet/walletBlocked.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2,17 +2,17 @@  discard block
 block discarded – undo
2 2
 <?php
3 3
 $currency_id = !empty($_GET['currency_id']) ? (int) $_GET['currency_id'] : 0;
4 4
 $wallets = App::$cur->money->getUserWallets();
5
-if ($currency_id && empty($wallets[$currency_id])) {
5
+if ($currency_id && empty($wallets[$currency_id])) {
6 6
     Msg::add('У вас нет такого кошелька');
7 7
     Msg::show();
8 8
     return;
9 9
 }
10 10
 
11
-if ($currency_id) {
11
+if ($currency_id) {
12 12
     $ids = $wallets[$currency_id]->id;
13
-} else {
13
+} else {
14 14
     $ids = [];
15
-    foreach ($wallets as $wallet) {
15
+    foreach ($wallets as $wallet) {
16 16
         $ids[] = $wallet->id;
17 17
     }
18 18
     $ids = implode(',', $ids);
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             'start' => $pages->params['start'],
34 34
             'limit' => $pages->params['limit'],
35 35
         ]);
36
-foreach ($histories as $history) {
36
+foreach ($histories as $history) {
37 37
     $amount = $history->amount ? $history->amount : $history->new - $history->old;
38 38
     $table->addRow([
39 39
         $history->id,
Please login to merge, or discard this patch.