diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-04-03 18:32:51 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-04-03 18:32:51 -0400 |
commit | 5a29cccc959dfd0be5fdc279ac1170d2db0b3040 (patch) | |
tree | 1ea6c149e9b50f95313454bfbcb4f614180d70a5 /app/Integration/GithubWebhook.php | |
parent | 91a5ec08856f5ef6a64d181ef4de700c0436026b (diff) |
Various fixes for PHPAnalyzer
Diffstat (limited to 'app/Integration/GithubWebhook.php')
-rw-r--r-- | app/Integration/GithubWebhook.php | 16 |
1 files changed, 8 insertions, 8 deletions
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, |