Passed
Push — Showing-Posts ( a72031...c030ab )
by Stone
02:07
created
App/Controllers/Ajax/postModification.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 use Core\AjaxController;
7 7
 use Core\Container;
8 8
 
9
-class postModification extends AjaxController{
9
+class postModification extends AjaxController {
10 10
 
11 11
 
12 12
     private $postModule;
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
         if (!$this->container->getRequest()->isPost()) {
24 24
             throw new \Core\JsonException('Call is not post');
25 25
         }
26
-        $state = (bool)($this->request->getData("state") === 'true');
27
-        $postId = (int)$this->request->getData("postId");
26
+        $state = (bool) ($this->request->getData("state") === 'true');
27
+        $postId = (int) $this->request->getData("postId");
28 28
 
29 29
         $result["success"] = $this->postModule->setPublished(!$state, $postId);
30 30
         $result["state"] = !$state;
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             throw new \Core\JsonException('Call is not post');
40 40
         }
41 41
         $state = ($this->request->getData("state") === 'true');
42
-        $postId = (int)$this->request->getData("postId");
42
+        $postId = (int) $this->request->getData("postId");
43 43
 
44 44
         $result["success"] = $this->postModule->setOnFrontPage(!$state, $postId);
45 45
         $result["state"] = !$state;
Please login to merge, or discard this patch.