@@ -2,17 +2,17 @@ discard block |
||
2 | 2 | <?php |
3 | 3 | $currency_id = !empty($_GET['currency_id']) ? (int) $_GET['currency_id'] : 0; |
4 | 4 | $wallets = App::$cur->money->getUserWallets(); |
5 | -if ($currency_id && empty($wallets[$currency_id])) { |
|
5 | +if ($currency_id && empty($wallets[$currency_id])) { |
|
6 | 6 | Msg::add('У вас нет такого кошелька'); |
7 | 7 | Msg::show(); |
8 | 8 | return; |
9 | 9 | } |
10 | 10 | |
11 | -if ($currency_id) { |
|
11 | +if ($currency_id) { |
|
12 | 12 | $ids = $wallets[$currency_id]->id; |
13 | -} else { |
|
13 | +} else { |
|
14 | 14 | $ids = []; |
15 | - foreach ($wallets as $wallet) { |
|
15 | + foreach ($wallets as $wallet) { |
|
16 | 16 | $ids[] = $wallet->id; |
17 | 17 | } |
18 | 18 | $ids = implode(',', $ids); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | 'start' => $pages->params['start'], |
34 | 34 | 'limit' => $pages->params['limit'], |
35 | 35 | ]); |
36 | -foreach ($histories as $history) { |
|
36 | +foreach ($histories as $history) { |
|
37 | 37 | $amount = $history->amount ? $history->amount : $history->new - $history->old; |
38 | 38 | $table->addRow([ |
39 | 39 | $history->id, |
@@ -2,17 +2,17 @@ discard block |
||
2 | 2 | <?php |
3 | 3 | $currency_id = !empty($_GET['currency_id']) ? (int) $_GET['currency_id'] : 0; |
4 | 4 | $wallets = App::$cur->money->getUserWallets(); |
5 | -if ($currency_id && empty($wallets[$currency_id])) { |
|
5 | +if ($currency_id && empty($wallets[$currency_id])) { |
|
6 | 6 | Msg::add('У вас нет такого кошелька'); |
7 | 7 | Msg::show(); |
8 | 8 | return; |
9 | 9 | } |
10 | 10 | |
11 | -if ($currency_id) { |
|
11 | +if ($currency_id) { |
|
12 | 12 | $ids = $wallets[$currency_id]->id; |
13 | -} else { |
|
13 | +} else { |
|
14 | 14 | $ids = []; |
15 | - foreach ($wallets as $wallet) { |
|
15 | + foreach ($wallets as $wallet) { |
|
16 | 16 | $ids[] = $wallet->id; |
17 | 17 | } |
18 | 18 | $ids = implode(',', $ids); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | 'start' => $pages->params['start'], |
34 | 34 | 'limit' => $pages->params['limit'], |
35 | 35 | ]); |
36 | -foreach ($histories as $history) { |
|
36 | +foreach ($histories as $history) { |
|
37 | 37 | $amount = $history->amount ? $history->amount : $history->new - $history->old; |
38 | 38 | $table->addRow([ |
39 | 39 | $history->id, |
@@ -55,8 +55,9 @@ |
||
55 | 55 | * @return boolean |
56 | 56 | */ |
57 | 57 | public static function createDir($path) { |
58 | - if (file_exists($path)) |
|
59 | - return true; |
|
58 | + if (file_exists($path)) { |
|
59 | + return true; |
|
60 | + } |
|
60 | 61 | |
61 | 62 | $path = explode('/', $path); |
62 | 63 | $cur = ''; |
@@ -217,7 +217,7 @@ |
||
217 | 217 | /** |
218 | 218 | * Функция возвращает окончание для множественного числа слова на основании числа и массива окончаний |
219 | 219 | * @param Integer $number Число на основе которого нужно сформировать окончание |
220 | - * @param String[] $endingsArray Массив слов или окончаний для чисел (1, 4, 5), |
|
220 | + * @param string[] $endingArray Массив слов или окончаний для чисел (1, 4, 5), |
|
221 | 221 | * например ['яблоко', 'яблока', 'яблок'] |
222 | 222 | * @return String |
223 | 223 | */ |
@@ -9,7 +9,7 @@ |
||
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 |
@@ -18,11 +18,13 @@ |
||
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; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function($step = NULL, $params = []) { |
|
3 | +return function($step = null, $params = []) { |
|
4 | 4 | $options = ['max_height' => 1200, 'max_width' => 1200]; |
5 | 5 | $types = [ |
6 | 6 | [ |
@@ -88,8 +88,9 @@ |
||
88 | 88 | $config = static::getConfig(); |
89 | 89 | $merchantCurrency = static::getMerchantCurrency($currency); |
90 | 90 | |
91 | - if (!$description) |
|
92 | - $description = "Оплата заказа на сайте " . idn_to_utf8(INJI_DOMAIN_NAME); |
|
91 | + if (!$description) { |
|
92 | + $description = "Оплата заказа на сайте " . idn_to_utf8(INJI_DOMAIN_NAME); |
|
93 | + } |
|
93 | 94 | |
94 | 95 | //Секретный ключ интернет-магазина |
95 | 96 | $key = $config['secret']; |
@@ -164,7 +164,7 @@ |
||
164 | 164 | return false; |
165 | 165 | } |
166 | 166 | $reward->checkBlocked(); |
167 | - $reward_count = \Money\Reward\Recive::getCount([ 'where' => [ 'reward_id', $reward_id]]); |
|
167 | + $reward_count = \Money\Reward\Recive::getCount(['where' => ['reward_id', $reward_id]]); |
|
168 | 168 | if ($reward_count >= $reward->quantity && $reward->quantity) { |
169 | 169 | return false; |
170 | 170 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function ($step = null, $params = []) { |
|
3 | +return function($step = null, $params = []) { |
|
4 | 4 | App::$cur->db->createTable('notifications_notification', [ |
5 | 5 | 'notification_id' => 'pk', |
6 | 6 | 'notification_chanel_id' => 'int(11) UNSIGNED NOT NULL', |