summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-05-09 23:08:16 -0400
committerFrederic Guillot <fred@kanboard.net>2015-05-09 23:08:16 -0400
commit98aab0d99465b40907bbc1f1108ea20db290e036 (patch)
tree91c8939a98e13d998a5b33d58d61e9db920cafc0
parent4641d4cf77aac54b1c5688a10e78642b8cda2e87 (diff)
Fix some php analyzer issues
-rw-r--r--app/Controller/Base.php3
-rw-r--r--app/Controller/Project.php9
-rw-r--r--app/Integration/Base.php1
-rw-r--r--app/Model/Base.php2
-rw-r--r--app/Subscriber/Base.php2
5 files changed, 10 insertions, 7 deletions
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);
diff --git a/app/Integration/Base.php b/app/Integration/Base.php
index 9daa3eb0..53f0ae8a 100644
--- a/app/Integration/Base.php
+++ b/app/Integration/Base.php
@@ -15,6 +15,7 @@ use Pimple\Container;
* @property \Model\Task $task
* @property \Model\TaskFinder $taskFinder
* @property \Model\User $user
+ * @property \Model\Project $project
*/
abstract class Base
{
diff --git a/app/Model/Base.php b/app/Model/Base.php
index b0d82401..b4f9a9e2 100644
--- a/app/Model/Base.php
+++ b/app/Model/Base.php
@@ -46,7 +46,7 @@ use Pimple\Container;
* @property \Model\Timetable $timetable
* @property \Model\TimetableDay $timetableDay
* @property \Model\TimetableExtra $timetableExtra
- * @property \Model\TimetableOff $timetableOfff
+ * @property \Model\TimetableOff $timetableOff
* @property \Model\TimetableWeek $timetableWeek
* @property \Model\SubtaskTimeTracking $subtaskTimeTracking
* @property \Model\User $user
diff --git a/app/Subscriber/Base.php b/app/Subscriber/Base.php
index 97e230b5..95f311e7 100644
--- a/app/Subscriber/Base.php
+++ b/app/Subscriber/Base.php
@@ -11,7 +11,7 @@ use Pimple\Container;
* @author Frederic Guillot
*
* @property \Integration\SlackWebhook $slackWebhook
- * @property \Integration\Hipchat $hipchat
+ * @property \Integration\HipchatWebhook $hipchatWebhook
* @property \Model\Board $board
* @property \Model\Config $config
* @property \Model\Comment $comment