Completed
Push — master ( 308a3c...ebb499 )
by Alexey
08:08
created
system/modules/Money/objects/MerchantHelper/Payeer.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,8 @@
 block discarded – undo
58 58
                 $result['callback'] = $_POST['m_orderid'] . '|success';
59 59
                 $result['payId'] = $data["m_orderid"];
60 60
                 $result['status'] = 'success';
61
-            } else {
61
+            }
62
+            else {
62 63
                 $result['callback'] = $_POST['m_orderid'] . '|error';
63 64
             }
64 65
         }
Please login to merge, or discard this patch.
system/modules/Money/objects/MerchantHelper/Primary.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,8 @@
 block discarded – undo
25 25
         $sum = parent::getFinalSum($pay, $method);
26 26
         if ($pay->data && $cart = \Ecommerce\Cart::get($pay->data)) {
27 27
             $extra = '0.' . (strlen((string) $cart->id) > 1 ? substr((string) $cart->id, -2) : $cart->id);
28
-        } else {
28
+        }
29
+        else {
29 30
             $extra = 0;
30 31
         }
31 32
         return $sum + $extra;
Please login to merge, or discard this patch.
system/modules/Money/objects/MerchantHelper/Robokassa.php 1 patch
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,8 +24,9 @@  discard block
 block discarded – undo
24 24
 
25 25
         $result['payId'] = $data["InvId"];
26 26
 
27
-        if (strtolower($data['SignatureValue']) == $hashGenerated)
28
-            $result['status'] = 'success';
27
+        if (strtolower($data['SignatureValue']) == $hashGenerated) {
28
+                    $result['status'] = 'success';
29
+        }
29 30
 
30 31
         return $result;
31 32
     }
@@ -43,7 +44,8 @@  discard block
 block discarded – undo
43 44
         ];
44 45
         if (empty($config['test'])) {
45 46
             \Tools::redirect('https://auth.robokassa.ru/Merchant/Index.aspx?' . http_build_query($data));
46
-        } else {
47
+        }
48
+        else {
47 49
             \Tools::redirect('http://test.robokassa.ru/Index.aspx?' . http_build_query($data));
48 50
         }
49 51
     }
Please login to merge, or discard this patch.
system/modules/Money/Money.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,8 @@  discard block
 block discarded – undo
49 49
     public function reciver($data, $system, $status, $mr) {
50 50
         if ($system) {
51 51
             $merchant = \Money\Merchant::get($system, 'object_name');
52
-        } else {
52
+        }
53
+        else {
53 54
             $merchant = false;
54 55
         }
55 56
         if ($merchant) {
@@ -96,7 +97,8 @@  discard block
 block discarded – undo
96 97
         foreach ($blocked as $block) {
97 98
             if (empty($blocks[$block->wallet->currency_id])) {
98 99
                 $blocks[$block->wallet->currency_id] = $block->amount;
99
-            } else {
100
+            }
101
+            else {
100 102
                 $blocks[$block->wallet->currency_id]+= $block->amount;
101 103
             }
102 104
         }
@@ -123,7 +125,8 @@  discard block
 block discarded – undo
123 125
                 $wallet->currency_id = $currency->id;
124 126
                 $wallet->save();
125 127
                 $result[$walletIdasKey ? $wallet->id : $currency->id] = $forSelect ? $wallet->name() : $wallet;
126
-            } else {
128
+            }
129
+            else {
127 130
                 $result[$walletIdasKey ? $wallets[$currency->id]->id : $currency->id] = $forSelect ? $wallets[$currency->id]->name() : $wallets[$currency->id];
128 131
             }
129 132
         }
Please login to merge, or discard this patch.
system/modules/Money/models/Reward.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,8 @@
 block discarded – undo
81 81
                 }
82 82
                 if ($complete) {
83 83
                     $usersCompleted[$block->wallet->user_id] = true;
84
-                } else {
84
+                }
85
+                else {
85 86
                     $usersCompleted[$block->wallet->user_id] = false;
86 87
                 }
87 88
             }
Please login to merge, or discard this patch.
system/modules/Money/models/Merchant.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,8 @@
 block discarded – undo
87 87
         foreach ($this->currencies as $merchantCurrency) {
88 88
             if ($merchantCurrency->currency_id == $pay->currency_id) {
89 89
                 $allowCurrencies[] = ['type' => 'primary', 'currency' => $merchantCurrency->currency];
90
-            } else {
90
+            }
91
+            else {
91 92
                 $transfer = Currency\ExchangeRate::get([['currency_id', $merchantCurrency->currency_id], ['target_currency_id', $pay->currency_id]]);
92 93
                 if ($transfer) {
93 94
                     $allowCurrencies[] = ['type' => 'transfer', 'currency' => $merchantCurrency->currency, 'transfer' => $transfer];
Please login to merge, or discard this patch.
system/modules/Money/appControllers/MoneyController.php 1 patch
Braces   +14 added lines, -7 removed lines patch added patch discarded remove patch
@@ -51,7 +51,8 @@  discard block
 block discarded – undo
51 51
         if (!empty($_POST['code'])) {
52 52
             if ($transfer->code != $_POST['code']) {
53 53
                 Msg::add('Код не совпадает', 'danger');
54
-            } else {
54
+            }
55
+            else {
55 56
                 $transfer->complete = 1;
56 57
                 $block = Money\Wallet\Block::get('Money\Transfer:' . $transfer->id, 'data');
57 58
                 $block->delete();
@@ -94,7 +95,8 @@  discard block
 block discarded – undo
94 95
             ]);
95 96
             $pay->save();
96 97
             Tools::redirect('/money/merchants/pay/' . $pay->id);
97
-        } else {
98
+        }
99
+        else {
98 100
             $currencies = Money\Currency::getList(['where' => ['refill', 1], 'forSelect' => true]);
99 101
             $this->view->setTitle('Пополнение счета');
100 102
             $this->view->page(['data' => compact('currencies')]);
@@ -114,17 +116,20 @@  discard block
 block discarded – undo
114 116
         $where = [];
115 117
         if ($currency) {
116 118
             $where[] = ['currency_id', $currency->id];
117
-        } else {
119
+        }
120
+        else {
118 121
             $where[] = ['currency_id', implode(',', array_keys($wallets)), 'IN'];
119 122
         }
120 123
         if ($targetCurrency) {
121 124
             $where[] = ['target_currency_id', $targetCurrency->id];
122
-        } else {
125
+        }
126
+        else {
123 127
             $where[] = ['target_currency_id', implode(',', array_keys($wallets)), 'IN'];
124 128
         }
125 129
         if ($where) {
126 130
             $rates = Money\Currency\ExchangeRate::getList(['where' => $where]);
127
-        } else {
131
+        }
132
+        else {
128 133
             $rates = [];
129 134
         }
130 135
         if (!empty($_GET['exchange']) && $currency && $targetCurrency && !empty($rates[$_GET['exchange']['rate_id']])) {
@@ -133,7 +138,8 @@  discard block
 block discarded – undo
133 138
             if (empty($_GET['exchange']['give']['amount']) || !(float) $_GET['exchange']['give']['amount']) {
134 139
                 Msg::add('Укажите сумму которую вы хотите отдать');
135 140
                 $error = true;
136
-            } else {
141
+            }
142
+            else {
137 143
                 $amount = (float) $_GET['exchange']['give']['amount'];
138 144
             }
139 145
             if (!empty($amount) && $amount > $wallets[$currency->id]->amount) {
@@ -165,7 +171,8 @@  discard block
 block discarded – undo
165 171
                 Tools::redirect('/money/merchants/pay/' . $pay->id, 'Нет возможности оплатить счет в валюте ' . $pay->currency->name() . ' валютой ' . $wallet->currency->name());
166 172
             }
167 173
             $sum = $pay->sum / $rate->rate;
168
-        } else {
174
+        }
175
+        else {
169 176
             $sum = $pay->sum;
170 177
         }
171 178
         if ($sum > $wallet->amount) {
Please login to merge, or discard this patch.
system/modules/Money/appControllers/MerchantsController.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,14 +30,16 @@  discard block
 block discarded – undo
30 30
         foreach ($_POST as $key => $text) {
31 31
             if (!is_array($text) && !mb_detect_encoding($text, array('UTF-8'), TRUE)) {
32 32
                 $postData[$key] = iconv('Windows-1251', 'UTF-8', $text);
33
-            } else {
33
+            }
34
+            else {
34 35
                 $postData[$key] = $text;
35 36
             }
36 37
         }
37 38
         foreach ($_GET as $key => $text) {
38 39
             if (!is_array($text) && !mb_detect_encoding($text, array('UTF-8'), TRUE)) {
39 40
                 $postData[$key] = iconv('Windows-1251', 'UTF-8', $text);
40
-            } else {
41
+            }
42
+            else {
41 43
                 $postData[$key] = $text;
42 44
             }
43 45
         }
@@ -72,7 +74,8 @@  discard block
 block discarded – undo
72 74
             }
73 75
             $pays = Money\Pay::getList(['where' => $where, 'order' => ['date_create', 'DESC']]);
74 76
             $this->view->page(['content' => 'pays', 'data' => compact('bread', 'pays')]);
75
-        } else {
77
+        }
78
+        else {
76 79
             $where = [['active', 1]];
77 80
             $where[] = [$pay->type, 1];
78 81
             $merchants = Money\Merchant::getList(['where' => $where]);
Please login to merge, or discard this patch.
system/modules/UserForms/UserForms.php 1 patch
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,8 +15,9 @@  discard block
 block discarded – undo
15 15
         if (!empty($_POST['UserForms'])) {
16 16
             foreach ($_POST['UserForms'] as $form_id => $inputs) {
17 17
                 $form = \UserForms\Form::get((int) $form_id);
18
-                if (!$form)
19
-                    continue;
18
+                if (!$form) {
19
+                                    continue;
20
+                }
20 21
                 $formRecive = new \UserForms\Recive();
21 22
                 $formRecive->user_id = (int) \Users\User::$cur->id;
22 23
                 $formRecive->form_id = (int) $form_id;
@@ -25,10 +26,12 @@  discard block
 block discarded – undo
25 26
                 foreach ($form->inputs as $input) {
26 27
                     if (isset($inputs['input' . $input->id])) {
27 28
                         $data['input' . $input->id] = htmlspecialchars($inputs['input' . $input->id]);
28
-                    } elseif ($input->required) {
29
+                    }
30
+                    elseif ($input->required) {
29 31
                         $error = true;
30 32
                         Msg::add('Вы не заполнили поле: ' . $input->label);
31
-                    } else {
33
+                    }
34
+                    else {
32 35
                         $data['input' . $input->id] = '';
33 36
                     }
34 37
                 }
Please login to merge, or discard this patch.