Completed
Push — master ( 8e922e...3329c8 )
by Alexey
05:08
created
system/modules/TextBlocks/install_script.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-return function ($step = NULL, $params = []) {
3
+return function($step = NULL, $params = []) {
4 4
 
5 5
     $groups = [
6 6
         [
Please login to merge, or discard this patch.
system/modules/UserForms/install_script.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-return function ($step = NULL, $params = []) {
3
+return function($step = NULL, $params = []) {
4 4
 
5 5
     $groups = [
6 6
         [
Please login to merge, or discard this patch.
system/modules/Users/models/User/Inventory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -97,13 +97,13 @@
 block discarded – undo
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 {
Please login to merge, or discard this patch.
system/Inji/Module.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      * Get all posible directorys for module files
82 82
      * 
83 83
      * @param string $moduleName
84
-     * @return array
84
+     * @return string
85 85
      */
86 86
     public static function getModulePaths($moduleName)
87 87
     {
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      * Get installed modules for app
132 132
      * 
133 133
      * @param \App $app
134
-     * @param boolean|\App $primary
134
+     * @param App $primary
135 135
      * @return array
136 136
      */
137 137
     public static function getInstalled($app, $primary = false)
Please login to merge, or discard this patch.
system/modules/Ui/widgets/DataManager/rowButtons.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 $buttons = [];
12 12
 foreach ($actions as $action => $actionParams) {
13 13
     if (class_exists($actionParams['className']) && $actionParams['className']::$rowAction) {
14
-        $buttons[]= $actionParams['className']::rowButton($dataManager, $item, $params, $actionParams);
14
+        $buttons[] = $actionParams['className']::rowButton($dataManager, $item, $params, $actionParams);
15 15
     }
16 16
 }
17 17
 echo implode('&nbsp;', $buttons);
Please login to merge, or discard this patch.
system/modules/Users/Users.php 3 patches
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -92,6 +92,9 @@  discard block
 block discarded – undo
92 92
         }
93 93
     }
94 94
 
95
+    /**
96
+     * @param string $user_mail
97
+     */
95 98
     public function passre($user_mail)
96 99
     {
97 100
         $user = $this->get($user_mail, 'mail');
@@ -322,6 +325,9 @@  discard block
 block discarded – undo
322 325
         return $user->id;
323 326
     }
324 327
 
328
+    /**
329
+     * @param string $pass
330
+     */
325 331
     public function hashpass($pass)
326 332
     {
327 333
         return password_hash($pass, PASSWORD_DEFAULT);
@@ -359,6 +365,9 @@  discard block
 block discarded – undo
359 365
         return $return;
360 366
     }
361 367
 
368
+    /**
369
+     * @param integer $cat_id
370
+     */
362 371
     public function addUserActivity($user_id, $cat_id , $text = '')
363 372
     {
364 373
         $ua = new Users\Activity([
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -307,7 +307,7 @@
 block discarded – undo
307 307
             $to = $user_mail;
308 308
             $subject = 'Регистрация на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME);
309 309
             $text = 'Вы были зарегистрированы на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME) . '<br />для входа используйте ваш почтовый ящик в качестве логина и пароль: ' . $pass;
310
-            $text .='<br />';
310
+            $text .= '<br />';
311 311
             $text .= '<br />';
312 312
             $text .= 'Для активации вашего аккаунта перейдите по ссылке <a href = "http://' . INJI_DOMAIN_NAME . '/users/activation/' . $user->id . '/' . $user->activation . '">http://' . idn_to_utf8(INJI_DOMAIN_NAME) . '/users/activation/' . $user->id . '/' . $user->activation . '</a>';
313 313
             Tools::sendMail($from, $to, $subject, $text);
Please login to merge, or discard this patch.
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -196,17 +196,20 @@
 block discarded – undo
196 196
      */
197 197
     public function get($idn, $ltype = 'id')
198 198
     {
199
-        if (!$idn)
200
-            return false;
199
+        if (!$idn) {
200
+                    return false;
201
+        }
201 202
 
202
-        if (is_numeric($idn) && $ltype != 'login')
203
-            $user = Users\User::get($idn, 'id');
204
-        elseif ($ltype == 'login')
205
-            $user = Users\User::get($idn, 'login');
206
-        else
207
-            $user = Users\User::get($idn, 'mail');
208
-        if (!$user)
209
-            return [];
203
+        if (is_numeric($idn) && $ltype != 'login') {
204
+                    $user = Users\User::get($idn, 'id');
205
+        } elseif ($ltype == 'login') {
206
+                    $user = Users\User::get($idn, 'login');
207
+        } else {
208
+                    $user = Users\User::get($idn, 'mail');
209
+        }
210
+        if (!$user) {
211
+                    return [];
212
+        }
210 213
 
211 214
         return $user;
212 215
     }
Please login to merge, or discard this patch.
system/modules/Money/Money.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
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;
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         $rootUser = $rootUser ? $rootUser : \Users\User::$cur;
167 167
         $reward = \Money\Reward::get($reward_id);
168 168
         $reward->checkBlocked();
169
-        $reward_count = \Money\Reward\Recive::getCount([ 'where' => [ 'reward_id', $reward_id ]]);
169
+        $reward_count = \Money\Reward\Recive::getCount(['where' => ['reward_id', $reward_id]]);
170 170
         if ($reward_count >= $reward->quantity && $reward->quantity)
171 171
             return false;
172 172
         $types = $this->getSnippets('rewardType');
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
                 $recives = \Money\Reward\Recive::getList(['where' => [['user_id', $user->id], ['reward_id', $reward->id]]]);
188 188
                 $amount = 0;
189 189
                 foreach ($recives as $recive) {
190
-                    $amount+=$recive->amount;
190
+                    $amount += $recive->amount;
191 191
                 }
192 192
                 if ($amount >= $reward->peruser) {
193 193
                     continue;
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -167,8 +167,9 @@
 block discarded – undo
167 167
         $reward = \Money\Reward::get($reward_id);
168 168
         $reward->checkBlocked();
169 169
         $reward_count = \Money\Reward\Recive::getCount([ 'where' => [ 'reward_id', $reward_id ]]);
170
-        if ($reward_count >= $reward->quantity && $reward->quantity)
171
-            return false;
170
+        if ($reward_count >= $reward->quantity && $reward->quantity) {
171
+                    return false;
172
+        }
172 173
         $types = $this->getSnippets('rewardType');
173 174
         foreach ($reward->levels(['order' => ['level', 'asc']]) as $level) {
174 175
             $user = $rootUser;
Please login to merge, or discard this patch.
system/modules/UserForms/widgets/userForm.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -14,29 +14,29 @@
 block discarded – undo
14 14
 ?>
15 15
 <form method = "POST" action = "">
16 16
   <?php
17
-  if ($form->description) {
18
-      echo "<p class = 'text-center'>{$form->description}</p>";
19
-  }
20
-  foreach ($form->inputs(['order' => ['weight']]) as $input) {
21
-      switch ($input->type) {
22
-          case 'text':
17
+    if ($form->description) {
18
+        echo "<p class = 'text-center'>{$form->description}</p>";
19
+    }
20
+    foreach ($form->inputs(['order' => ['weight']]) as $input) {
21
+        switch ($input->type) {
22
+            case 'text':
23 23
               ?>
24 24
               <div class ='form-group'>
25 25
                 <label><?= $input->label; ?></label>
26 26
                 <input class ='form-control' type ='text' name ='UserForms[<?= (int) $form_id; ?>][input<?= $input->id; ?>]' <?= $input->required ? 'required' : ''; ?> />
27 27
               </div>
28 28
               <?php
29
-              break;
30
-          case 'textarea':
29
+                break;
30
+            case 'textarea':
31 31
               ?>
32 32
               <div class ='form-group'>
33 33
                 <label><?= $input->label; ?></label>
34 34
                 <textarea class ='form-control' name ='UserForms[<?= (int) $form_id; ?>][input<?= $input->id; ?>]' <?= $input->required ? 'required' : ''; ?> /></textarea>
35 35
               </div>
36 36
               <?php
37
-              break;
38
-      }
39
-  }
40
-  ?>
37
+                break;
38
+        }
39
+    }
40
+    ?>
41 41
   <button class = 'btn btn-success btn-block'>Отправить</button>
42 42
 </form>
43 43
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Ecommerce/models/UserAdds/Field.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
             'map' => [
45 45
                 ['name', 'type'],
46 46
                 ['required', 'save'],
47
-                [ 'userfield']
47
+                ['userfield']
48 48
             ]
49 49
         ]
50 50
     ];
Please login to merge, or discard this patch.