@@ -6,7 +6,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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; |