Completed
Push — master ( 308a3c...ebb499 )
by Alexey
08:08
created
system/Inji/Msg.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,9 @@
 block discarded – undo
52 52
      */
53 53
     static function get($clean = false)
54 54
     {
55
-        if (empty($_SESSION['_INJI_MSG']))
56
-            return [];
55
+        if (empty($_SESSION['_INJI_MSG'])) {
56
+                    return [];
57
+        }
57 58
         $msgs = $_SESSION['_INJI_MSG'];
58 59
         if ($clean) {
59 60
             $_SESSION['_INJI_MSG'] = [];
Please login to merge, or discard this patch.
system/modules/Files/Files.php 1 patch
Braces   +21 added lines, -14 removed lines patch added patch discarded remove patch
@@ -22,16 +22,19 @@  discard block
 block discarded – undo
22 22
 
23 23
         $sitePath = App::$primary->path;
24 24
 
25
-        if (!is_uploaded_file($file['tmp_name']))
26
-            return 0;
25
+        if (!is_uploaded_file($file['tmp_name'])) {
26
+                    return 0;
27
+        }
27 28
 
28 29
         $fileinfo = pathinfo($file['name']);
29
-        if (empty($fileinfo['extension']))
30
-            return 0;
30
+        if (empty($fileinfo['extension'])) {
31
+                    return 0;
32
+        }
31 33
 
32 34
         $type = Files\Type::get($fileinfo['extension'], 'ext');
33
-        if (!$type)
34
-            return 0;
35
+        if (!$type) {
36
+                    return 0;
37
+        }
35 38
 
36 39
         if (!empty($options['accept_group']) && $options['accept_group'] != $type->group) {
37 40
             return 0;
@@ -47,8 +50,9 @@  discard block
 block discarded – undo
47 50
         }
48 51
         $fileObject->name = $fileinfo['filename'];
49 52
         $fileObject->path = $type->type_dir . date('Y-m-d') . '/' . microtime(true) . '.' . $fileinfo['extension'];
50
-        if ($fileObject->id && file_exists($sitePath . $fileObject->path))
51
-            unlink($sitePath . $fileObject->path);
53
+        if ($fileObject->id && file_exists($sitePath . $fileObject->path)) {
54
+                    unlink($sitePath . $fileObject->path);
55
+        }
52 56
 
53 57
         Tools::createDir($sitePath . $type->type_dir . date('Y-m-d') . '/');
54 58
 
@@ -84,12 +88,14 @@  discard block
 block discarded – undo
84 88
         $sitePath = App::$primary->path;
85 89
 
86 90
         $fileinfo = pathinfo($url);
87
-        if (empty($fileinfo['extension']))
88
-            return 0;
91
+        if (empty($fileinfo['extension'])) {
92
+                    return 0;
93
+        }
89 94
 
90 95
         $type = Files\Type::get($fileinfo['extension'], 'ext');
91
-        if (!$type)
92
-            return 0;
96
+        if (!$type) {
97
+                    return 0;
98
+        }
93 99
 
94 100
         if (!empty($options['accept_group']) && $options['accept_group'] != $type->group) {
95 101
             return 0;
@@ -105,8 +111,9 @@  discard block
 block discarded – undo
105 111
         }
106 112
         $fileObject->name = $fileinfo['filename'];
107 113
         $fileObject->path = $type->type_dir . date('Y-m-d') . '/' . microtime(true) . '.' . $fileinfo['extension'];
108
-        if ($fileObject->id && file_exists($sitePath . $fileObject->path))
109
-            unlink($sitePath . $fileObject->path);
114
+        if ($fileObject->id && file_exists($sitePath . $fileObject->path)) {
115
+                    unlink($sitePath . $fileObject->path);
116
+        }
110 117
 
111 118
         Tools::createDir($sitePath . $type->type_dir . date('Y-m-d') . '/');
112 119
 
Please login to merge, or discard this patch.
system/modules/Files/appAdminControllers/content/managerForEditor.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,8 @@
 block discarded – undo
24 24
                   <?php
25 25
                   if ($file->type->group == 'image') {
26 26
                       echo "<img class='img-responsive' src ='{$file->path}?resize=200x200' />";
27
-                  } else {
27
+                  }
28
+                  else {
28 29
                       echo "<img class='img-responsive' src ='/static/moduleAsset/Files/images/formats/" . pathinfo($file->path, PATHINFO_EXTENSION) . ".png' />";
29 30
                   }
30 31
                   ?>
Please login to merge, or discard this patch.
system/modules/Ecommerce/appAdminControllers/EcommerceController.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,8 @@
 block discarded – undo
68 68
         $items = Ecommerce\Item::getList(['start' => $i * $count, 'limit' => $count]);
69 69
         if (!$items) {
70 70
             Tools::redirect('/admin/ecommerce/configure', 'Поисковый индекс обновлен');
71
-        } else {
71
+        }
72
+        else {
72 73
             $i++;
73 74
             foreach ($items as $key => $item) {
74 75
                 $item->save();
Please login to merge, or discard this patch.
system/modules/Ecommerce/snippets/payTypeHandler/onlinePay.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,8 @@
 block discarded – undo
27 27
                         'callback_method' => 'cartPayRecive'
28 28
                     ]);
29 29
                     $pay->save();
30
-                } elseif ($pay->sum != $sum) {
30
+                }
31
+                elseif ($pay->sum != $sum) {
31 32
                     $pay->sum = $sum;
32 33
                     $pay->save();
33 34
                 }
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/categorys.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,8 @@
 block discarded – undo
7 7
     $tree->ul('\Ecommerce\Category', 0, function($categoryItem) use($category) {
8 8
         if ($category && $category->id == $categoryItem->id) {
9 9
             $class = 'active';
10
-        } else {
10
+        }
11
+        else {
11 12
             $class = '';
12 13
         }
13 14
         return [
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/admin/contacts.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,8 @@
 block discarded – undo
18 18
                         "relation": "infos"}
19 19
               )'><?= $count . ' ' . Tools::getNumEnding($count, ['Элемент', 'Элемента', 'Элементов']); ?></a>
20 20
     <?php
21
-} else {
21
+}
22
+else {
22 23
     foreach ($item->infos as $info) {
23 24
         echo $info->value . ' ';
24 25
     }
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/cart/history.php 1 patch
Braces   +16 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,7 +26,8 @@  discard block
 block discarded – undo
26 26
                   $currency_id = $cartItem->price && $cartItem->price->currency ? $cartItem->price->currency->id : (!empty(\App::$cur->ecommerce->config['defaultCurrency']) ? \App::$cur->ecommerce->config['defaultCurrency'] : 0);
27 27
                   if (empty($sums[$currency_id])) {
28 28
                       $sums[$currency_id] = $cartItem->final_price * $cartItem->count;
29
-                  } else {
29
+                  }
30
+                  else {
30 31
                       $sums[$currency_id] += $cartItem->final_price * $cartItem->count;
31 32
                   }
32 33
               }
@@ -34,7 +35,8 @@  discard block
 block discarded – undo
34 35
                   $currency_id = $cart->delivery->currency_id;
35 36
                   if (empty($sums[$currency_id])) {
36 37
                       $sums[$currency_id] = $cart->delivery->price;
37
-                  } else {
38
+                  }
39
+                  else {
38 40
                       $sums[$currency_id] += $cart->delivery->price;
39 41
                   }
40 42
               }
@@ -42,7 +44,8 @@  discard block
 block discarded – undo
42 44
                   $currency_id = $extra->currency ? $extra->currency->id : \App::$cur->ecommerce->config['defaultCurrency'];
43 45
                   if (empty($sums[$currency_id])) {
44 46
                       $sums[$currency_id] = $extra->price * $extra->count;
45
-                  } else {
47
+                  }
48
+                  else {
46 49
                       $sums[$currency_id] += $extra->price * $extra->count;
47 50
                   }
48 51
               }
@@ -62,10 +65,12 @@  discard block
 block discarded – undo
62 65
                                   $currency = Money\Currency::get($currency_id);
63 66
                                   if ($currency) {
64 67
                                       echo '&nbsp;' . $currency->acronym();
65
-                                  } else {
68
+                                  }
69
+                                  else {
66 70
                                       echo '&nbsp;р.';
67 71
                                   }
68
-                              } else {
72
+                              }
73
+                              else {
69 74
                                   echo '&nbsp;р.';
70 75
                               }
71 76
                               echo '<br />';
@@ -76,9 +81,11 @@  discard block
 block discarded – undo
76 81
                     <td><?php
77 82
                       if ($cart->payed) {
78 83
                           echo 'Оплачено';
79
-                      } elseif (!App::$cur->money) {
84
+                      }
85
+                      elseif (!App::$cur->money) {
80 86
                           echo 'Не оплачено';
81
-                      } else {
87
+                      }
88
+                      else {
82 89
                           $handlers = App::$cur->ecommerce->getSnippets('payTypeHandler');
83 90
                           $redirect = ['/ecommerce/cart/success'];
84 91
                           if ($cart->payType && !empty($handlers[$cart->payType->handler]['handler'])) {
@@ -86,7 +93,8 @@  discard block
 block discarded – undo
86 93
                           }
87 94
                           if (!empty($newRedirect[0])) {
88 95
                               echo '<a class="btn btn-warning btn-sm" href = "' . $newRedirect[0] . '">Оплатить</a>';
89
-                          } else {
96
+                          }
97
+                          else {
90 98
                               echo 'Не оплачено';
91 99
                           }
92 100
                       }
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/cart/payType.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,8 @@  discard block
 block discarded – undo
6 6
           foreach ($payTypes as $payType) {
7 7
               if ((!empty($_POST['payType']) && $_POST['payType'] == $payType->id) || ($cart->payType && $payType->id == $cart->payType->id)) {
8 8
                   $checked = 'checked';
9
-              } else {
9
+              }
10
+              else {
10 11
                   $checked = '';
11 12
               }
12 13
               echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $payType->id . '\';inji.Ecommerce.Cart.calcSum();return false;">';
@@ -27,7 +28,8 @@  discard block
 block discarded – undo
27 28
         if ($cart->payType) {
28 29
             echo "<h4>Информация об оплате</h4>";
29 30
             echo $cart->payType->info;
30
-        } else {
31
+        }
32
+        else {
31 33
             echo "<h4>Выберите способ оплаты</h4>";
32 34
         }
33 35
         ?> 
Please login to merge, or discard this patch.