Test Failed
Push — master ( 87e790...e9a009 )
by Alexey
04:35
created
system/modules/Users/Users.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
             ['user_id', $userId],
66 66
             ['hash', $hash]
67 67
         ]);
68
-        if(!$session){
68
+        if (!$session) {
69 69
             if (!headers_sent()) {
70 70
                 setcookie($this->cookiePrefix . "_user_session_hash", '', 0, "/");
71 71
                 setcookie($this->cookiePrefix . "_user_id", '', 0, "/");
Please login to merge, or discard this patch.
Braces   +14 added lines, -11 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             ['user_id', $userId],
66 66
             ['hash', $hash]
67 67
         ]);
68
-        if(!$session){
68
+        if(!$session) {
69 69
             if (!headers_sent()) {
70 70
                 setcookie($this->cookiePrefix . "_user_session_hash", '', 0, "/");
71 71
                 setcookie($this->cookiePrefix . "_user_id", '', 0, "/");
@@ -243,17 +243,20 @@  discard block
 block discarded – undo
243 243
      * @return boolean|\Users\User
244 244
      */
245 245
     public function get($idn, $ltype = 'id') {
246
-        if (!$idn)
247
-            return false;
246
+        if (!$idn) {
247
+                    return false;
248
+        }
248 249
 
249
-        if (is_numeric($idn) && $ltype != 'login')
250
-            $user = Users\User::get($idn, 'id');
251
-        elseif ($ltype == 'login')
252
-            $user = Users\User::get($idn, 'login');
253
-        else
254
-            $user = Users\User::get($idn, 'mail');
255
-        if (!$user)
256
-            return [];
250
+        if (is_numeric($idn) && $ltype != 'login') {
251
+                    $user = Users\User::get($idn, 'id');
252
+        } elseif ($ltype == 'login') {
253
+                    $user = Users\User::get($idn, 'login');
254
+        } else {
255
+                    $user = Users\User::get($idn, 'mail');
256
+        }
257
+        if (!$user) {
258
+                    return [];
259
+        }
257 260
 
258 261
         return $user;
259 262
     }
Please login to merge, or discard this patch.
system/modules/Chats/models/Chat.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@
 block discarded – undo
16 16
     public static $cols = [
17 17
         'name' => ['type' => 'text'],
18 18
         'code' => ['type' => 'text'],
19
-        'message' => ['type' => 'dataManager','relation'=>'messages'],
19
+        'message' => ['type' => 'dataManager', 'relation'=>'messages'],
20 20
     ];
21 21
     public static $dataManagers = [
22 22
         'manager' => [
23
-            'cols' => ['name', 'code','message']
23
+            'cols' => ['name', 'code', 'message']
24 24
         ]
25 25
     ];
26 26
     public static $forms = [
Please login to merge, or discard this patch.