@@ -49,7 +49,7 @@ |
||
49 | 49 | if (empty($objectsCols[$param->object_id])) { |
50 | 50 | $modelName = $param->object->model; |
51 | 51 | foreach (array_keys($modelName::$cols) as $colName) { |
52 | - $objectsCols[$param->object_id][$colName] = !empty($modelName::$labels[$colName])?$modelName::$labels[$colName]:$colName; |
|
52 | + $objectsCols[$param->object_id][$colName] = !empty($modelName::$labels[$colName]) ? $modelName::$labels[$colName] : $colName; |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 | $modelName = $param->object->model; |
@@ -25,7 +25,7 @@ |
||
25 | 25 | |
26 | 26 | function parseColsForModel($cols = []) |
27 | 27 | { |
28 | - $modelCols = [ 'labels' => [], 'cols' => [], 'relations' => []]; |
|
28 | + $modelCols = ['labels' => [], 'cols' => [], 'relations' => []]; |
|
29 | 29 | foreach ($cols as $col) { |
30 | 30 | $modelCols['labels'][$col['code']] = $col['label']; |
31 | 31 | $colType = !empty($col['type']['primary']) ? $col['type']['primary'] : $col['type']; |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | if (empty($blocks[$block->wallet->currency_id])) { |
103 | 103 | $blocks[$block->wallet->currency_id] = $block->amount; |
104 | 104 | } else { |
105 | - $blocks[$block->wallet->currency_id]+= $block->amount; |
|
105 | + $blocks[$block->wallet->currency_id] += $block->amount; |
|
106 | 106 | } |
107 | 107 | } |
108 | 108 | return $blocks; |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | $recives = \Money\Reward\Recive::getList(['where' => [['user_id', $user->id], ['reward_id', $reward->id]]]); |
185 | 185 | $amount = 0; |
186 | 186 | foreach ($recives as $recive) { |
187 | - $amount+=$recive->amount; |
|
187 | + $amount += $recive->amount; |
|
188 | 188 | } |
189 | 189 | if ($amount >= $reward->peruser) { |
190 | 190 | continue; |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | return function($reward, $user) { |
4 | 4 | return [ |
5 | - 'date' => date('Y-m-d H:i:s',mktime(0, 0, 0, date('n'), date("j") + 1, date("Y"))), |
|
5 | + 'date' => date('Y-m-d H:i:s', mktime(0, 0, 0, date('n'), date("j") + 1, date("Y"))), |
|
6 | 6 | 'type' => 'burn' |
7 | 7 | ]; |
8 | 8 | }; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function ($step = NULL, $params = array()) { |
|
3 | +return function($step = NULL, $params = array()) { |
|
4 | 4 | App::$cur->db->createTable('notifications_notification', [ |
5 | 5 | 'notification_id' => 'pk', |
6 | 6 | 'notification_chanel_id' => 'int(11) UNSIGNED NOT NULL', |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | 'subscriber_device_subscriber_id' => 'int(11) UNSIGNED NOT NULL', |
30 | 30 | 'subscriber_device_date_last_check' => 'timestamp NOT NULL DEFAULT 0', |
31 | 31 | 'subscriber_device_date_create' => 'timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP', |
32 | - ],[ |
|
32 | + ], [ |
|
33 | 33 | 'UNIQUE INDEX ' . App::$cur->db->table_prefix . 'notifications_subscriber_device_subscriber_device_key (subscriber_device_key)' |
34 | 34 | ]); |
35 | 35 | App::$cur->db->createTable('notifications_subscribe', [ |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $type = substr($path, 0, strpos($path, '/')); |
53 | 53 | switch ($type) { |
54 | 54 | case 'libs': |
55 | - return App::$cur->Libs->getPath(array_slice(explode('/', $path),2)); |
|
55 | + return App::$cur->Libs->getPath(array_slice(explode('/', $path), 2)); |
|
56 | 56 | break; |
57 | 57 | case 'templates': |
58 | 58 | $path = substr($path, strpos($path, '/') + 1); |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | |
189 | 189 | $fileName = $fileinfo['filename'] . '.' . $fileinfo['extension']; |
190 | 190 | if (App::$cur->db->connect) { |
191 | - $fileObj = Files\File::get([ 'path', '%/' . $fileinfo['filename'] . '.' . $fileinfo['extension'], 'LIKE']); |
|
191 | + $fileObj = Files\File::get(['path', '%/' . $fileinfo['filename'] . '.' . $fileinfo['extension'], 'LIKE']); |
|
192 | 192 | if ($fileObj) { |
193 | 193 | $fileName = $fileObj->original_name; |
194 | 194 | } |
@@ -58,7 +58,7 @@ |
||
58 | 58 | ]]); |
59 | 59 | ?>)</h3> |
60 | 60 | <?php |
61 | - foreach (\Dashboard\Comment::getList([ 'where' => [ |
|
61 | + foreach (\Dashboard\Comment::getList(['where' => [ |
|
62 | 62 | ['item_id', $item->id], |
63 | 63 | ['model', $modelName], |
64 | 64 | ], 'order' => ['date', 'desc']]) as $comment) { |
@@ -73,7 +73,7 @@ |
||
73 | 73 | $this->model->_params[$modelName::index()] = 0; |
74 | 74 | } |
75 | 75 | $relOptions['model']::fixPrefix($relOptions['col']); |
76 | - $inputs[$col] = new ActiveForm(new $relOptions['model']([ $relOptions['col'] => &$this->model->_params[$modelName::index()]]), $colPath[2]); |
|
76 | + $inputs[$col] = new ActiveForm(new $relOptions['model']([$relOptions['col'] => &$this->model->_params[$modelName::index()]]), $colPath[2]); |
|
77 | 77 | } |
78 | 78 | $inputs[$col]->parent = $this; |
79 | 79 | } elseif (!empty($modelName::$cols[$col])) { |
@@ -397,7 +397,7 @@ |
||
397 | 397 | return $item->$colName; |
398 | 398 | } |
399 | 399 | } elseif (!empty($modelName::$cols[$colName]['type'])) { |
400 | - if (\App::$cur->name == 'admin' && $originalCol == 'name' || ( $dataManager && !empty($dataManager->managerOptions['colToView']) && $dataManager->managerOptions['colToView'] == $originalCol)) { |
|
400 | + if (\App::$cur->name == 'admin' && $originalCol == 'name' || ($dataManager && !empty($dataManager->managerOptions['colToView']) && $dataManager->managerOptions['colToView'] == $originalCol)) { |
|
401 | 401 | $formName = $dataManager && !empty($dataManager->managerOptions['editForm']) ? $dataManager->managerOptions['editForm'] : 'manager'; |
402 | 402 | $redirectUrl = !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/admin/' . str_replace('\\', '/', get_class($originalItem)); |
403 | 403 | return "<a href ='/admin/" . str_replace('\\', '/view/', get_class($originalItem)) . "/{$originalItem->id}?formName={$formName}&redirectUrl={$redirectUrl}'>{$item->$colName}</a>"; |