Passed
Push — RefactoringPosts ( 5e4865...a3ef1c )
by Stone
02:32
created
App/Controllers/Ajax/postModification.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
         if (!$this->container->getRequest()->isPost()) {
29 29
             throw new \Core\JsonException('Call is not post');
30 30
         }
31
-        $state = (bool)($this->request->getData("state") === 'true');
32
-        $postId = (int)$this->request->getData("postId");
31
+        $state = (bool) ($this->request->getData("state") === 'true');
32
+        $postId = (int) $this->request->getData("postId");
33 33
 
34 34
         $result = array();
35 35
         $result["success"] = $this->postModule->setPublished(!$state, $postId);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             throw new \Core\JsonException('Call is not post');
50 50
         }
51 51
         $state = ($this->request->getData("state") === 'true');
52
-        $postId = (int)$this->request->getData("postId");
52
+        $postId = (int) $this->request->getData("postId");
53 53
 
54 54
         $result = array();
55 55
         $result["success"] = $this->postModule->setOnFrontPage(!$state, $postId);
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
@@ -36,9 +36,11 @@
 block discarded – undo
36 36
 
37 37
         $data = $postModel->isPostSlugUnique($postSlug);
38 38
 
39
-        if ($data === false) //slug is not unique, but could be from the same post
39
+        if ($data === false) {
40
+            //slug is not unique, but could be from the same post
40 41
         {
41 42
             $slugOfId = $postModel->getPostSlugFromId($postId);
43
+        }
42 44
             if ($slugOfId === $postSlug) {
43 45
                 //it's the same post, return true
44 46
                 $data = true;
Please login to merge, or discard this patch.