Completed
Push — master ( c52a8b...f81666 )
by Alexey
06:18
created
system/modules/Materials/appControllers/content/materialWithCategorys.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@  discard block
 block discarded – undo
2 2
   <div class="row">
3 3
     <div class="col-md-3">
4 4
       <?php
5
-      $category = $material->category;
6
-      \Ui\Tree::ul($category->getRoot(), 0, function($category) {
7
-          echo "<a href='{$category->getHref()}'> {$category->name()}</a>";
8
-      });
9
-      ?>
5
+        $category = $material->category;
6
+        \Ui\Tree::ul($category->getRoot(), 0, function($category) {
7
+            echo "<a href='{$category->getHref()}'> {$category->name()}</a>";
8
+        });
9
+        ?>
10 10
     </div>
11 11
     <div class="col-md-9">
12 12
       <h2 class="material-name"><?= $material->name; ?></h2>
@@ -14,19 +14,19 @@  discard block
 block discarded – undo
14 14
         <?= Ui\FastEdit::block($material, 'text', null, true); ?>
15 15
       </div>
16 16
       <?php
17
-      if ($material->links) {
18
-          echo '<ul class = "material-links">';
19
-          foreach ($material->links as $materialLink) {
20
-              $href = $materialLink->linkedMaterial->alias;
21
-              if ($href == '') {
22
-                  $href = '/';
23
-              }
24
-              $name = $materialLink->name ? $materialLink->name : $materialLink->linkedMaterial->name;
25
-              echo "<li><a href = '{$href}'>{$name}</a></li>";
26
-          }
27
-          echo '</ul>';
28
-      }
29
-      ?>
17
+        if ($material->links) {
18
+            echo '<ul class = "material-links">';
19
+            foreach ($material->links as $materialLink) {
20
+                $href = $materialLink->linkedMaterial->alias;
21
+                if ($href == '') {
22
+                    $href = '/';
23
+                }
24
+                $name = $materialLink->name ? $materialLink->name : $materialLink->linkedMaterial->name;
25
+                echo "<li><a href = '{$href}'>{$name}</a></li>";
26
+            }
27
+            echo '</ul>';
28
+        }
29
+        ?>
30 30
     </div>
31 31
   </div>
32 32
 </div>
33 33
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Materials/models/Material.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
         if ($treePath) {
132 132
             $categorys = Category::getList(['where' => ['id', implode(',', $treePath), 'IN']]);
133 133
             foreach ($categorys as $category) {
134
-                $href .="/{$category->alias}";
134
+                $href .= "/{$category->alias}";
135 135
             }
136 136
         }
137 137
         return $href . "/" . ($this->alias ? $this->alias : $this->pk());
Please login to merge, or discard this patch.
system/modules/Menu/widgets/menu.php 1 patch
Braces   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,16 +7,18 @@
 block discarded – undo
7 7
     $code = 'main';
8 8
 }
9 9
 $menu = \Menu\Menu::get($code, 'code');
10
-if ($menu)
10
+if ($menu) {
11 11
     foreach ($menu->items(['order' => ['weight', 'ASC']]) as $item) {
12 12
         $href = $item->href;
13
+}
13 14
         if ($item->type == 'materialCategory') {
14 15
             $category = \Materials\Category::get($item->aditional);
15 16
             $href = $category->alias ? "/materials/{$category->alias}" : "/materials/category/{$category->id}";
16 17
         }
17
-        if (urldecode($_SERVER['REQUEST_URI']) == $href)
18
-            $active = ' class = "active" ';
19
-        else
20
-            $active = '';
18
+        if (urldecode($_SERVER['REQUEST_URI']) == $href) {
19
+                    $active = ' class = "active" ';
20
+        } else {
21
+                    $active = '';
22
+        }
21 23
         echo "<li {$active}><a href = '{$href}'>{$item->name}</a></li>";
22 24
     }
Please login to merge, or discard this patch.
system/modules/Migrations/appAdminControllers/content/Map/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     if (empty($objectsCols[$param->object_id])) {
50 50
         $modelName = $param->object->model;
51 51
         foreach (array_keys($modelName::$cols) as $colName) {
52
-            $objectsCols[$param->object_id][$colName] = !empty($modelName::$labels[$colName])?$modelName::$labels[$colName]:$colName;
52
+            $objectsCols[$param->object_id][$colName] = !empty($modelName::$labels[$colName]) ? $modelName::$labels[$colName] : $colName;
53 53
         }
54 54
     }
55 55
     $modelName = $param->object->model;
Please login to merge, or discard this patch.
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/Money.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             if (empty($blocks[$block->wallet->currency_id])) {
103 103
                 $blocks[$block->wallet->currency_id] = $block->amount;
104 104
             } else {
105
-                $blocks[$block->wallet->currency_id]+= $block->amount;
105
+                $blocks[$block->wallet->currency_id] += $block->amount;
106 106
             }
107 107
         }
108 108
         return $blocks;
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
                 $recives = \Money\Reward\Recive::getList(['where' => [['user_id', $user->id], ['reward_id', $reward->id]]]);
185 185
                 $amount = 0;
186 186
                 foreach ($recives as $recive) {
187
-                    $amount+=$recive->amount;
187
+                    $amount += $recive->amount;
188 188
                 }
189 189
                 if ($amount >= $reward->peruser) {
190 190
                     continue;
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.