Fix some php analyzer issues
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user