summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.scrutinizer.yml4
-rw-r--r--app/Controller/Comment.php4
-rw-r--r--app/Controller/Taskduplication.php6
-rw-r--r--app/Core/Base.php4
-rw-r--r--app/Core/Paginator.php2
-rw-r--r--app/Integration/Jabber.php2
-rw-r--r--app/Model/Action.php4
-rw-r--r--app/Model/Board.php2
-rw-r--r--app/Model/DateParser.php2
9 files changed, 18 insertions, 12 deletions
diff --git a/.scrutinizer.yml b/.scrutinizer.yml
index a8a346f1..25ef09c4 100644
--- a/.scrutinizer.yml
+++ b/.scrutinizer.yml
@@ -5,3 +5,7 @@ filter:
- app/Schema/*
- app/Template/*
- app/Locale/*
+ - app/Library/*
+ - app/constants.php
+ - app/common.php
+ - app/check_setup.php
diff --git a/app/Controller/Comment.php b/app/Controller/Comment.php
index 7b9d4aee..81fd7215 100644
--- a/app/Controller/Comment.php
+++ b/app/Controller/Comment.php
@@ -140,7 +140,7 @@ class Comment extends Base
$this->session->flashError(t('Unable to update your comment.'));
}
- $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), 'comment-'.$comment['id']);
+ $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comment-'.$comment['id']));
}
$this->edit($values, $errors);
@@ -181,6 +181,6 @@ class Comment extends Base
$this->session->flashError(t('Unable to remove this comment.'));
}
- $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), 'comments');
+ $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comments'));
}
}
diff --git a/app/Controller/Taskduplication.php b/app/Controller/Taskduplication.php
index 91291b0d..aebbcfc1 100644
--- a/app/Controller/Taskduplication.php
+++ b/app/Controller/Taskduplication.php
@@ -50,7 +50,7 @@ class Taskduplication extends Base
if ($this->request->isPost()) {
$values = $this->request->getValues();
- list($valid, $errors) = $this->taskValidator->validateProjectModification($values);
+ list($valid,) = $this->taskValidator->validateProjectModification($values);
if ($valid && $this->taskDuplication->moveToProject($task['id'],
$values['project_id'],
@@ -81,7 +81,7 @@ class Taskduplication extends Base
if ($this->request->isPost()) {
$values = $this->request->getValues();
- list($valid, $errors) = $this->taskValidator->validateProjectModification($values);
+ list($valid,) = $this->taskValidator->validateProjectModification($values);
if ($valid && $this->taskDuplication->duplicateToProject($task['id'],
$values['project_id'],
@@ -104,6 +104,8 @@ class Taskduplication extends Base
* Choose destination when move/copy task to another project
*
* @access private
+ * @param array $task
+ * @param string $template
*/
private function chooseDestination(array $task, $template)
{
diff --git a/app/Core/Base.php b/app/Core/Base.php
index 14466d5c..3db0cf74 100644
--- a/app/Core/Base.php
+++ b/app/Core/Base.php
@@ -18,6 +18,9 @@ use Pimple\Container;
* @property \Core\Session $session
* @property \Core\Template $template
* @property \Core\MemoryCache $memoryCache
+ * @property \Core\OAuth2 $oauth
+ * @property \Core\Router $router
+ * @property \Core\Lexer $lexer
* @property \Integration\BitbucketWebhook $bitbucketWebhook
* @property \Integration\GithubWebhook $githubWebhook
* @property \Integration\GitlabWebhook $gitlabWebhook
@@ -58,6 +61,7 @@ use Pimple\Container;
* @property \Model\SubtaskTimeTracking $subtaskTimeTracking
* @property \Model\Swimlane $swimlane
* @property \Model\Task $task
+ * @property \Model\TaskAnalytic $taskAnalytic
* @property \Model\TaskCreation $taskCreation
* @property \Model\TaskDuplication $taskDuplication
* @property \Model\TaskExport $taskExport
diff --git a/app/Core/Paginator.php b/app/Core/Paginator.php
index 12cc05a1..d00df7ce 100644
--- a/app/Core/Paginator.php
+++ b/app/Core/Paginator.php
@@ -313,7 +313,7 @@ class Paginator
$this->page = 1;
}
- $this->offset = ($this->page - 1) * $this->limit;
+ $this->offset = (int) (($this->page - 1) * $this->limit);
return $this;
}
diff --git a/app/Integration/Jabber.php b/app/Integration/Jabber.php
index 3e403aab..eaf1c5a8 100644
--- a/app/Integration/Jabber.php
+++ b/app/Integration/Jabber.php
@@ -81,7 +81,7 @@ class Jabber extends \Core\Base
$payload = '['.$project['name'].'] '.str_replace('"', '"', $this->projectActivity->getTitle($event)).(isset($event['task']['title']) ? ' ('.$event['task']['title'].')' : '');
if ($this->config->get('application_url')) {
- $payload .= ' '.$this->helper->url->to('task', 'show', array('task_id' => $task_id, 'project_id' => $project_id), false, '', true);
+ $payload .= ' '.$this->helper->url->to('task', 'show', array('task_id' => $task_id, 'project_id' => $project_id), '', true);
}
$this->sendMessage($project_id, $payload);
diff --git a/app/Model/Action.php b/app/Model/Action.php
index 5e994c99..3759653d 100644
--- a/app/Model/Action.php
+++ b/app/Model/Action.php
@@ -216,7 +216,6 @@ class Action extends Base
*/
public function remove($action_id)
{
- // $this->container['fileCache']->remove('proxy_action_getAll');
return $this->db->table(self::TABLE)->eq('id', $action_id)->remove();
}
@@ -260,8 +259,6 @@ class Action extends Base
$this->db->closeTransaction();
- // $this->container['fileCache']->remove('proxy_action_getAll');
-
return $action_id;
}
@@ -272,7 +269,6 @@ class Action extends Base
*/
public function attachEvents()
{
- //$actions = $this->container['fileCache']->proxy('action', 'getAll');
$actions = $this->getAll();
foreach ($actions as $action) {
diff --git a/app/Model/Board.php b/app/Model/Board.php
index bcf77b3e..b1032e90 100644
--- a/app/Model/Board.php
+++ b/app/Model/Board.php
@@ -281,7 +281,7 @@ class Board extends Base
$sum = 0;
foreach ($tasks as $task) {
- $sum += $task['score'];
+ $sum += $task[$field];
}
return $sum;
diff --git a/app/Model/DateParser.php b/app/Model/DateParser.php
index 79a8385c..036725e3 100644
--- a/app/Model/DateParser.php
+++ b/app/Model/DateParser.php
@@ -100,7 +100,7 @@ class DateParser extends Base
* Get all combinations of date/time formats
*
* @access public
- * @return []string
+ * @return string[]
*/
public function getAllFormats()
{