@@ -46,18 +46,18 @@ |
||
| 46 | 46 | switch ($reward->round_type) {
|
| 47 | 47 | case 'round': |
| 48 | 48 | $finalSum = round($finalSum, $reward->round_precision); |
| 49 | - $amount = $finalSum / 100 * (float)$level->params['amount']->value; |
|
| 49 | + $amount = $finalSum / 100 * (float) $level->params['amount']->value; |
|
| 50 | 50 | break; |
| 51 | 51 | case 'floor': |
| 52 | 52 | $finalSum = floor($finalSum); |
| 53 | - $amount = $finalSum / 100 * (float)$level->params['amount']->value; |
|
| 53 | + $amount = $finalSum / 100 * (float) $level->params['amount']->value; |
|
| 54 | 54 | break; |
| 55 | 55 | default: |
| 56 | - $amount = $finalSum / 100 * (float)$level->params['amount']->value; |
|
| 56 | + $amount = $finalSum / 100 * (float) $level->params['amount']->value; |
|
| 57 | 57 | } |
| 58 | 58 | break; |
| 59 | 59 | case 'amount': |
| 60 | - $amount = (float)$level->params['amount']->value; |
|
| 60 | + $amount = (float) $level->params['amount']->value; |
|
| 61 | 61 | } |
| 62 | 62 | if (!$amount) {
|
| 63 | 63 | return 0; |
@@ -5,6 +5,6 @@ |
||
| 5 | 5 | 'checker' => function ($user) {
|
| 6 | 6 | $query = 'SELECT * FROM inji_ecommerce_cart iec WHERE iec.cart_cart_status_id >= 5 AND iec.cart_date_create >= NOW() - INTERVAL 90 DAY AND cart_user_id = ?'; |
| 7 | 7 | $result = \App::$cur->db->query(['query' => $query, 'params' => [$user->id]]); |
| 8 | - return (bool)$result ? $result->fetch() : false; |
|
| 8 | + return (bool) $result ? $result->fetch() : false; |
|
| 9 | 9 | }]; |
| 10 | 10 | |
| 11 | 11 | \ No newline at end of file |
@@ -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('У вас нет такого кошелька');
|
@@ -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('У вас нет такого кошелька');
|
@@ -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> |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | $user = Users\User::$cur; |
| 18 | 18 | if (!empty($_POST) && !empty($_POST['card_id'])) { |
| 19 | 19 | $error = false; |
| 20 | - $card = \Ecommerce\Card::get((int)$_POST['card_id']); |
|
| 20 | + $card = \Ecommerce\Card::get((int) $_POST['card_id']); |
|
| 21 | 21 | if (!$card) { |
| 22 | 22 | $error = true; |
| 23 | 23 | Msg::add('Такой карты не существует', 'danger'); |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | //search |
| 104 | 104 | if (!empty($_GET['search'])) { |
| 105 | 105 | if (!empty($_GET['inCatalog'])) { |
| 106 | - $category_id = (int)$_GET['inCatalog']; |
|
| 106 | + $category_id = (int) $_GET['inCatalog']; |
|
| 107 | 107 | } |
| 108 | 108 | $search = $_GET['search']; |
| 109 | 109 | } else { |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | public function viewAction($id = '', $quick = 0) { |
| 212 | - $item = \Ecommerce\Item::get((int)$id); |
|
| 212 | + $item = \Ecommerce\Item::get((int) $id); |
|
| 213 | 213 | if (!$item) { |
| 214 | 214 | Tools::redirect('/ecommerce/', 'Такой товар не найден'); |
| 215 | 215 | } |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | $bread[] = ['text' => $item->name()]; |
| 229 | 229 | $this->view->setTitle($item->name()); |
| 230 | 230 | $options = [ |
| 231 | - 'data' => compact('item', 'active', 'catalog', 'bread','quick'), |
|
| 231 | + 'data' => compact('item', 'active', 'catalog', 'bread', 'quick'), |
|
| 232 | 232 | 'content' => $item->view ? $item->view : 'view', |
| 233 | 233 | ]; |
| 234 | 234 | if (isset($_GET['quickview'])) { |