Various fixes for PHPAnalyzer

This commit is contained in:
Frederic Guillot
2015-04-03 18:32:51 -04:00
parent 91a5ec0885
commit 5a29cccc95
30 changed files with 48 additions and 38 deletions

View File

@@ -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,