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/Subtask.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'app/Controller/Subtask.php') diff --git a/app/Controller/Subtask.php b/app/Controller/Subtask.php index 79b74896..4ef3e74e 100644 --- a/app/Controller/Subtask.php +++ b/app/Controller/Subtask.php @@ -66,11 +66,9 @@ class Subtask extends Base list($valid, $errors) = $this->subtask->validateCreation($values); if ($valid) { - if ($this->subtask->create($values)) { $this->session->flash(t('Sub-task added successfully.')); - } - else { + } else { $this->session->flashError(t('Unable to create your sub-task.')); } @@ -118,11 +116,9 @@ class Subtask extends Base list($valid, $errors) = $this->subtask->validateModification($values); if ($valid) { - if ($this->subtask->update($values)) { $this->session->flash(t('Sub-task updated successfully.')); - } - else { + } else { $this->session->flashError(t('Unable to update your sub-task.')); } @@ -161,8 +157,7 @@ class Subtask extends Base if ($this->subtask->remove($subtask['id'])) { $this->session->flash(t('Sub-task removed successfully.')); - } - else { + } else { $this->session->flashError(t('Unable to remove this sub-task.')); } @@ -183,7 +178,6 @@ class Subtask extends Base $this->subtask->toggleStatus($subtask['id']); if ($redirect === 'board') { - $this->session['has_subtask_inprogress'] = $this->subtask->hasSubtaskInProgress($this->userSession->getId()); $this->response->html($this->template->render('board/tooltip_subtasks', array( -- cgit v1.2.3