@@ -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 | [ |
@@ -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 | [ |
@@ -97,13 +97,13 @@ |
||
97 | 97 | if ($this->first_name . $this->last_name . $this->middle_name) { |
98 | 98 | $name = ''; |
99 | 99 | if ($this->first_name) { |
100 | - $name.=$this->first_name; |
|
100 | + $name .= $this->first_name; |
|
101 | 101 | } |
102 | 102 | if ($this->middle_name) { |
103 | - $name.=($name ? ' ' : '') . $this->middle_name; |
|
103 | + $name .= ($name ? ' ' : '') . $this->middle_name; |
|
104 | 104 | } |
105 | 105 | if ($this->last_name) { |
106 | - $name.=($name ? ' ' : '') . $this->last_name; |
|
106 | + $name .= ($name ? ' ' : '') . $this->last_name; |
|
107 | 107 | } |
108 | 108 | return $name; |
109 | 109 | } else { |
@@ -44,7 +44,7 @@ |
||
44 | 44 | 'map' => [ |
45 | 45 | ['name', 'type'], |
46 | 46 | ['required', 'save'], |
47 | - [ 'userfield'] |
|
47 | + ['userfield'] |
|
48 | 48 | ] |
49 | 49 | ] |
50 | 50 | ]; |
@@ -44,7 +44,7 @@ |
||
44 | 44 | 'map' => [ |
45 | 45 | ['name', 'type'], |
46 | 46 | ['required', 'save'], |
47 | - [ 'userfield'] |
|
47 | + ['userfield'] |
|
48 | 48 | ] |
49 | 49 | ] |
50 | 50 | ]; |
@@ -24,8 +24,8 @@ |
||
24 | 24 | 'label' => ['type' => 'text'], |
25 | 25 | 'type' => ['type' => 'text'], |
26 | 26 | 'required' => ['type' => 'bool'], |
27 | - 'form_id' => [ 'type' => 'select', 'source' => 'relation', 'relation' => 'form'], |
|
28 | - 'user_id' => [ 'type' => 'select', 'source' => 'relation', 'relation' => 'user'], |
|
27 | + 'form_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'form'], |
|
28 | + 'user_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'user'], |
|
29 | 29 | 'input_params' => ['type' => 'textarea'], |
30 | 30 | 'weight' => ['type' => 'number'] |
31 | 31 | ]; |
@@ -24,10 +24,10 @@ |
||
24 | 24 | public static $cols = [ |
25 | 25 | 'name' => ['type' => 'text'], |
26 | 26 | 'description' => ['type' => 'html'], |
27 | - 'user_id' => [ 'type' => 'select', 'source' => 'relation', 'relation' => 'user'], |
|
27 | + 'user_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'user'], |
|
28 | 28 | 'date_create' => ['type' => 'dateTime'], |
29 | 29 | //Менеджеры |
30 | - 'inputs' => [ 'type' => 'dataManager', 'relation' => 'inputs'], |
|
30 | + 'inputs' => ['type' => 'dataManager', 'relation' => 'inputs'], |
|
31 | 31 | ]; |
32 | 32 | public static $dataManagers = [ |
33 | 33 | 'manager' => [ |
@@ -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; |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $rootUser = $rootUser ? $rootUser : \Users\User::$cur; |
169 | 169 | $reward = \Money\Reward::get($reward_id); |
170 | 170 | $reward->checkBlocked(); |
171 | - $reward_count = \Money\Reward\Recive::getCount([ 'where' => [ 'reward_id', $reward_id]]); |
|
171 | + $reward_count = \Money\Reward\Recive::getCount(['where' => ['reward_id', $reward_id]]); |
|
172 | 172 | if ($reward_count >= $reward->quantity && $reward->quantity) |
173 | 173 | return false; |
174 | 174 | $types = $this->getSnippets('rewardType'); |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | $recives = \Money\Reward\Recive::getList(['where' => [['user_id', $user->id], ['reward_id', $reward->id]]]); |
190 | 190 | $amount = 0; |
191 | 191 | foreach ($recives as $recive) { |
192 | - $amount+=$recive->amount; |
|
192 | + $amount += $recive->amount; |
|
193 | 193 | } |
194 | 194 | if ($amount >= $reward->peruser) { |
195 | 195 | continue; |