diff options
Diffstat (limited to 'app/Integration')
-rw-r--r-- | app/Integration/Base.php | 1 | ||||
-rw-r--r-- | app/Integration/BitbucketWebhook.php | 2 | ||||
-rw-r--r-- | app/Integration/GithubWebhook.php | 16 | ||||
-rw-r--r-- | app/Integration/GitlabWebhook.php | 4 | ||||
-rw-r--r-- | app/Integration/Hipchat.php | 2 | ||||
-rw-r--r-- | app/Integration/SlackWebhook.php | 2 |
6 files changed, 14 insertions, 13 deletions
diff --git a/app/Integration/Base.php b/app/Integration/Base.php index babf8c8f..c6387fe2 100644 --- a/app/Integration/Base.php +++ b/app/Integration/Base.php @@ -10,6 +10,7 @@ use Pimple\Container; * @package integration * @author Frederic Guillot * + * @property \Model\ProjectActivity $projectActivity * @property \Model\Task $task * @property \Model\TaskFinder $taskFinder * @property \Model\User $user diff --git a/app/Integration/BitbucketWebhook.php b/app/Integration/BitbucketWebhook.php index ccb89e13..7ff8087e 100644 --- a/app/Integration/BitbucketWebhook.php +++ b/app/Integration/BitbucketWebhook.php @@ -78,7 +78,7 @@ class BitbucketWebhook extends Base $task = $this->taskFinder->getById($task_id); - if (! $task) { + if (empty($task)) { return false; } diff --git a/app/Integration/GithubWebhook.php b/app/Integration/GithubWebhook.php index fd0b49f6..121fdd1b 100644 --- a/app/Integration/GithubWebhook.php +++ b/app/Integration/GithubWebhook.php @@ -86,7 +86,7 @@ class GithubWebhook extends Base $task = $this->taskFinder->getById($task_id); - if (! $task) { + if (empty($task)) { continue; } @@ -142,7 +142,7 @@ class GithubWebhook extends Base $task = $this->taskFinder->getByReference($payload['issue']['number']); $user = $this->user->getByUsername($payload['comment']['user']['login']); - if ($task && $user) { + if (! empty($task) && ! empty($user)) { $event = array( 'project_id' => $this->project_id, @@ -198,7 +198,7 @@ class GithubWebhook extends Base { $task = $this->taskFinder->getByReference($issue['number']); - if ($task) { + if (! empty($task)) { $event = array( 'project_id' => $this->project_id, 'task_id' => $task['id'], @@ -227,7 +227,7 @@ class GithubWebhook extends Base { $task = $this->taskFinder->getByReference($issue['number']); - if ($task) { + if (! empty($task)) { $event = array( 'project_id' => $this->project_id, 'task_id' => $task['id'], @@ -257,7 +257,7 @@ class GithubWebhook extends Base $user = $this->user->getByUsername($issue['assignee']['login']); $task = $this->taskFinder->getByReference($issue['number']); - if ($user && $task) { + if (! empty($user) && ! empty($task)) { $event = array( 'project_id' => $this->project_id, @@ -288,7 +288,7 @@ class GithubWebhook extends Base { $task = $this->taskFinder->getByReference($issue['number']); - if ($task) { + if (! empty($task)) { $event = array( 'project_id' => $this->project_id, @@ -320,7 +320,7 @@ class GithubWebhook extends Base { $task = $this->taskFinder->getByReference($issue['number']); - if ($task) { + if (! empty($task)) { $event = array( 'project_id' => $this->project_id, @@ -352,7 +352,7 @@ class GithubWebhook extends Base { $task = $this->taskFinder->getByReference($issue['number']); - if ($task) { + if (! empty($task)) { $event = array( 'project_id' => $this->project_id, diff --git a/app/Integration/GitlabWebhook.php b/app/Integration/GitlabWebhook.php index e920f33d..dbba3663 100644 --- a/app/Integration/GitlabWebhook.php +++ b/app/Integration/GitlabWebhook.php @@ -122,7 +122,7 @@ class GitlabWebhook extends Base $task = $this->taskFinder->getById($task_id); - if (! $task) { + if (empty($task)) { return false; } @@ -193,7 +193,7 @@ class GitlabWebhook extends Base { $task = $this->taskFinder->getByReference($issue['id']); - if ($task) { + if (! empty($task)) { $event = array( 'project_id' => $this->project_id, 'task_id' => $task['id'], diff --git a/app/Integration/Hipchat.php b/app/Integration/Hipchat.php index 036925f7..1306af6d 100644 --- a/app/Integration/Hipchat.php +++ b/app/Integration/Hipchat.php @@ -17,7 +17,7 @@ class Hipchat extends Base * @param integer $project_id Project id * @param integer $task_id Task id * @param string $event_name Event name - * @param array $data Event data + * @param array $event Event data */ public function notify($project_id, $task_id, $event_name, array $event) { diff --git a/app/Integration/SlackWebhook.php b/app/Integration/SlackWebhook.php index fc7daeb4..1c2ea781 100644 --- a/app/Integration/SlackWebhook.php +++ b/app/Integration/SlackWebhook.php @@ -17,7 +17,7 @@ class SlackWebhook extends Base * @param integer $project_id Project id * @param integer $task_id Task id * @param string $event_name Event name - * @param array $data Event data + * @param array $event Event data */ public function notify($project_id, $task_id, $event_name, array $event) { |