Passed
Push — Security_and_bug_fixes ( 6b5782...452225 )
by Stone
02:00
created
App/Controllers/Admin/Post.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -211,10 +211,12 @@
 block discarded – undo
211 211
             $this->alertBox->setAlert("empty slug not allowed", "error");
212 212
         }
213 213
 
214
-        if ($postSlug != $originalPostSlug) //if the slug has been updated
214
+        if ($postSlug != $originalPostSlug) {
215
+            //if the slug has been updated
215 216
         {
216 217
             if (!$this->postModel->isPostSlugUnique($postSlug)) {
217 218
                 $error = true;
219
+        }
218 220
                 $originalPostSlug = $this->postModel->getPostSlugFromId($postId);
219 221
                 $this->alertBox->setAlert("Slug not unique", "error");
220 222
             }
Please login to merge, or discard this patch.
App/Models/UserModel.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -204,9 +204,11 @@
 block discarded – undo
204 204
 
205 205
         $user = $this->getUserDetailsByEmail($email);
206 206
 
207
-        if ($user === false) //no user exists
207
+        if ($user === false) {
208
+            //no user exists
208 209
         {
209 210
             $response->message = "email doesn't exist, register a new account?";
211
+        }
210 212
             return $response;
211 213
         }
212 214
 
Please login to merge, or discard this patch.
App/Controllers/Login.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -282,9 +282,11 @@
 block discarded – undo
282 282
         //all set, redirect and set message
283 283
         $redirectUrl = "";
284 284
         $refererUrl = $this->request->getReferer();
285
-        if ($refererUrl != "")//getReferer can return null if client isn't configured
285
+        if ($refererUrl != "") {
286
+            //getReferer can return null if client isn't configured
286 287
         {
287 288
             $baseUrl = $this->request->getBaseUrl();
289
+        }
288 290
             $redirectUrl = $this->removeFromBeginning($refererUrl, $baseUrl);
289 291
         }
290 292
 
Please login to merge, or discard this patch.
App/Controllers/Post.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,9 +91,11 @@
 block discarded – undo
91 91
         $admin = $this->session->get('user_role_level') >= Constant::ADMIN_LEVEL;
92 92
         $commentId = $this->commentModel->addComment($postId, $userId, $comment, $admin);
93 93
 
94
-        if (!$admin) //if we are not an admin, send an email to alert and add an alertBox
94
+        if (!$admin) {
95
+            //if we are not an admin, send an email to alert and add an alertBox
95 96
         {
96 97
             $siteConfig = $this->siteConfig->getSiteConfig();
98
+        }
97 99
             $post = $this->postModel->getSinglePost($postId);
98 100
             $baseUrl = $this->request->getBaseUrl();
99 101
 
Please login to merge, or discard this patch.
App/Controllers/Ajax/PostVerification.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,9 +45,11 @@
 block discarded – undo
45 45
 
46 46
         $data = $this->postModel->isPostSlugUnique(/** @scrutinizer ignore-type */$postSlug); //we have checked that slug is valid so no type error
47 47
 
48
-        if ($data === false) //slug is not unique, but could be from the same post
48
+        if ($data === false) {
49
+            //slug is not unique, but could be from the same post
49 50
         {
50 51
             $slugOfId = $this->postModel->getPostSlugFromId($postId);
52
+        }
51 53
             if ($slugOfId === $postSlug) {
52 54
                 //it's the same post, return true
53 55
                 $data = true;
Please login to merge, or discard this patch.
App/Controllers/Ajax/Config.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
         try{
68 68
             $this->sendMail->sendTestMail();
69 69
             $result['success'] = true;
70
-        }catch (Swift_TransportException $e) {
70
+        } catch (Swift_TransportException $e) {
71 71
             $result['success'] = false;
72 72
         }
73 73
 
Please login to merge, or discard this patch.