From 8c532efd5f02f7a7e5ea322a07ddcf49d130a8ec Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 17 Oct 2015 10:09:03 -0400 Subject: Run php-cs-fixer on the code base --- app/Controller/Comment.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'app/Controller/Comment.php') diff --git a/app/Controller/Comment.php b/app/Controller/Comment.php index 90d9d6df..d6cbbf1e 100644 --- a/app/Controller/Comment.php +++ b/app/Controller/Comment.php @@ -81,11 +81,9 @@ class Comment extends Base list($valid, $errors) = $this->comment->validateCreation($values); if ($valid) { - if ($this->comment->create($values)) { $this->session->flash(t('Comment added successfully.')); - } - else { + } else { $this->session->flashError(t('Unable to create your comment.')); } @@ -132,11 +130,9 @@ class Comment extends Base list($valid, $errors) = $this->comment->validateModification($values); if ($valid) { - if ($this->comment->update($values)) { $this->session->flash(t('Comment updated successfully.')); - } - else { + } else { $this->session->flashError(t('Unable to update your comment.')); } @@ -176,8 +172,7 @@ class Comment extends Base if ($this->comment->remove($comment['id'])) { $this->session->flash(t('Comment removed successfully.')); - } - else { + } else { $this->session->flashError(t('Unable to remove this comment.')); } -- cgit v1.2.3