summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Action/Base.php1
-rw-r--r--app/Auth/ReverseProxy.php1
-rw-r--r--app/Console/ProjectDailySummaryCalculation.php2
-rw-r--r--app/Console/ProjectDailySummaryExport.php1
-rw-r--r--app/Console/TaskExport.php1
-rw-r--r--app/Console/TaskOverdueNotification.php1
-rw-r--r--app/Controller/App.php18
-rw-r--r--app/Controller/Board.php4
-rw-r--r--app/Controller/Project.php4
-rw-r--r--app/Model/Action.php1
-rw-r--r--app/Model/Authentication.php1
-rw-r--r--app/Model/Base.php10
-rw-r--r--app/Model/Board.php2
-rw-r--r--app/Model/Config.php2
-rw-r--r--app/Model/DateParser.php6
-rw-r--r--app/Model/LastLogin.php2
-rw-r--r--app/Model/ProjectActivity.php8
-rw-r--r--app/Model/ProjectPermission.php4
-rw-r--r--app/Model/Swimlane.php2
-rw-r--r--app/Model/TaskExport.php2
-rw-r--r--app/Model/TaskPaginator.php1
-rw-r--r--app/Model/TaskPosition.php1
22 files changed, 36 insertions, 39 deletions
diff --git a/app/Action/Base.php b/app/Action/Base.php
index 70dd871d..5133c7db 100644
--- a/app/Action/Base.php
+++ b/app/Action/Base.php
@@ -191,7 +191,6 @@ abstract class Base
* Check if the event is compatible with the action
*
* @access public
- * @param array $data Event data dictionary
* @return bool
*/
public function hasCompatibleEvent()
diff --git a/app/Auth/ReverseProxy.php b/app/Auth/ReverseProxy.php
index 5aca881a..23e71a22 100644
--- a/app/Auth/ReverseProxy.php
+++ b/app/Auth/ReverseProxy.php
@@ -3,7 +3,6 @@
namespace Auth;
use Core\Request;
-use Core\Security;
/**
* ReverseProxy backend
diff --git a/app/Console/ProjectDailySummaryCalculation.php b/app/Console/ProjectDailySummaryCalculation.php
index 04c4083d..b2ada1b6 100644
--- a/app/Console/ProjectDailySummaryCalculation.php
+++ b/app/Console/ProjectDailySummaryCalculation.php
@@ -3,9 +3,7 @@
namespace Console;
use Model\Project;
-use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class ProjectDailySummaryCalculation extends Base
diff --git a/app/Console/ProjectDailySummaryExport.php b/app/Console/ProjectDailySummaryExport.php
index 6b96fddd..07841d52 100644
--- a/app/Console/ProjectDailySummaryExport.php
+++ b/app/Console/ProjectDailySummaryExport.php
@@ -5,7 +5,6 @@ namespace Console;
use Core\Tool;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class ProjectDailySummaryExport extends Base
diff --git a/app/Console/TaskExport.php b/app/Console/TaskExport.php
index dea71fe6..2ecd45e5 100644
--- a/app/Console/TaskExport.php
+++ b/app/Console/TaskExport.php
@@ -5,7 +5,6 @@ namespace Console;
use Core\Tool;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class TaskExport extends Base
diff --git a/app/Console/TaskOverdueNotification.php b/app/Console/TaskOverdueNotification.php
index aa70fd01..86a7d1b9 100644
--- a/app/Console/TaskOverdueNotification.php
+++ b/app/Console/TaskOverdueNotification.php
@@ -3,7 +3,6 @@
namespace Console;
use Symfony\Component\Console\Helper\Table;
-use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
diff --git a/app/Controller/App.php b/app/Controller/App.php
index c88fd928..eb1d83af 100644
--- a/app/Controller/App.php
+++ b/app/Controller/App.php
@@ -2,7 +2,6 @@
namespace Controller;
-use Model\Project as ProjectModel;
use Model\SubTask as SubTaskModel;
use Helper;
@@ -57,6 +56,11 @@ class App extends Base
* Get tasks pagination
*
* @access public
+ * @param integer $user_id
+ * @param string $paginate
+ * @param integer $offset
+ * @param string $order
+ * @param string $direction
*/
private function getTaskPagination($user_id, $paginate, $offset, $order, $direction)
{
@@ -94,6 +98,11 @@ class App extends Base
* Get subtasks pagination
*
* @access public
+ * @param integer $user_id
+ * @param string $paginate
+ * @param integer $offset
+ * @param string $order
+ * @param string $direction
*/
private function getSubtaskPagination($user_id, $paginate, $offset, $order, $direction)
{
@@ -132,8 +141,13 @@ class App extends Base
* Get projects pagination
*
* @access public
+ * @param array $project_ids
+ * @param string $paginate
+ * @param integer $offset
+ * @param string $order
+ * @param string $direction
*/
- private function getProjectPagination($project_ids, $paginate, $offset, $order, $direction)
+ private function getProjectPagination(array $project_ids, $paginate, $offset, $order, $direction)
{
$limit = 5;
diff --git a/app/Controller/Board.php b/app/Controller/Board.php
index c5823328..072acf26 100644
--- a/app/Controller/Board.php
+++ b/app/Controller/Board.php
@@ -2,10 +2,6 @@
namespace Controller;
-use Model\Project as ProjectModel;
-use Model\User as UserModel;
-use Core\Security;
-
/**
* Board controller
*
diff --git a/app/Controller/Project.php b/app/Controller/Project.php
index d407c17e..5395a5a4 100644
--- a/app/Controller/Project.php
+++ b/app/Controller/Project.php
@@ -2,8 +2,6 @@
namespace Controller;
-use Model\Task as TaskModel;
-
/**
* Project controller
*
@@ -249,7 +247,7 @@ class Project extends Base
if ($valid) {
- if ($this->projectPermission->allowUser($values['project_id'], $values['user_id'], $values['is_owner'])) {
+ if ($this->projectPermission->allowUser($values['project_id'], $values['user_id'])) {
$this->session->flash(t('Project updated successfully.'));
}
else {
diff --git a/app/Model/Action.php b/app/Model/Action.php
index 3ed3dc26..36e0aa62 100644
--- a/app/Model/Action.php
+++ b/app/Model/Action.php
@@ -2,7 +2,6 @@
namespace Model;
-use LogicException;
use SimpleValidator\Validator;
use SimpleValidator\Validators;
diff --git a/app/Model/Authentication.php b/app/Model/Authentication.php
index a0e9684f..87493c88 100644
--- a/app/Model/Authentication.php
+++ b/app/Model/Authentication.php
@@ -3,7 +3,6 @@
namespace Model;
use Core\Request;
-use Auth\Database;
use SimpleValidator\Validator;
use SimpleValidator\Validators;
diff --git a/app/Model/Base.php b/app/Model/Base.php
index a08bd87c..ed96e5be 100644
--- a/app/Model/Base.php
+++ b/app/Model/Base.php
@@ -105,7 +105,7 @@ abstract class Base
*
* @access public
* @param array $values Input array
- * @param array $keys List of keys to remove
+ * @param string[] $keys List of keys to remove
*/
public function removeFields(array &$values, array $keys)
{
@@ -120,8 +120,8 @@ abstract class Base
* Force some fields to be at 0 if empty
*
* @access public
- * @param array $values Input array
- * @param array $keys List of keys
+ * @param array $values Input array
+ * @param string[] $keys List of keys
*/
public function resetFields(array &$values, array $keys)
{
@@ -136,8 +136,8 @@ abstract class Base
* Force some fields to be integer
*
* @access public
- * @param array $values Input array
- * @param array $keys List of keys
+ * @param array $values Input array
+ * @param string[] $keys List of keys
*/
public function convertIntegerFields(array &$values, array $keys)
{
diff --git a/app/Model/Board.php b/app/Model/Board.php
index 8208b99d..41e9b441 100644
--- a/app/Model/Board.php
+++ b/app/Model/Board.php
@@ -24,7 +24,7 @@ class Board extends Base
* Get Kanboard default columns
*
* @access public
- * @return array
+ * @return string[]
*/
public function getDefaultColumns()
{
diff --git a/app/Model/Config.php b/app/Model/Config.php
index 599107de..16e9bf45 100644
--- a/app/Model/Config.php
+++ b/app/Model/Config.php
@@ -2,8 +2,6 @@
namespace Model;
-use SimpleValidator\Validator;
-use SimpleValidator\Validators;
use Core\Translator;
use Core\Security;
use Core\Session;
diff --git a/app/Model/DateParser.php b/app/Model/DateParser.php
index 38265f98..518a4f3f 100644
--- a/app/Model/DateParser.php
+++ b/app/Model/DateParser.php
@@ -60,7 +60,7 @@ class DateParser extends Base
* Return the list of supported date formats (for the parser)
*
* @access public
- * @return array
+ * @return string[]
*/
public function getDateFormats()
{
@@ -103,7 +103,7 @@ class DateParser extends Base
*
* @access public
* @param array $values Database values
- * @param array $fields Date fields
+ * @param string[] $fields Date fields
* @param string $format Date format
*/
public function format(array &$values, array $fields, $format = '')
@@ -128,7 +128,7 @@ class DateParser extends Base
*
* @access public
* @param array $values Database values
- * @param array $fields Date fields
+ * @param string[] $fields Date fields
*/
public function convert(array &$values, array $fields)
{
diff --git a/app/Model/LastLogin.php b/app/Model/LastLogin.php
index 3391db50..dd64284e 100644
--- a/app/Model/LastLogin.php
+++ b/app/Model/LastLogin.php
@@ -32,7 +32,7 @@ class LastLogin extends Base
* @param integer $user_id User id
* @param string $ip IP Address
* @param string $user_agent User Agent
- * @return array
+ * @return boolean
*/
public function create($auth_type, $user_id, $ip, $user_agent)
{
diff --git a/app/Model/ProjectActivity.php b/app/Model/ProjectActivity.php
index b0a079dc..bc2948f0 100644
--- a/app/Model/ProjectActivity.php
+++ b/app/Model/ProjectActivity.php
@@ -69,13 +69,13 @@ class ProjectActivity extends Base
* Get all events for the given projects list
*
* @access public
- * @param integer $project_id Project id
+ * @param integer[] $project_ids Projects id
* @param integer $limit Maximum events number
* @return array
*/
- public function getProjects(array $projects, $limit = 50)
+ public function getProjects(array $project_ids, $limit = 50)
{
- if (empty($projects)) {
+ if (empty($project_ids)) {
return array();
}
@@ -85,7 +85,7 @@ class ProjectActivity extends Base
User::TABLE.'.username AS author_username',
User::TABLE.'.name AS author_name'
)
- ->in('project_id', $projects)
+ ->in('project_id', $project_ids)
->join(User::TABLE, 'id', 'creator_id')
->desc('id')
->limit($limit)
diff --git a/app/Model/ProjectPermission.php b/app/Model/ProjectPermission.php
index aaff5e69..3b42751a 100644
--- a/app/Model/ProjectPermission.php
+++ b/app/Model/ProjectPermission.php
@@ -157,7 +157,7 @@ class ProjectPermission extends Base
* @access public
* @param integer $project_id Project id
* @param integer $user_id User id
- * @param bool $is_owner Is user owner of the project
+ * @param integer $is_owner Is user owner of the project
* @return bool
*/
public function setOwner($project_id, $user_id, $is_owner = 1)
@@ -165,7 +165,7 @@ class ProjectPermission extends Base
return $this->db
->table(self::TABLE)
->eq('project_id', $project_id)
- ->eq('user_id', $user_id)
+ ->eq('user_id', $user_id)
->update(array('is_owner' => $is_owner));
}
diff --git a/app/Model/Swimlane.php b/app/Model/Swimlane.php
index ffcfb474..c9c080af 100644
--- a/app/Model/Swimlane.php
+++ b/app/Model/Swimlane.php
@@ -211,7 +211,7 @@ class Swimlane extends Base
*
* @access public
* @param integer $project_id
- * @return bool
+ * @return integer
*/
public function getLastPosition($project_id)
{
diff --git a/app/Model/TaskExport.php b/app/Model/TaskExport.php
index b929823e..fc581a3c 100644
--- a/app/Model/TaskExport.php
+++ b/app/Model/TaskExport.php
@@ -108,7 +108,7 @@ class TaskExport extends Base
* Get column titles
*
* @access public
- * @return array
+ * @return string[]
*/
public function getColumns()
{
diff --git a/app/Model/TaskPaginator.php b/app/Model/TaskPaginator.php
index bf537fbe..e8109229 100644
--- a/app/Model/TaskPaginator.php
+++ b/app/Model/TaskPaginator.php
@@ -76,7 +76,6 @@ class TaskPaginator extends Base
*
* @access public
* @param integer $project_id Project id
- * @param array $status List of status id
* @return integer
*/
public function countClosedTasks($project_id)
diff --git a/app/Model/TaskPosition.php b/app/Model/TaskPosition.php
index e5152b0b..a1e4152c 100644
--- a/app/Model/TaskPosition.php
+++ b/app/Model/TaskPosition.php
@@ -93,6 +93,7 @@ class TaskPosition extends Base
*
* @access private
* @param array $columns Sorted tasks
+ * @param integer $swimlane_id Swimlane id
* @return boolean
*/
private function savePositions(array $columns, $swimlane_id)