Test Failed
Push — master ( 4a33d7...7d1fba )
by Alexey
06:34
created
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/Materials/appControllers/content/materialWithCategorys.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
     <div class="row">
3 3
         <div class="col-md-3">
4 4
           <?php
5
-          $category = $material->category;
6
-          $this->widget('Materials\categoryTree', ['category' => $category]);
7
-          ?>
5
+            $category = $material->category;
6
+            $this->widget('Materials\categoryTree', ['category' => $category]);
7
+            ?>
8 8
         </div>
9 9
         <div class="col-md-9">
10 10
             <div class="content">
Please login to merge, or discard this patch.
system/modules/Money/snippets/rewardType/currency.php 1 patch
Braces   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -16,34 +16,34 @@  discard block
 block discarded – undo
16 16
             'type' => 'decimal'
17 17
         ]
18 18
     ],
19
-    'viewer' => function ($level) {
19
+    'viewer' => function ($level) {
20 20
         $levelTypes = [
21 21
             'procent' => 'Процент',
22 22
             'amount' => 'Сумма',
23 23
         ];
24 24
         return $levelTypes[$level->params['type']->value] . ': ' . $level->params['amount']->value . ' ' . ($level->params['type']->value == 'procent' ? '%' : ($level->params['currency_id']->value ? \Money\Currency::get($level->params['currency_id']->value)->acronym() : ''));
25 25
     },
26
-    'rewarder' => function ($reward, $sums, $user, $rootUser, $level, $rewardGet) {
26
+    'rewarder' => function ($reward, $sums, $user, $rootUser, $level, $rewardGet) {
27 27
         $wallets = \App::$cur->money->getUserWallets($user->id);
28 28
         $amount = 0;
29
-        if (!empty($wallets[$level->params['currency_id']->value])) {
30
-            switch ($level->params['type']->value) {
29
+        if (!empty($wallets[$level->params['currency_id']->value])) {
30
+            switch ($level->params['type']->value) {
31 31
                 case 'procent':
32 32
                     $finalSum = 0;
33
-                    foreach ($sums as $currency_id => $sum) {
34
-                        if ($currency_id != $level->params['currency_id']->value) {
33
+                    foreach ($sums as $currency_id => $sum) {
34
+                        if ($currency_id != $level->params['currency_id']->value) {
35 35
                             $rate = \Money\Currency\ExchangeRate::get([
36 36
                                 ['currency_id', $currency_id],
37 37
                                 ['target_currency_id', $level->params['currency_id']->value],
38 38
                             ]);
39
-                            if ($rate) {
39
+                            if ($rate) {
40 40
                                 $finalSum += $sum * $rate->rate;
41 41
                             }
42
-                        } else {
42
+                        } else {
43 43
                             $finalSum += $sum;
44 44
                         }
45 45
                     }
46
-                    switch ($reward->round_type) {
46
+                    switch ($reward->round_type) {
47 47
                         case 'round':
48 48
                             $finalSum = round($finalSum, $reward->round_precision);
49 49
                             $amount = $finalSum / 100 * (float)$level->params['amount']->value;
@@ -59,33 +59,33 @@  discard block
 block discarded – undo
59 59
                 case 'amount':
60 60
                     $amount = (float)$level->params['amount']->value;
61 61
             }
62
-            if (!$amount) {
62
+            if (!$amount) {
63 63
                 return 0;
64 64
             }
65 65
 
66 66
             $text = 'Вознаграждение по программе "' . $reward->name . '"';
67
-            if ($rootUser->id != $user->id) {
67
+            if ($rootUser->id != $user->id) {
68 68
                 $text .= ' от ' . $rootUser->name();
69 69
             }
70 70
 
71
-            if (!$rewardGet && $reward->block) {
71
+            if (!$rewardGet && $reward->block) {
72 72
                 $block = new \Money\Wallet\Block();
73 73
                 $block->wallet_id = $wallets[$level->params['currency_id']->value]->id;
74 74
                 $block->amount = $amount;
75 75
                 $block->comment = $text;
76 76
                 $block->data = 'reward:' . $reward->id;
77 77
                 $dateGenerators = \App::$cur->money->getSnippets('expiredDateGenerator');
78
-                if ($reward->block_date_expired && !empty($dateGenerators[$reward->block_date_expired])) {
78
+                if ($reward->block_date_expired && !empty($dateGenerators[$reward->block_date_expired])) {
79 79
                     $date = $dateGenerators[$reward->block_date_expired]($reward, $user);
80
-                    if (!empty($date['date'])) {
80
+                    if (!empty($date['date'])) {
81 81
                         $block->date_expired = $date['date'];
82 82
                     }
83
-                    if (!empty($date['type'])) {
83
+                    if (!empty($date['type'])) {
84 84
                         $block->expired_type = $date['type'];
85 85
                     }
86 86
                 }
87 87
                 $block->save();
88
-            } else {
88
+            } else {
89 89
                 $wallets[$level->params['currency_id']->value]->diff($amount, $text);
90 90
             }
91 91
             \App::$cur->users->AddUserActivity($user->id, 4, $text . '<br />' . $amount . ' ' . $wallets[$level->params['currency_id']->value]->currency->acronym());
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/program/admin/templates/default/config.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,6 +5,6 @@
 block discarded – undo
5 5
     'file' => 'index.html',
6 6
     'css' => ['style.css'],
7 7
     'libs' => [
8
-       'JqueryUi',  'PaperTheme','FancyBox'
8
+        'JqueryUi',  'PaperTheme','FancyBox'
9 9
     ]
10 10
 ];
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/items/showOptions.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -31,25 +31,25 @@
 block discarded – undo
31 31
             <span class="caption">Вид:</span>
32 32
             <span class="group">
33 33
               <?php
34
-              for ($i = 2; $i < 5; $i++) {
35
-                  $curLimit = $limit * $i;
36
-                  $curQuery = http_build_query(array_merge($query, ['limit' => $curLimit]));
37
-                  echo " <a href='{$path}?{$curQuery}'>";
38
-                  echo!empty($_GET['limit']) && $_GET['limit'] == $curLimit ? '<b>' : '';
39
-                  echo $curLimit;
40
-                  echo!empty($_GET['limit']) && $_GET['limit'] == $curLimit ? '</b>' : '';
41
-                  echo "</a> ";
42
-              }
43
-              if (!empty(App::$cur->ecommerce->config['list_all'])) {
44
-                  $curLimit = 'all';
45
-                  $curQuery = http_build_query(array_merge($query, ['limit' => $curLimit]));
46
-                  echo " <a href='{$path}?{$curQuery}'>";
47
-                  echo!empty($_GET['limit']) && $_GET['limit'] == $curLimit ? '<b>' : '';
48
-                  echo 'Все';
49
-                  echo!empty($_GET['limit']) && $_GET['limit'] == $curLimit ? '</b>' : '';
50
-                  echo "</a> ";
51
-              }
52
-              ?>
34
+                for ($i = 2; $i < 5; $i++) {
35
+                    $curLimit = $limit * $i;
36
+                    $curQuery = http_build_query(array_merge($query, ['limit' => $curLimit]));
37
+                    echo " <a href='{$path}?{$curQuery}'>";
38
+                    echo!empty($_GET['limit']) && $_GET['limit'] == $curLimit ? '<b>' : '';
39
+                    echo $curLimit;
40
+                    echo!empty($_GET['limit']) && $_GET['limit'] == $curLimit ? '</b>' : '';
41
+                    echo "</a> ";
42
+                }
43
+                if (!empty(App::$cur->ecommerce->config['list_all'])) {
44
+                    $curLimit = 'all';
45
+                    $curQuery = http_build_query(array_merge($query, ['limit' => $curLimit]));
46
+                    echo " <a href='{$path}?{$curQuery}'>";
47
+                    echo!empty($_GET['limit']) && $_GET['limit'] == $curLimit ? '<b>' : '';
48
+                    echo 'Все';
49
+                    echo!empty($_GET['limit']) && $_GET['limit'] == $curLimit ? '</b>' : '';
50
+                    echo "</a> ";
51
+                }
52
+                ?>
53 53
             </span>
54 54
             <span class="group">
55 55
                 <a href ='#' onclick="inji.onLoad(function () {
Please login to merge, or discard this patch.
system/modules/Ui/widgets/Slider.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@  discard block
 block discarded – undo
5 5
   <?php if (empty($noIndicators)) { ?>
6 6
         <ol class="carousel-indicators">
7 7
           <?php
8
-          $i = 0;
9
-          for ($i = 0; $i < count($slides); $i++) {
10
-              ?>
8
+            $i = 0;
9
+            for ($i = 0; $i < count($slides); $i++) {
10
+                ?>
11 11
                 <li data-target="#<?= $id; ?>" data-slide-to="<?= $i; ?>" <?= !$i ? 'class="active"' : ''; ?>></li>
12 12
                 <?php
13 13
             }
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
     <!-- Wrapper for slides -->
19 19
     <div class="carousel-inner" role="listbox">
20 20
       <?php
21
-      $i = 0;
22
-      foreach ($slides as $item) {
23
-          ?>
21
+        $i = 0;
22
+        foreach ($slides as $item) {
23
+            ?>
24 24
             <div class="item <?= !$i ? 'active' : ''; ?>">
25 25
               <?= !empty($item['href']) ? "<a href = '{$item['href']}' style = 'display:inline-block;'>" : ''; ?>
26 26
                 <img src="<?= $item['image']; ?>" <?= !empty($item['image']) ? 'alt="' . $item['name'] . '"' : ''; ?> />
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/items/item-icon.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <div class="item">		
2 2
   <?php
3
-  if ($item->badge && $item->badge->image) {
4
-      echo "<img class = 'item-icon-badge' src = '{$item->badge->image->path}' />";
5
-  }
6
-  ?>
3
+    if ($item->badge && $item->badge->image) {
4
+        echo "<img class = 'item-icon-badge' src = '{$item->badge->image->path}' />";
5
+    }
6
+    ?>
7 7
     <h4 class="item-name">
8 8
         <a href="/ecommerce/view/<?= $item->id; ?>">
9 9
           <?= $item->name(); ?>
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
@@ -12,20 +12,22 @@
 block discarded – undo
12 12
 
13 13
     public static function genArray($data, $level = 0) {
14 14
         $return = '';
15
-        if ($level == 0)
16
-            $return = "[";
15
+        if ($level == 0) {
16
+                    $return = "[";
17
+        }
17 18
         foreach ($data as $key => $item) {
18 19
             $return .= "\n" . str_repeat(' ', ($level * 4 + 4)) . "'{$key}' => ";
19
-            if (!is_array($item))
20
-                $return .= "'{$item}',";
21
-            else {
20
+            if (!is_array($item)) {
21
+                            $return .= "'{$item}',";
22
+            } else {
22 23
                 $return .= "[";
23 24
                 $return .= rtrim(self::genArray($item, $level + 1), ',');
24 25
                 $return .= "\n" . str_repeat(' ', ($level * 4 + 4)) . "],";
25 26
             }
26 27
         }
27
-        if ($level == 0)
28
-            $return = rtrim($return, ',') . "\n];";
28
+        if ($level == 0) {
29
+                    $return = rtrim($return, ',') . "\n];";
30
+        }
29 31
 
30 32
         return $return;
31 33
     }
Please login to merge, or discard this patch.