Completed
Push — master ( 4b8bb5...60b638 )
by Alexey
04:19
created
system/modules/Ecommerce/appControllers/content/Cart/index.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -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; ?>">
@@ -124,8 +124,8 @@  discard block
 block discarded – undo
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>
@@ -144,12 +144,12 @@  discard block
 block discarded – undo
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 155
                                         }
@@ -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>
Please login to merge, or discard this patch.
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
                 $form = new Ui\Form;
10 10
                 $form->action = "/ecommerce/cart";
11 11
                 $form->begin();
Please login to merge, or discard this patch.
system/modules/Ecommerce/appControllers/content/buyCard.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <div class="ecommerce">
2 2
     <div class="cart-order_page">
3 3
       <?php
4
-      $form = new Ui\Form;
5
-      $form->action = "/ecommerce/buyCard";
6
-      $form->begin();
7
-      ?>
4
+        $form = new Ui\Form;
5
+        $form->action = "/ecommerce/buyCard";
6
+        $form->begin();
7
+        ?>
8 8
         <div class="row">
9 9
             <div class="col-sm-4">
10 10
                 <div class="order_page-info">
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
                             </thead>
35 35
                             <tbody class="cartitems">
36 36
                               <?php
37
-                              $first = true;
38
-                              foreach (\Ecommerce\Card::getList() as $card) {
39
-                                  $checked = $first;
40
-                                  $first = false;
41
-                                  ?>
37
+                                $first = true;
38
+                                foreach (\Ecommerce\Card::getList() as $card) {
39
+                                    $checked = $first;
40
+                                    $first = false;
41
+                                    ?>
42 42
                                     <tr>
43 43
                                         <td>
44 44
                                             <input id ="cardId" type="radio" name ="card_id" value ="<?= $card->id; ?>" <?= $checked ? 'checked' : ''; ?> />
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
                                         <td>
51 51
                                             <ul>
52 52
                                               <?php
53
-                                              foreach ($card->levels as $level) {
54
-                                                  ?>
53
+                                                foreach ($card->levels as $level) {
54
+                                                    ?>
55 55
                                                     <li><?= $level->name; ?> - <?= $level->discount->name; ?></li>
56 56
                                                     <?php
57 57
                                                 }
Please login to merge, or discard this patch.
system/modules/Ecommerce/appControllers/content/view.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -17,20 +17,20 @@
 block discarded – undo
17 17
                         <h1><?= $item->name(); ?></h1>
18 18
                         <ul class="item-options">
19 19
                           <?php
20
-                          foreach ($item->options as $param) {
21
-                              if (!$param->item_option_view || !$param->value)
22
-                                  continue;
23
-                              if ($param->item_option_type == 'select') {
24
-                                  if (empty($param->option->items[$param->value]))
25
-                                      continue;
26
-                                  $value = $param->option->items[$param->value]->value;
27
-                              } else {
28
-                                  $value = $param->value;
29
-                              }
30
-                              $paramName = $param->item_option_name;
31
-                              echo "<li>{$paramName}: {$value} {$param->item_option_postfix}</li>";
32
-                          }
33
-                          ?>
20
+                            foreach ($item->options as $param) {
21
+                                if (!$param->item_option_view || !$param->value)
22
+                                    continue;
23
+                                if ($param->item_option_type == 'select') {
24
+                                    if (empty($param->option->items[$param->value]))
25
+                                        continue;
26
+                                    $value = $param->option->items[$param->value]->value;
27
+                                } else {
28
+                                    $value = $param->value;
29
+                                }
30
+                                $paramName = $param->item_option_name;
31
+                                echo "<li>{$paramName}: {$value} {$param->item_option_postfix}</li>";
32
+                            }
33
+                            ?>
34 34
                         </ul>
35 35
                         <div class="item-actions">
36 36
                             <div class="item-price">
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,11 +18,13 @@
 block discarded – undo
18 18
                         <ul class="item-options">
19 19
                           <?php
20 20
                           foreach ($item->options as $param) {
21
-                              if (!$param->item_option_view || !$param->value)
22
-                                  continue;
21
+                              if (!$param->item_option_view || !$param->value) {
22
+                                                                continue;
23
+                              }
23 24
                               if ($param->item_option_type == 'select') {
24
-                                  if (empty($param->option->items[$param->value]))
25
-                                      continue;
25
+                                  if (empty($param->option->items[$param->value])) {
26
+                                                                        continue;
27
+                                  }
26 28
                                   $value = $param->option->items[$param->value]->value;
27 29
                               } else {
28 30
                                   $value = $param->value;
Please login to merge, or discard this patch.
system/modules/Dashboard/appAdminControllers/content/siteConfig.php 1 patch
Braces   +24 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,27 +2,45 @@
 block discarded – undo
2 2
 <form action = '' method = 'POST' enctype="multipart/form-data">
3 3
     <div class ="form-group">
4 4
         <label>Название сайта</label>
5
-        <input class ="form-control" type = 'text' name = 'site_name' value = '<?php if (!empty(\App::$primary->config['site']['name'])) echo \App::$primary->config['site']['name']; ?>' />
5
+        <input class ="form-control" type = 'text' name = 'site_name' value = '<?php if (!empty(\App::$primary->config['site']['name'])) {
6
+    echo \App::$primary->config['site']['name'];
7
+}
8
+?>' />
6 9
     </div>
7 10
     <div class ="form-group">
8 11
         <label>Название компании</label>
9
-        <input class ="form-control" type = 'text' name = 'company_name' value = '<?php if (!empty(\App::$primary->config['site']['company_name'])) echo \App::$primary->config['site']['company_name']; ?>' />
12
+        <input class ="form-control" type = 'text' name = 'company_name' value = '<?php if (!empty(\App::$primary->config['site']['company_name'])) {
13
+    echo \App::$primary->config['site']['company_name'];
14
+}
15
+?>' />
10 16
     </div>
11 17
     <div class ="form-group">
12 18
         <label>Основной домен</label>
13
-        <input class ="form-control" type = 'text' name = 'site_domain' value = '<?php if (!empty(\App::$primary->config['site']['domain'])) echo \App::$primary->config['site']['domain']; ?>' />
19
+        <input class ="form-control" type = 'text' name = 'site_domain' value = '<?php if (!empty(\App::$primary->config['site']['domain'])) {
20
+    echo \App::$primary->config['site']['domain'];
21
+}
22
+?>' />
14 23
     </div>
15 24
     <div class ="form-group">
16 25
         <label>Контактный email</label>
17
-        <input class ="form-control" type = 'text' name = 'site_email' value = '<?php if (!empty(\App::$primary->config['site']['email'])) echo \App::$primary->config['site']['email']; ?>' />
26
+        <input class ="form-control" type = 'text' name = 'site_email' value = '<?php if (!empty(\App::$primary->config['site']['email'])) {
27
+    echo \App::$primary->config['site']['email'];
28
+}
29
+?>' />
18 30
     </div>
19 31
     <div class ="form-group">
20 32
         <label>Ключевые слова</label>
21
-        <input class ="form-control" type = 'text' name = 'site_keywords' value = '<?php if (!empty(\App::$primary->config['site']['keywords'])) echo \App::$primary->config['site']['keywords']; ?>' />
33
+        <input class ="form-control" type = 'text' name = 'site_keywords' value = '<?php if (!empty(\App::$primary->config['site']['keywords'])) {
34
+    echo \App::$primary->config['site']['keywords'];
35
+}
36
+?>' />
22 37
     </div>
23 38
     <div class ="form-group">
24 39
         <label>Краткое описание сайта</label>
25
-        <input class ="form-control" type = 'text' name = 'site_description' value = '<?php if (!empty(\App::$primary->config['site']['description'])) echo \App::$primary->config['site']['description']; ?>' />
40
+        <input class ="form-control" type = 'text' name = 'site_description' value = '<?php if (!empty(\App::$primary->config['site']['description'])) {
41
+    echo \App::$primary->config['site']['description'];
42
+}
43
+?>' />
26 44
     </div>
27 45
     <?php
28 46
     $form = new Ui\Form();
Please login to merge, or discard this patch.
system/modules/Dashboard/appAdminControllers/content/index.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -2,15 +2,15 @@
 block discarded – undo
2 2
     <h4 class ='dashboard-widgets-welcome'>Добро Пожаловать в панель управления<?= class_exists('\Users\User') ? ', ' . \Users\User::$cur->name() : ''; ?></h4>
3 3
     <div class = "row">
4 4
       <?php
5
-      $rowSum = 0;
6
-      foreach ($sections as $section) {
7
-          if (empty($section['widget'])) {
8
-              continue;
9
-          }
5
+        $rowSum = 0;
6
+        foreach ($sections as $section) {
7
+            if (empty($section['widget'])) {
8
+                continue;
9
+            }
10 10
 
11
-          $widgetSize = !empty($section['size']) ? $section['size'] : 1;
12
-          $rowSum+=$widgetSize;
13
-          ?>
11
+            $widgetSize = !empty($section['size']) ? $section['size'] : 1;
12
+            $rowSum+=$widgetSize;
13
+            ?>
14 14
             <div class="col-sm-<?= $widgetSize * 4; ?>" style="margin-bottom: 10px;"><?= $section['widget'](); ?></div>
15 15
             <?php
16 16
             if ($rowSum >= 3) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
           }
10 10
 
11 11
           $widgetSize = !empty($section['size']) ? $section['size'] : 1;
12
-          $rowSum+=$widgetSize;
12
+          $rowSum += $widgetSize;
13 13
           ?>
14 14
             <div class="col-sm-<?= $widgetSize * 4; ?>" style="margin-bottom: 10px;"><?= $section['widget'](); ?></div>
15 15
             <?php
Please login to merge, or discard this patch.
system/modules/Sitemap/Sitemap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         $root->setAttribute("xmlns", "http://www.sitemaps.org/schemas/sitemap/0.9");
38 38
         $root = $xml->appendChild($root);
39 39
 
40
-        $addToXml = function ($xml, $parent, $nodeName, $text) {
40
+        $addToXml = function($xml, $parent, $nodeName, $text) {
41 41
             $node = $parent->appendChild($xml->createElement($nodeName));
42 42
             $node->appendChild($xml->createTextNode($text));
43 43
             return $node;
Please login to merge, or discard this patch.
system/modules/Modules/appAdminControllers/content/install.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <h1>Установка модулей</h1>
2 2
 <form>
3 3
   <?php
4
-  $config = Config::app(App::$primary ? App::$primary : App::$cur);
5
-  $modules = array_flip(Module::getInstalled(App::$cur));
6
-  $systemModules = array_slice(scandir(INJI_SYSTEM_DIR . '/modules'), 2);
7
-  foreach ($systemModules as $module) {
8
-      $info = Module::getInfo($module);
9
-      if (!$info || isset($modules[$module]))
10
-          continue;
11
-      ?>
4
+    $config = Config::app(App::$primary ? App::$primary : App::$cur);
5
+    $modules = array_flip(Module::getInstalled(App::$cur));
6
+    $systemModules = array_slice(scandir(INJI_SYSTEM_DIR . '/modules'), 2);
7
+    foreach ($systemModules as $module) {
8
+        $info = Module::getInfo($module);
9
+        if (!$info || isset($modules[$module]))
10
+            continue;
11
+        ?>
12 12
         <div class ="form-group">
13 13
             <div class="checkbox">
14 14
                 <label>
Please login to merge, or discard this 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/Migrations/objects/Reader.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@
 block discarded – undo
13 13
 
14 14
 class Reader extends \Object {
15 15
 
16
-    public $data = NULL;
16
+    public $data = null;
17 17
     public $source = '';
18 18
 
19 19
     public function loadData($source = '') {
20 20
         $this->source = $source;
21
-        return FALSE;
21
+        return false;
22 22
     }
23 23
 
24 24
     public function readPath($path = '/') {
Please login to merge, or discard this patch.
system/modules/Exchange1c/objects/Mode/Init.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
             $query->table = \Exchange1c\Exchange\File::table();
26 26
             $query->cols = \Exchange1c\Exchange\File::colPrefix() . 'id';
27 27
             $queryArr = $query->buildQuery();
28
-            $queryArr['query'].=' where `' . \Exchange1c\Exchange\File::colPrefix() . 'deleted` = 0 AND  `' . \Exchange1c\Exchange\File::colPrefix() . 'date_create` < NOW() - INTERVAL ' . \App::$cur->exchange1c->config['maxSaveFilesInterval'];
28
+            $queryArr['query'] .= ' where `' . \Exchange1c\Exchange\File::colPrefix() . 'deleted` = 0 AND  `' . \Exchange1c\Exchange\File::colPrefix() . 'date_create` < NOW() - INTERVAL ' . \App::$cur->exchange1c->config['maxSaveFilesInterval'];
29 29
             try {
30 30
                 $ids = array_keys($query->query($queryArr)->getArray(\Exchange1c\Exchange\File::colPrefix() . 'id'));
31 31
             } catch (\PDOException $exc) {
Please login to merge, or discard this patch.