Completed
Push — master ( 8e922e...3329c8 )
by Alexey
05:08
created
system/modules/Modules/appAdminControllers/content/install.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
     $systemModules = array_slice(scandir(INJI_SYSTEM_DIR . '/modules'), 2);
7 7
     foreach ($systemModules as $module) {
8 8
         $info = Module::getInfo($module);
9
-        if (!$info || isset($modules[$module]))
10
-            continue;
9
+        if (!$info || isset($modules[$module])) {
10
+                    continue;
11
+        }
11 12
         ?>
12 13
         <div class ="form-group">
13 14
             <div class="checkbox">
Please login to merge, or discard this patch.
system/modules/Money/appControllers/content/pay.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,12 +8,12 @@  discard block
 block discarded – undo
8 8
     <th></th>
9 9
   </tr>
10 10
   <?php
11
-  foreach ($merchants as $merchant) {
12
-      $allowCurrencies = $merchant->allowCurrencies($pay);
13
-      if (!$allowCurrencies) {
14
-          continue;
15
-      }
16
-      ?>
11
+    foreach ($merchants as $merchant) {
12
+        $allowCurrencies = $merchant->allowCurrencies($pay);
13
+        if (!$allowCurrencies) {
14
+            continue;
15
+        }
16
+        ?>
17 17
       <tr>
18 18
         <td>
19 19
           <img src="<?= Statics::file($merchant->image ? $merchant->image->path : '/static/system/images/no-image.png', '150x150'); ?>" class="img-responsive" />
@@ -21,21 +21,21 @@  discard block
 block discarded – undo
21 21
         </td>
22 22
         <td>
23 23
           <?php
24
-          foreach ($allowCurrencies as $allowCurrency) {
25
-              $className = 'Money\MerchantHelper\\' . $merchant->object_name;
26
-              $sum = $className::getFinalSum($pay, $allowCurrency);
27
-              ?>
24
+            foreach ($allowCurrencies as $allowCurrency) {
25
+                $className = 'Money\MerchantHelper\\' . $merchant->object_name;
26
+                $sum = $className::getFinalSum($pay, $allowCurrency);
27
+                ?>
28 28
               <b><?= $allowCurrency['currency']->name(); ?></b>
29 29
               <a class="btn btn-primary" href ="/money/merchants/go/<?= $pay->id; ?>/<?= $merchant->id; ?>/<?= $allowCurrency['currency']->id; ?>">Оплатить <?= $sum; ?> <?= $allowCurrency['currency']->acronym(); ?></a>
30 30
               <?php
31
-          }
32
-          ?>
31
+            }
32
+            ?>
33 33
         </td>
34 34
         <td width="100%">
35 35
           <?= $merchant->previewImage ? '<img src="' . $merchant->previewImage->path . '" class="img-responsive" />' : ''; ?>
36 36
         </td>
37 37
       </tr>
38 38
       <?php
39
-  }
40
-  ?>
39
+    }
40
+    ?>
41 41
 </table>
42 42
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Money/objects/MerchantHelper/Robokassa.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,9 @@
 block discarded – undo
25 25
 
26 26
         $result['payId'] = $data["InvId"];
27 27
 
28
-        if (strtolower($data['SignatureValue']) == $hashGenerated)
29
-            $result['status'] = 'success';
28
+        if (strtolower($data['SignatureValue']) == $hashGenerated) {
29
+                    $result['status'] = 'success';
30
+        }
30 31
 
31 32
         return $result;
32 33
     }
Please login to merge, or discard this patch.
system/modules/Money/objects/MerchantHelper/WalletOne.php 1 patch
Braces   +18 added lines, -12 removed lines patch added patch discarded remove patch
@@ -28,20 +28,24 @@  discard block
 block discarded – undo
28 28
 
29 29
         // Проверка наличия необходимых параметров в POST-запросе
30 30
 
31
-        if (!isset($data["WMI_SIGNATURE"]))
32
-            $result['callback'] = print_answer("Retry", "Отсутствует параметр WMI_SIGNATURE");
31
+        if (!isset($data["WMI_SIGNATURE"])) {
32
+                    $result['callback'] = print_answer("Retry", "Отсутствует параметр WMI_SIGNATURE");
33
+        }
33 34
 
34
-        if (!isset($data["WMI_PAYMENT_NO"]))
35
-            $result['callback'] = print_answer("Retry", "Отсутствует параметр WMI_PAYMENT_NO");
35
+        if (!isset($data["WMI_PAYMENT_NO"])) {
36
+                    $result['callback'] = print_answer("Retry", "Отсутствует параметр WMI_PAYMENT_NO");
37
+        }
36 38
 
37
-        if (!isset($data["WMI_ORDER_STATE"]))
38
-            $result['callback'] = print_answer("Retry", "Отсутствует параметр WMI_ORDER_STATE");
39
+        if (!isset($data["WMI_ORDER_STATE"])) {
40
+                    $result['callback'] = print_answer("Retry", "Отсутствует параметр WMI_ORDER_STATE");
41
+        }
39 42
 
40 43
         // Извлечение всех параметров POST-запроса, кроме WMI_SIGNATURE
41 44
         $params = [];
42 45
         foreach ($data as $name => $value) {
43
-            if ($name !== "WMI_SIGNATURE")
44
-                $params[$name] = $value;
46
+            if ($name !== "WMI_SIGNATURE") {
47
+                            $params[$name] = $value;
48
+            }
45 49
         }
46 50
 
47 51
         // Сортировка массива по именам ключей в порядке возрастания
@@ -86,8 +90,9 @@  discard block
 block discarded – undo
86 90
         $config = static::getConfig();
87 91
         $merchantCurrency = static::getMerchantCurrency($currency);
88 92
         
89
-        if (!$description)
90
-            $description = "Оплата заказа на сайте " . idn_to_utf8(INJI_DOMAIN_NAME);
93
+        if (!$description) {
94
+                    $description = "Оплата заказа на сайте " . idn_to_utf8(INJI_DOMAIN_NAME);
95
+        }
91 96
 
92 97
         //Секретный ключ интернет-магазина
93 98
         $key = $config['secret'];
@@ -117,11 +122,12 @@  discard block
 block discarded – undo
117 122
         $fieldValues = "";
118 123
 
119 124
         foreach ($fields as $value) {
120
-            if (is_array($value))
121
-                foreach ($value as $v) {
125
+            if (is_array($value)) {
126
+                            foreach ($value as $v) {
122 127
                     //Конвертация из текущей кодировки (UTF-8)
123 128
                     //необходима только если кодировка магазина отлична от Windows-1251
124 129
                     $v = iconv("utf-8", "windows-1251", $v);
130
+            }
125 131
                     $fieldValues .= $v;
126 132
                 } else {
127 133
                 //Конвертация из текущей кодировки (UTF-8)
Please login to merge, or discard this patch.
system/modules/Money/snippets/expiredDateGenerator/dayStart.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 return function($reward, $user) {
4 4
     return [
5
-        'date' => date('Y-m-d H:i:s',mktime(0, 0, 0, date('n'), date("j") + 1, date("Y"))),
5
+        'date' => date('Y-m-d H:i:s', mktime(0, 0, 0, date('n'), date("j") + 1, date("Y"))),
6 6
         'type' => 'burn'
7 7
     ];
8 8
 };
Please login to merge, or discard this patch.
system/modules/Money/widgets/cabinet/rewards.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -12,13 +12,13 @@  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
20
-          }
21
-          ?>
20
+            }
21
+            ?>
22 22
 
23 23
         </ul>
24 24
       </div>
@@ -34,20 +34,20 @@  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>
48 48
                   <?php
49
-              }
50
-              ?>
49
+                }
50
+                ?>
51 51
             </ul>
52 52
             <?php
53 53
         }
Please login to merge, or discard this patch.
system/modules/Money/widgets/cabinet/wallets.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 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 />
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
         ?>
31 31
       </div>
32 32
       <?php
33
-  }
34
-  ?>
33
+    }
34
+    ?>
35 35
 </div>
36 36
 <?php
37 37
 $transfers = Money\Transfer::getList(['where' => [
Please login to merge, or discard this patch.
system/modules/Sliders/widgets/slider.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -27,19 +27,19 @@
 block discarded – undo
27 27
         ?>
28 28
         <div class="item <?= !$i ? 'active' : ''; ?>">
29 29
           <?php
30
-          if ($item->link) {
31
-              echo "<a href = '{$item->link}' style = 'display:inline-block;'>";
32
-          }
33
-          ?>
30
+            if ($item->link) {
31
+                echo "<a href = '{$item->link}' style = 'display:inline-block;'>";
32
+            }
33
+            ?>
34 34
           <img src="<?= Statics::file($item->image->path); ?>" alt="<?= $item->name; ?>">
35 35
           <div class="carousel-caption">
36 36
             <?= $item->description; ?>
37 37
           </div>
38 38
           <?php
39
-          if ($item->link) {
40
-              echo "</a>";
41
-          }
42
-          ?>
39
+            if ($item->link) {
40
+                echo "</a>";
41
+            }
42
+            ?>
43 43
         </div>
44 44
         <?php
45 45
         $i++;
Please login to merge, or discard this patch.
system/modules/StaticLoader/StaticLoader.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $type = substr($path, 0, strpos($path, '/'));
53 53
         switch ($type) {
54 54
             case 'libs':
55
-                return App::$cur->Libs->getPath(array_slice(explode('/', $path),2));
55
+                return App::$cur->Libs->getPath(array_slice(explode('/', $path), 2));
56 56
                 break;
57 57
             case 'templates':
58 58
                 $path = substr($path, strpos($path, '/') + 1);
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 
189 189
             $fileName = $fileinfo['filename'] . '.' . $fileinfo['extension'];
190 190
             if (App::$cur->db->connect) {
191
-                $fileObj = Files\File::get([ 'path', '%/' . $fileinfo['filename'] . '.' . $fileinfo['extension'], 'LIKE']);
191
+                $fileObj = Files\File::get(['path', '%/' . $fileinfo['filename'] . '.' . $fileinfo['extension'], 'LIKE']);
192 192
                 if ($fileObj) {
193 193
                     $fileName = $fileObj->original_name;
194 194
                 }
Please login to merge, or discard this patch.
Braces   +14 added lines, -12 removed lines patch added patch discarded remove patch
@@ -112,10 +112,11 @@  discard block
 block discarded – undo
112 112
 
113 113
                 $sizes = explode('x', $_GET['resize']);
114 114
                 $sizes[0] = intval($sizes[0]);
115
-                if (isset($sizes[1]))
116
-                    $sizes[1] = intval($sizes[1]);
117
-                else
118
-                    $sizes[1] = 0;
115
+                if (isset($sizes[1])) {
116
+                                    $sizes[1] = intval($sizes[1]);
117
+                } else {
118
+                                    $sizes[1] = 0;
119
+                }
119 120
 
120 121
                 if (!$sizes[0] || !$sizes[1]) {
121 122
                     header('HTTP/1.1 404 Not Found');
@@ -127,15 +128,16 @@  discard block
 block discarded – undo
127 128
                     $dir = App::$primary->path;
128 129
 
129 130
                     if (!empty($_GET['resize_crop'])) {
130
-                        if (in_array($_GET['resize_crop'], array('q', 'c')))
131
-                            $crop = $_GET['resize_crop'];
132
-                        else
133
-                            $crop = 'c';
131
+                        if (in_array($_GET['resize_crop'], array('q', 'c'))) {
132
+                                                    $crop = $_GET['resize_crop'];
133
+                        } else {
134
+                                                    $crop = 'c';
135
+                        }
136
+                    } elseif (!empty($_GET['resize_quadro'])) {
137
+                                            $crop = 'q';
138
+                    } else {
139
+                                            $crop = '';
134 140
                     }
135
-                    elseif (!empty($_GET['resize_quadro']))
136
-                        $crop = 'q';
137
-                    else
138
-                        $crop = '';
139 141
                     $pos = 'center';
140 142
                     if (!empty($_GET['resize_pos']) && in_array($_GET['resize_pos'], array('top', 'center'))) {
141 143
                         $pos = $_GET['resize_pos'];
Please login to merge, or discard this patch.