Completed
Push — master ( 4b8bb5...60b638 )
by Alexey
04:19
created
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/View/appAdminControllers/content/index.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,12 +11,13 @@
 block discarded – undo
11 11
     '',
12 12
     ''
13 13
 ]);
14
-if (!empty($templates['app']['installed']))
14
+if (!empty($templates['app']['installed'])) {
15 15
     foreach ($templates['app']['installed'] as $template => $name) {
16 16
         $table->addRow([
17 17
             $name,
18 18
             (empty($templates['app']['current']) || $templates['app']['current'] != $template) ? '<a href = "/admin/view/setDefault/' . $template . '">Установить по умолчанию</a>' : 'Тема по умолчанию',
19 19
             '<a href = "/admin/view/template/editFile/' . $template . '">Файлы</a> <a href = "/admin/view/editTemplate/' . $template . '">Редактировать</a>'
20 20
         ]);
21
+}
21 22
     }
22 23
 $table->draw();
Please login to merge, or discard this patch.
system/modules/Money/snippets/userActivity/lastPurchase.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
 
3 3
 return [
4 4
     'name' => 'Последняя покупка не позднее 90 дней',
5
-    'checker' => function($user) {
5
+    'checker' => function($user) {
6 6
         $query = 'SELECT * FROM inji_ecommerce_cart iec WHERE iec.cart_cart_status_id >= 5 AND iec.cart_date_create >= NOW() - INTERVAL 90 DAY AND cart_user_id = ?';
7 7
         $result = \App::$cur->db->query(['query' => $query, 'params' => [$user->id]]);
8 8
         return (bool) $result ? $result->fetch() : false;
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/Money/widgets/cabinet/wallets.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <h3>Мои кошельки</h3>
2 2
 <div class="row">
3 3
   <?php
4
-  $blocked = App::$cur->money->getUserBlocks();
5
-  $wallets = App::$cur->money->getUserWallets();
6
-  $rates = Money\Currency\ExchangeRate::getList();
7
-  foreach ($wallets as $wallet) {
8
-      ?>
4
+    $blocked = App::$cur->money->getUserBlocks();
5
+    $wallets = App::$cur->money->getUserWallets();
6
+    $rates = Money\Currency\ExchangeRate::getList();
7
+    foreach ($wallets as $wallet) {
8
+        ?>
9 9
         <div class="col-sm-4">
10 10
             <h4><?= $wallet->currency->name(); ?></h4>
11 11
             <b><?= $wallet->showAmount(); ?></b> <?= $wallet->currency->acronym(); ?><br />
Please login to merge, or discard this patch.
system/modules/Money/widgets/cabinet/rewards.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
             <h3>Уровни начислений</h3>
13 13
             <ul>
14 14
               <?php
15
-              foreach ($reward->levels(['order' => ['level', 'asc']]) as $level) {
16
-                  ?>
15
+                foreach ($reward->levels(['order' => ['level', 'asc']]) as $level) {
16
+                    ?>
17 17
 
18 18
                     <li><?= !$level->level ? 'Личный' : $level->level; ?>. <?= $types[$level->type]['viewer']($level); ?></li>
19 19
                     <?php
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
                 <h4 class="<?= $complete ? 'text-success' : 'text-danger'; ?>"><?= $condition->name(); ?></h4>
35 35
                 <ul>
36 36
                   <?php
37
-                  foreach ($condition->items as $item) {
38
-                      $itemComplete = $item->checkComplete();
39
-                      switch ($item->type) {
40
-                          case 'event':
37
+                    foreach ($condition->items as $item) {
38
+                        $itemComplete = $item->checkComplete();
39
+                        switch ($item->type) {
40
+                            case 'event':
41 41
                               $name = \Events\Event::get($item->value, 'event')->name();
42
-                              break;
43
-                      }
44
-                      ?>
42
+                                break;
43
+                        }
44
+                        ?>
45 45
                         <li> 
46 46
                             <b class="<?= $itemComplete ? 'text-success' : 'text-danger'; ?>"><?= $name; ?> <?= $item->recivedCount(); ?></b>/<?= $item->count; ?> <br />
47 47
                         </li>
Please login to merge, or discard this patch.
system/modules/Money/models/Wallet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         'manager' => [
43 43
             'cols' => ['user:id', 'user_id', 'currency_id', 'amount'],
44 44
             'sortable' => ['user:id', 'user_id', 'currency_id', 'amount'],
45
-            'filters' => [ 'currency_id'],
45
+            'filters' => ['currency_id'],
46 46
         ]
47 47
     ];
48 48
 
Please login to merge, or discard this patch.
system/modules/Money/appControllers/MerchantsController.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,14 +28,14 @@
 block discarded – undo
28 28
     public function reciverAction($system = '', $status = '') {
29 29
         $postData = [];
30 30
         foreach ($_POST as $key => $text) {
31
-            if (!is_array($text) && !mb_detect_encoding($text, array('UTF-8'), TRUE)) {
31
+            if (!is_array($text) && !mb_detect_encoding($text, array('UTF-8'), true)) {
32 32
                 $postData[$key] = iconv('Windows-1251', 'UTF-8', $text);
33 33
             } else {
34 34
                 $postData[$key] = $text;
35 35
             }
36 36
         }
37 37
         foreach ($_GET as $key => $text) {
38
-            if (!is_array($text) && !mb_detect_encoding($text, array('UTF-8'), TRUE)) {
38
+            if (!is_array($text) && !mb_detect_encoding($text, array('UTF-8'), true)) {
39 39
                 $postData[$key] = iconv('Windows-1251', 'UTF-8', $text);
40 40
             } else {
41 41
                 $postData[$key] = $text;
Please login to merge, or discard this patch.
system/modules/Money/appControllers/content/pay.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
                     </td>
24 24
                     <td>
25 25
                       <?php
26
-                      foreach ($allowCurrencies as $allowCurrency) {
27
-                          $className = 'Money\MerchantHelper\\' . $merchant->object_name;
28
-                          $sum = $className::getFinalSum($pay, $allowCurrency);
29
-                          ?>
26
+                        foreach ($allowCurrencies as $allowCurrency) {
27
+                            $className = 'Money\MerchantHelper\\' . $merchant->object_name;
28
+                            $sum = $className::getFinalSum($pay, $allowCurrency);
29
+                            ?>
30 30
                             <b><?= $allowCurrency['currency']->name(); ?></b>
31 31
                             <a class="btn btn-primary" href ="/money/merchants/go/<?= $pay->id; ?>/<?= $merchant->id; ?>/<?= $allowCurrency['currency']->id; ?>">Оплатить <?= $sum; ?> <?= $allowCurrency['currency']->acronym(); ?></a>
32 32
                             <?php
Please login to merge, or discard this patch.