Completed
Pull Request — master (#4)
by
unknown
05:09
created
system/modules/Users/appControllers/content/registration.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
             <div class="form-group">
11 11
               <label>Регистрация через соц.сети</label><br />
12 12
               <?php
13
-              foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) {
14
-                  echo "<a href = '/users/social/auth/{$social->code}'>{$social->name()}</a> ";
15
-              }
16
-              ?>
13
+                foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) {
14
+                    echo "<a href = '/users/social/auth/{$social->code}'>{$social->name()}</a> ";
15
+                }
16
+                ?>
17 17
             </div>
18 18
             <?php
19 19
         }
@@ -29,15 +29,15 @@  discard block
 block discarded – undo
29 29
               <?php $form->input('date', 'user_birthday', 'Дата рождения'); ?>
30 30
               <?php $form->input('text', 'user_city', 'Город'); ?>
31 31
               <?php
32
-              if (!empty(App::$cur->users->config['invites'])) {
33
-                  ?>
32
+                if (!empty(App::$cur->users->config['invites'])) {
33
+                    ?>
34 34
                   <div class ='form-group'>
35 35
                     <label><?= !empty(App::$cur->users->config['invitesName']) ? App::$cur->users->config['invitesName'] : 'Код приглашения'; ?></label>
36 36
                     <input type ='text' name ='invite_code' class ='form-control' value ="<?= (isset($_POST['invite_code']) ? $_POST['invite_code'] : ((!empty($_COOKIE['invite_code']) ? $_COOKIE['invite_code'] : ((!empty($_GET['invite_code']) ? $_GET['invite_code'] : ''))))); ?>" />
37 37
                   </div>   
38 38
                   <?php
39
-              }
40
-              ?>
39
+                }
40
+                ?>
41 41
             </div>
42 42
             <div class="col-sm-6">
43 43
               <div class ='form-group'>
Please login to merge, or discard this patch.
system/modules/Users/appControllers/content/cabinet.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -26,20 +26,20 @@
 block discarded – undo
26 26
         </div>
27 27
         <div class="col-sm-9">
28 28
           <?php
29
-          if (empty($activeSection) || empty($sections[$activeSection]['fullWidget'])) {
30
-              foreach ($sections as $section) {
31
-                  if (!empty($section['smallWidget'])) {
32
-                      $widgetName = is_array($section['smallWidget']) ? $section['smallWidget']['widget'] : $section['smallWidget'];
33
-                      $widgetSize = !empty($section['smallWidget']['size']) ? $section['smallWidget']['size'] : 1;
34
-                      ?>
29
+            if (empty($activeSection) || empty($sections[$activeSection]['fullWidget'])) {
30
+                foreach ($sections as $section) {
31
+                    if (!empty($section['smallWidget'])) {
32
+                        $widgetName = is_array($section['smallWidget']) ? $section['smallWidget']['widget'] : $section['smallWidget'];
33
+                        $widgetSize = !empty($section['smallWidget']['size']) ? $section['smallWidget']['size'] : 1;
34
+                        ?>
35 35
                       <div class="col-sm-<?= $widgetSize * 4; ?>" style="margin-bottom: 10px;"><?= $this->widget($widgetName); ?></div>
36 36
                       <?php
37
-                  }
38
-              }
39
-          } else {
40
-              $this->widget($sections[$activeSection]['fullWidget']);
41
-          }
42
-          ?>
37
+                    }
38
+                }
39
+            } else {
40
+                $this->widget($sections[$activeSection]['fullWidget']);
41
+            }
42
+            ?>
43 43
         </div>
44 44
       </div>
45 45
     </div>
Please login to merge, or discard this patch.
system/modules/Money/snippets/rewardType/currency.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
     } else {
89 89
         $wallets[$level->params['currency_id']->value]->diff($amount, $text);
90 90
     }
91
-    \App::$cur->users->AddUserActivity($user->id, 4, $text . '<br />' . $amount.' '.$wallets[$level->params['currency_id']->value]->currency->acronym());
91
+    \App::$cur->users->AddUserActivity($user->id, 4, $text . '<br />' . $amount . ' ' . $wallets[$level->params['currency_id']->value]->currency->acronym());
92 92
 }
93 93
 return $amount;
94 94
 }
Please login to merge, or discard this patch.
system/modules/Money/appControllers/content/confirmTransfer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
     <h2>Подтверждение перевода №<?= $transfer->id; ?></h2>
4 4
     <p>Перевод валюты <?= $transfer->currency->name(); ?> на сумму <?= $transfer->amount; ?> пользователю <?= $transfer->toUser->name(); ?></p>
5 5
     <?php
6
-    if($transfer->comment){
6
+    if ($transfer->comment) {
7 7
         echo "<p>Комментарий: {$transfer->comment}</p>";
8 8
     }
9 9
     ?>
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
@@ -10,12 +10,12 @@  discard block
 block discarded – undo
10 10
         <th></th>
11 11
       </tr>
12 12
       <?php
13
-      foreach ($merchants as $merchant) {
14
-          $allowCurrencies = $merchant->allowCurrencies($pay);
15
-          if (!$allowCurrencies) {
16
-              continue;
17
-          }
18
-          ?>
13
+        foreach ($merchants as $merchant) {
14
+            $allowCurrencies = $merchant->allowCurrencies($pay);
15
+            if (!$allowCurrencies) {
16
+                continue;
17
+            }
18
+            ?>
19 19
           <tr>
20 20
             <td>
21 21
               <img src="<?= Statics::file($merchant->image ? $merchant->image->path : '/static/system/images/no-image.png', '150x150'); ?>" class="img-responsive" />
@@ -23,23 +23,23 @@  discard block
 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
33
-              }
34
-              ?>
33
+                }
34
+                ?>
35 35
             </td>
36 36
             <td width="100%">
37 37
               <?= $merchant->previewImage ? '<img src="' . $merchant->previewImage->path . '" class="img-responsive" />' : ''; ?>
38 38
             </td>
39 39
           </tr>
40 40
           <?php
41
-      }
42
-      ?>
41
+        }
42
+        ?>
43 43
     </table>
44 44
   </div>
45 45
 </div>
46 46
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/items/icons.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@
 block discarded – undo
9 9
         </div>
10 10
         <?php
11 11
         ++$i;
12
-        if (!( $i % 3)) {
12
+        if (!($i % 3)) {
13 13
             echo '<div class="clearfix hidden-xs"></div>';
14 14
         }
15
-        if (!( $i % 2)) {
15
+        if (!($i % 2)) {
16 16
             echo '<div class="clearfix visible-xs"></div>';
17 17
         }
18 18
     }
Please login to merge, or discard this patch.
system/modules/Ecommerce/appControllers/content/Cart/index.php 2 patches
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@
 block discarded – undo
3 3
     <div class="cart-order_page">
4 4
       <h2>Быстрое оформление заказа</h2>
5 5
       <?php
6
-      if (!$cart || !$cart->cartItems)
7
-          echo "<h1>Ваша корзина пуста</h1>";
8
-      else {
6
+      if (!$cart || !$cart->cartItems) {
7
+                echo "<h1>Ваша корзина пуста</h1>";
8
+      } else {
9 9
           $sums = [];
10 10
           $cartDelivery = $cart->delivery;
11 11
           $deliveryPrice = 0;
Please login to merge, or discard this patch.
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -3,13 +3,13 @@  discard block
 block discarded – undo
3 3
     <div class="cart-order_page">
4 4
       <h2>Быстрое оформление заказа</h2>
5 5
       <?php
6
-      if (!$cart || !$cart->cartItems)
7
-          echo "<h1>Ваша корзина пуста</h1>";
8
-      else {
9
-          $form = new Ui\Form;
10
-          $form->action = "/ecommerce/cart";
11
-          $form->begin();
12
-          ?>
6
+        if (!$cart || !$cart->cartItems)
7
+            echo "<h1>Ваша корзина пуста</h1>";
8
+        else {
9
+            $form = new Ui\Form;
10
+            $form->action = "/ecommerce/cart";
11
+            $form->begin();
12
+            ?>
13 13
           <div class="row">
14 14
             <div class="col-sm-4">
15 15
               <div class="order_page-info">
@@ -86,14 +86,14 @@  discard block
 block discarded – undo
86 86
                     </thead>
87 87
                     <tbody>
88 88
                       <?php
89
-                      if (class_exists('Money\Currency')) {
90
-                          $defaultCurrency = Money\Currency::get(\App::$cur->ecommerce->config['defaultCurrency']);
91
-                      } else {
92
-                          $defaultCurrency = '';
93
-                      }
94
-                      foreach ($cart->cartItems as $cartItem) {
95
-                          $path = $cartItem->item->image ? $cartItem->item->image->path : '/static/system/images/no-image.png';
96
-                          ?>
89
+                        if (class_exists('Money\Currency')) {
90
+                            $defaultCurrency = Money\Currency::get(\App::$cur->ecommerce->config['defaultCurrency']);
91
+                        } else {
92
+                            $defaultCurrency = '';
93
+                        }
94
+                        foreach ($cart->cartItems as $cartItem) {
95
+                            $path = $cartItem->item->image ? $cartItem->item->image->path : '/static/system/images/no-image.png';
96
+                            ?>
97 97
                           <tr class="cart_item_id<?= $cartItem->id; ?> item" data-cart_item_id = '<?php echo $cartItem->id; ?>' data-priceam = '<?php echo $cartItem->price->price; ?>' data-item_offer_price_id = '<?php echo $cartItem->price->id; ?>'>
98 98
                             <td class="text-center image">                            
99 99
                               <a href="/ecommerce/view/<?php echo $cartItem->item->id; ?>">
@@ -119,41 +119,41 @@  discard block
 block discarded – undo
119 119
                             </td>
120 120
                           </tr>
121 121
                           <?php
122
-                      }
123
-                      ?>
122
+                        }
123
+                        ?>
124 124
                     </tbody>
125 125
                     <tfoot>
126 126
                       <?php
127
-                      $colspan = $cart->hasDiscount() ? 5 : 4;
128
-                      ?>
127
+                        $colspan = $cart->hasDiscount() ? 5 : 4;
128
+                        ?>
129 129
                       <tr class="order_page-sum">
130 130
                         <td colspan="<?= $colspan; ?>" class="text-right">Сумма:</td>
131 131
                         <td colspan="2" class="text-right"><?= $cart->itemsSum(); ?></td>
132 132
                       </tr>
133 133
                       <?php
134
-                      if ($cart->hasDiscount()) {
135
-                          ?>
134
+                        if ($cart->hasDiscount()) {
135
+                            ?>
136 136
                           <tr class="order_page-discountSum">
137 137
                             <td colspan="<?= $colspan; ?>" class="text-right">Скидка:</td>
138 138
                             <td colspan="2" class="text-right"><?= $cart->discountSum(); ?></td>
139 139
                           </tr>
140 140
                           <?php
141
-                      }
142
-                      if ($cart->delivery) {
143
-                          ?>
141
+                        }
142
+                        if ($cart->delivery) {
143
+                            ?>
144 144
                           <tr class="order_page-deliverySum">
145 145
                             <td colspan="<?= $colspan; ?>" class="text-right"><?= $cart->delivery->name; ?>:</td>
146 146
                             <td colspan="2" class="text-right"><?php
147
-                              if ($cart->delivery && $cart->delivery->price_text) {
148
-                                  echo $cart->delivery->price_text;
149
-                              } else {
150
-                                  echo $cart->deliverySum();
151
-                              }
152
-                              ?></td>
147
+                                if ($cart->delivery && $cart->delivery->price_text) {
148
+                                    echo $cart->delivery->price_text;
149
+                                } else {
150
+                                    echo $cart->deliverySum();
151
+                                }
152
+                                ?></td>
153 153
                           </tr>
154 154
                           <?php
155
-                      }
156
-                      ?>
155
+                        }
156
+                        ?>
157 157
                       <tr class="order_page-total">
158 158
                         <td colspan="<?= $colspan; ?>" class="text-right">Итого:</td>
159 159
                         <td colspan="2" class="text-right"><?= $cart->finalSum(); ?></td>
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
                 <div class="clearfix"></div>
166 166
                 <div class="order_page-finish">
167 167
                   <?php
168
-                  $form->input('textarea', 'comment', 'Вы можете добавить комментарий к своему заказу', ['value' => (!empty($_POST['comment'])) ? $_POST['comment'] : '']);
169
-                  ?>
168
+                    $form->input('textarea', 'comment', 'Вы можете добавить комментарий к своему заказу', ['value' => (!empty($_POST['comment'])) ? $_POST['comment'] : '']);
169
+                    ?>
170 170
                   <div class="order_page-orderBtn">
171 171
                     <button name ="action" value ="order" data-loading-text="Подождите.." class="btn btn-primary">Подтверждение заказа</button>
172 172
                   </div>
@@ -175,9 +175,9 @@  discard block
 block discarded – undo
175 175
             </div>
176 176
           </div>
177 177
           <?php
178
-          $form->end(false);
179
-      }
180
-      ?>
178
+            $form->end(false);
179
+        }
180
+        ?>
181 181
     </div>
182 182
   </div>
183 183
 </div>
184 184
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Materials/appControllers/content/category.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@  discard block
 block discarded – undo
2 2
   <div class="row">
3 3
     <div class="col-md-3">
4 4
       <?php
5
-      \Ui\Tree::ul($category->getRoot(), 0, function($category) {
6
-          echo "<a href='{$category->getHref()}'> {$category->name()}</a>";
7
-      });
8
-      ?>
5
+        \Ui\Tree::ul($category->getRoot(), 0, function($category) {
6
+            echo "<a href='{$category->getHref()}'> {$category->name()}</a>";
7
+        });
8
+        ?>
9 9
     </div>
10 10
     <div class="col-md-9">
11 11
       <div class="content">
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
             ?>
35 35
           </div>
36 36
           <?php
37
-          $pages->draw();
38
-          ?>
37
+            $pages->draw();
38
+            ?>
39 39
         </div>
40 40
       </div>
41 41
     </div>
Please login to merge, or discard this patch.
system/modules/Materials/appControllers/content/materialWithCategorys.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@
 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
       <div class="content">
Please login to merge, or discard this patch.