Passed
Push — Auth ( 51f521...26ff7a )
by Stone
02:00
created
App/Models/Remembered_loginModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     {
28 28
         if ($token_value) {
29 29
             $this->token = $token_value;
30
-        } else {
30
+        }else {
31 31
             $this->token = $this->generateToken();
32 32
         }
33 33
     }
Please login to merge, or discard this patch.
App/Controllers/Login.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     private function populateUserFromId(int $userId)
80 80
     {
81 81
         $result = $this->userModel->getUserDetailsById($userId);
82
-        $this->populateUser((array)$result);
82
+        $this->populateUser((array) $result);
83 83
     }
84 84
 
85 85
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public function index()
102 102
     {
103
-        if($this->session->isParamSet("user"))
103
+        if ($this->session->isParamSet("user"))
104 104
         {
105 105
             //we are already connected, redirect
106 106
             $this->response->redirect();
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      */
130 130
     public function register()
131 131
     {
132
-        if($this->session->isParamSet("user"))
132
+        if ($this->session->isParamSet("user"))
133 133
         {
134 134
             //we are already connected, redirect
135 135
             $this->response->redirect();
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
             }
190 190
 
191 191
             $authUser = $this->userModel->authenticateUser($email, $password);
192
-            if(!$authUser->success)
192
+            if (!$authUser->success)
193 193
             {
194 194
                 $error = true;
195 195
                 $loginErrors->global = $authUser->message;
@@ -208,14 +208,14 @@  discard block
 block discarded – undo
208 208
         //we are authenticated here
209 209
 
210 210
         //populate the user object with returned data
211
-        $this->populateUser((array)$authUser->user);
211
+        $this->populateUser((array) $authUser->user);
212 212
 
213 213
         //if the user wanted to be remembered
214
-        if($rememberMe)
214
+        if ($rememberMe)
215 215
         {
216 216
             $this->rememberedLoginModel->setToken(); //generate a new token
217 217
             $rememberMeToken = $this->rememberedLoginModel->rememberMe($this->user->idusers);
218
-            if($rememberMeToken->success)
218
+            if ($rememberMeToken->success)
219 219
             {
220 220
                 //set cookie
221 221
                 $this->cookie->setCookie("rememberMe", $rememberMeToken->token, $rememberMeToken->expiry_timestamp);
Please login to merge, or discard this patch.
App/Modules/SendMail.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 use Swift_Message;
9 9
 use Swift_SmtpTransport;
10 10
 
11
-class SendMail extends Module{
11
+class SendMail extends Module {
12 12
 
13 13
     private $siteConfig;
14 14
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
         // Create the Transport for mail sending
26 26
         //$config = $this->siteConfig->getSiteConfig();
27
-        $this->transport = (new Swift_SmtpTransport($this->siteConfig["SMTP_server"], (int)$this->siteConfig["SMTP_port"]))
27
+        $this->transport = (new Swift_SmtpTransport($this->siteConfig["SMTP_server"], (int) $this->siteConfig["SMTP_port"]))
28 28
             ->setUsername($this->siteConfig["SMTP_user"])
29 29
             ->setPassword($this->siteConfig["SMTP_pass"])
30 30
         ;
Please login to merge, or discard this patch.