@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | return [ |
4 | 4 | 'name' => 'Вознаграждение пользователю за различные действия', |
5 | - 'handler' => function($user, $trigger) { |
|
5 | + 'handler' => function ($user, $trigger) { |
|
6 | 6 | App::$cur->money->reward($trigger->reward_id, [], $user); |
7 | 7 | } |
8 | 8 | ]; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <h3>Блокировки на счете</h3> |
2 | 2 | <?php |
3 | -$currency_id = !empty($_GET['currency_id']) ? (int)$_GET['currency_id'] : 0; |
|
3 | +$currency_id = !empty($_GET['currency_id']) ? (int) $_GET['currency_id'] : 0; |
|
4 | 4 | $wallets = App::$cur->money->getUserWallets(); |
5 | 5 | if ($currency_id && empty($wallets[$currency_id])) { |
6 | 6 | Msg::add('У вас нет такого кошелька'); |
@@ -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; |
38 | 38 | $table->addRow([ |
39 | 39 | $history->id, |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <h3>История счета</h3> |
2 | 2 | <?php |
3 | -$currency_id = !empty($_GET['currency_id']) ? (int)$_GET['currency_id'] : 0; |
|
3 | +$currency_id = !empty($_GET['currency_id']) ? (int) $_GET['currency_id'] : 0; |
|
4 | 4 | $wallets = App::$cur->money->getUserWallets(); |
5 | 5 | if ($currency_id && empty($wallets[$currency_id])) { |
6 | 6 | Msg::add('У вас нет такого кошелька'); |
@@ -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, |
@@ -5,7 +5,7 @@ |
||
5 | 5 | 'widgets' => [ |
6 | 6 | 'Geography\cityData' => [ |
7 | 7 | 'name' => 'Вариатор данных по городам', |
8 | - 'params' => function() { |
|
8 | + 'params' => function () { |
|
9 | 9 | App::$cur->Ui; |
10 | 10 | \App::$cur->libs->loadLib('ckeditor'); |
11 | 11 | $dataSets = Geography\City\Data::getList(['order' => ['code']]); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function($step = null, $params = []) { |
|
3 | +return function ($step = null, $params = []) { |
|
4 | 4 | |
5 | 5 | }; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | return [ |
3 | - 'widget' => function() { |
|
3 | + 'widget' => function () { |
|
4 | 4 | ?> |
5 | 5 | <div class="panel panel-default"> |
6 | 6 | <div class="panel-heading">Полученные формы</div> |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | echo('form not found'); |
7 | 7 | return; |
8 | 8 | } |
9 | -$userForm = \UserForms\Form::get((int)$form_id); |
|
9 | +$userForm = \UserForms\Form::get((int) $form_id); |
|
10 | 10 | if (!$userForm) { |
11 | 11 | echo('form not found'); |
12 | 12 | return; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | echo "<p class = 'text-center'>{$userForm->description}</p>"; |
20 | 20 | } |
21 | 21 | foreach ($userForm->inputs(['order' => ['weight']]) as $input) { |
22 | - $form->input($input->type, 'UserForms[' . (int)$form_id . '][input' . $input->id . ']', $input->label, ['required' => $input->required]); |
|
22 | + $form->input($input->type, 'UserForms[' . (int) $form_id . '][input' . $input->id . ']', $input->label, ['required' => $input->required]); |
|
23 | 23 | } |
24 | 24 | ?> |
25 | 25 | <button class='btn btn-success btn-block'>Отправить</button> |
@@ -1,13 +1,13 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!empty($params[0])) { |
|
2 | +if (!empty($params[0])) { |
|
3 | 3 | $form_id = $params[0]; |
4 | 4 | } |
5 | -if (empty($form_id)) { |
|
5 | +if (empty($form_id)) { |
|
6 | 6 | echo('form not found'); |
7 | 7 | return; |
8 | 8 | } |
9 | 9 | $userForm = \UserForms\Form::get((int)$form_id); |
10 | -if (!$userForm) { |
|
10 | +if (!$userForm) { |
|
11 | 11 | echo('form not found'); |
12 | 12 | return; |
13 | 13 | } |
@@ -15,10 +15,10 @@ discard block |
||
15 | 15 | $form->begin(); |
16 | 16 | ?> |
17 | 17 | <?php |
18 | -if ($userForm->description) { |
|
18 | +if ($userForm->description) { |
|
19 | 19 | echo "<p class = 'text-center'>{$userForm->description}</p>"; |
20 | 20 | } |
21 | -foreach ($userForm->inputs(['order' => ['weight']]) as $input) { |
|
21 | +foreach ($userForm->inputs(['order' => ['weight']]) as $input) { |
|
22 | 22 | $form->input($input->type, 'UserForms[' . (int)$form_id . '][input' . $input->id . ']', $input->label, ['required' => $input->required]); |
23 | 23 | } |
24 | 24 | ?> |
@@ -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 | [ |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function($step = NULL, $params = []) { |
|
3 | +return function ($step = NULL, $params = []) { |
|
4 | 4 | |
5 | 5 | $groups = [ |
6 | 6 | [ |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function($step = NULL, $params = []) { |
|
3 | +return function($step = null, $params = []) { |
|
4 | 4 | |
5 | 5 | $groups = [ |
6 | 6 | [ |