@@ -87,7 +87,8 @@ |
||
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]; |
@@ -24,7 +24,8 @@ |
||
24 | 24 | $code .= '$' . $this->name . ' = '; |
25 | 25 | if (is_array($this->value)) { |
26 | 26 | $code .= \CodeGenerator::genArray($this->value); |
27 | - } else { |
|
27 | + } |
|
28 | + else { |
|
28 | 29 | $code .= '"' . str_replace('"', '\"', $this->value) . '";'; |
29 | 30 | } |
30 | 31 | return $code; |
@@ -8,7 +8,8 @@ discard block |
||
8 | 8 | |
9 | 9 | if (!$rewardItemExist) { |
10 | 10 | $allowTypes = explode(',', $trigger->params['item_type_id']->value); |
11 | - } else { |
|
11 | + } |
|
12 | + else { |
|
12 | 13 | $allowTypes = []; |
13 | 14 | } |
14 | 15 | foreach ($cart->cartItems as $cartItem) { |
@@ -19,7 +20,8 @@ discard block |
||
19 | 20 | $currency_id = $cartItem->price->currency ? $cartItem->price->currency->id : \App::$cur->ecommerce->config['defaultCurrency']; |
20 | 21 | if (empty($sums[$currency_id])) { |
21 | 22 | $sums[$currency_id] = $cartItem->final_price * $cartItem->count; |
22 | - } else { |
|
23 | + } |
|
24 | + else { |
|
23 | 25 | $sums[$currency_id] += $cartItem->final_price * $cartItem->count; |
24 | 26 | } |
25 | 27 | } |
@@ -49,7 +49,8 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -49,7 +49,8 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -24,7 +24,8 @@ |
||
24 | 24 | $code .= '$' . $this->name . ' = '; |
25 | 25 | if (is_array($this->value)) { |
26 | 26 | $code .= \CodeGenerator::genArray($this->value); |
27 | - } else { |
|
27 | + } |
|
28 | + else { |
|
28 | 29 | $code .= '"' . str_replace('"', '\"', $this->value) . '";'; |
29 | 30 | } |
30 | 31 | return $code; |
@@ -24,7 +24,8 @@ |
||
24 | 24 | $code .= '$' . $this->name . ' = '; |
25 | 25 | if (is_array($this->value)) { |
26 | 26 | $code .= \CodeGenerator::genArray($this->value); |
27 | - } else { |
|
27 | + } |
|
28 | + else { |
|
28 | 29 | $code .= '"' . str_replace('"', '\"', $this->value) . '";'; |
29 | 30 | } |
30 | 31 | return $code; |
@@ -24,7 +24,8 @@ |
||
24 | 24 | $code .= '$' . $this->name . ' = '; |
25 | 25 | if (is_array($this->value)) { |
26 | 26 | $code .= \CodeGenerator::genArray($this->value); |
27 | - } else { |
|
27 | + } |
|
28 | + else { |
|
28 | 29 | $code .= '"' . str_replace('"', '\"', $this->value) . '";'; |
29 | 30 | } |
30 | 31 | return $code; |
@@ -43,7 +43,8 @@ |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | $inputOptions['values'] = $item->{$relationName}(['forSelect' => true]); |
46 | - } else { |
|
46 | + } |
|
47 | + else { |
|
47 | 48 | $inputOptions['values'] = $this->activeForm->model->{$type['relation']}(['forSelect' => true]); |
48 | 49 | } |
49 | 50 | } |