Run php-cs-fixer on the code base
This commit is contained in:
@@ -80,7 +80,6 @@ class BitbucketWebhook extends \Kanboard\Core\Base
|
||||
$task = $this->taskFinder->getByReference($this->project_id, $payload['issue']['id']);
|
||||
|
||||
if (! empty($task)) {
|
||||
|
||||
$user = $this->user->getByUsername($payload['actor']['username']);
|
||||
|
||||
if (! empty($user) && ! $this->projectPermission->isMember($this->project_id, $user['id'])) {
|
||||
@@ -147,8 +146,7 @@ class BitbucketWebhook extends \Kanboard\Core\Base
|
||||
|
||||
if (isset($payload['changes']['status'])) {
|
||||
return $this->handleStatusChange($task, $payload);
|
||||
}
|
||||
else if (isset($payload['changes']['assignee'])) {
|
||||
} elseif (isset($payload['changes']['assignee'])) {
|
||||
return $this->handleAssigneeChange($task, $payload);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,6 @@ class GithubWebhook extends \Kanboard\Core\Base
|
||||
public function parsePushEvent(array $payload)
|
||||
{
|
||||
foreach ($payload['commits'] as $commit) {
|
||||
|
||||
$task_id = $this->task->getTaskIdFromText($commit['message']);
|
||||
|
||||
if (empty($task_id)) {
|
||||
@@ -149,7 +148,6 @@ class GithubWebhook extends \Kanboard\Core\Base
|
||||
$task = $this->taskFinder->getByReference($this->project_id, $payload['issue']['number']);
|
||||
|
||||
if (! empty($task)) {
|
||||
|
||||
$user = $this->user->getByUsername($payload['comment']['user']['login']);
|
||||
|
||||
if (! empty($user) && ! $this->projectPermission->isMember($this->project_id, $user['id'])) {
|
||||
@@ -270,7 +268,6 @@ class GithubWebhook extends \Kanboard\Core\Base
|
||||
$task = $this->taskFinder->getByReference($this->project_id, $issue['number']);
|
||||
|
||||
if (! empty($user) && ! empty($task) && $this->projectPermission->isMember($this->project_id, $user['id'])) {
|
||||
|
||||
$event = array(
|
||||
'project_id' => $this->project_id,
|
||||
'task_id' => $task['id'],
|
||||
@@ -301,7 +298,6 @@ class GithubWebhook extends \Kanboard\Core\Base
|
||||
$task = $this->taskFinder->getByReference($this->project_id, $issue['number']);
|
||||
|
||||
if (! empty($task)) {
|
||||
|
||||
$event = array(
|
||||
'project_id' => $this->project_id,
|
||||
'task_id' => $task['id'],
|
||||
@@ -333,7 +329,6 @@ class GithubWebhook extends \Kanboard\Core\Base
|
||||
$task = $this->taskFinder->getByReference($this->project_id, $issue['number']);
|
||||
|
||||
if (! empty($task)) {
|
||||
|
||||
$event = array(
|
||||
'project_id' => $this->project_id,
|
||||
'task_id' => $task['id'],
|
||||
@@ -365,7 +360,6 @@ class GithubWebhook extends \Kanboard\Core\Base
|
||||
$task = $this->taskFinder->getByReference($this->project_id, $issue['number']);
|
||||
|
||||
if (! empty($task)) {
|
||||
|
||||
$event = array(
|
||||
'project_id' => $this->project_id,
|
||||
'task_id' => $task['id'],
|
||||
|
||||
@@ -239,7 +239,6 @@ class GitlabWebhook extends \Kanboard\Core\Base
|
||||
$task = $this->taskFinder->getByReference($this->project_id, $payload['issue']['id']);
|
||||
|
||||
if (! empty($task)) {
|
||||
|
||||
$user = $this->user->getByUsername($payload['user']['username']);
|
||||
|
||||
if (! empty($user) && ! $this->projectPermission->isMember($this->project_id, $user['id'])) {
|
||||
|
||||
@@ -60,7 +60,6 @@ class HipchatWebhook extends \Kanboard\Core\Base
|
||||
public function notify($project_id, $task_id, $event_name, array $event)
|
||||
{
|
||||
if ($this->isActivated($project_id)) {
|
||||
|
||||
$params = $this->getParameters($project_id);
|
||||
$project = $this->project->getbyId($project_id);
|
||||
|
||||
|
||||
@@ -72,7 +72,6 @@ class Jabber extends \Kanboard\Core\Base
|
||||
public function notify($project_id, $task_id, $event_name, array $event)
|
||||
{
|
||||
if ($this->isActivated($project_id)) {
|
||||
|
||||
$project = $this->project->getbyId($project_id);
|
||||
|
||||
$event['event_name'] = $event_name;
|
||||
@@ -98,7 +97,6 @@ class Jabber extends \Kanboard\Core\Base
|
||||
public function sendMessage($project_id, $payload)
|
||||
{
|
||||
try {
|
||||
|
||||
$params = $this->getParameters($project_id);
|
||||
|
||||
$options = new Options($params['server']);
|
||||
@@ -121,8 +119,7 @@ class Jabber extends \Kanboard\Core\Base
|
||||
$client->send($message);
|
||||
|
||||
$client->disconnect();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
$this->container['logger']->error('Jabber error: '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,6 @@ class SlackWebhook extends \Kanboard\Core\Base
|
||||
public function notify($project_id, $task_id, $event_name, array $event)
|
||||
{
|
||||
if ($this->isActivated($project_id)) {
|
||||
|
||||
$project = $this->project->getbyId($project_id);
|
||||
|
||||
$event['event_name'] = $event_name;
|
||||
|
||||
Reference in New Issue
Block a user