From 98aab0d99465b40907bbc1f1108ea20db290e036 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 9 May 2015 23:08:16 -0400 Subject: Fix some php analyzer issues --- app/Controller/Base.php | 3 +++ app/Controller/Project.php | 9 ++++----- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'app/Controller') diff --git a/app/Controller/Base.php b/app/Controller/Base.php index 869d5d59..477d82a5 100644 --- a/app/Controller/Base.php +++ b/app/Controller/Base.php @@ -24,6 +24,9 @@ use Symfony\Component\EventDispatcher\Event; * @property \Integration\GithubWebhook $githubWebhook * @property \Integration\GitlabWebhook $gitlabWebhook * @property \Integration\BitbucketWebhook $bitbucketWebhook + * @property \Integration\PostmarkWebhook $postmarkWebhook + * @property \Integration\SendgridWebhook $sendgridWebhook + * @property \Integration\MailgunWebhook $mailgunWebhook * @property \Model\Acl $acl * @property \Model\Authentication $authentication * @property \Model\Action $action diff --git a/app/Controller/Project.php b/app/Controller/Project.php index 165ed2df..185c55be 100644 --- a/app/Controller/Project.php +++ b/app/Controller/Project.php @@ -405,7 +405,7 @@ class Project extends Base $project = $this->project->getByToken($token); // Token verification - if (! $project) { + if (empty($project)) { $this->forbidden(true); } @@ -531,13 +531,12 @@ class Project extends Base $project_id = $this->project->create($values, $this->userSession->getId(), true); - if ($project_id) { + if ($project_id > 0) { $this->session->flash(t('Your project have been created successfully.')); $this->response->redirect('?controller=project&action=show&project_id='.$project_id); } - else { - $this->session->flashError(t('Unable to create your project.')); - } + + $this->session->flashError(t('Unable to create your project.')); } $this->create($values, $errors); -- cgit v1.2.3