@@ -45,9 +45,11 @@ |
||
| 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; |
@@ -67,7 +67,7 @@ |
||
| 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 | |