Fix some PHPAnalyzer issues
This commit is contained in:
@@ -191,7 +191,6 @@ abstract class Base
|
|||||||
* Check if the event is compatible with the action
|
* Check if the event is compatible with the action
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $data Event data dictionary
|
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function hasCompatibleEvent()
|
public function hasCompatibleEvent()
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
namespace Auth;
|
namespace Auth;
|
||||||
|
|
||||||
use Core\Request;
|
use Core\Request;
|
||||||
use Core\Security;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ReverseProxy backend
|
* ReverseProxy backend
|
||||||
|
|||||||
@@ -3,9 +3,7 @@
|
|||||||
namespace Console;
|
namespace Console;
|
||||||
|
|
||||||
use Model\Project;
|
use Model\Project;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class ProjectDailySummaryCalculation extends Base
|
class ProjectDailySummaryCalculation extends Base
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ namespace Console;
|
|||||||
use Core\Tool;
|
use Core\Tool;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class ProjectDailySummaryExport extends Base
|
class ProjectDailySummaryExport extends Base
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ namespace Console;
|
|||||||
use Core\Tool;
|
use Core\Tool;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class TaskExport extends Base
|
class TaskExport extends Base
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
namespace Console;
|
namespace Console;
|
||||||
|
|
||||||
use Symfony\Component\Console\Helper\Table;
|
use Symfony\Component\Console\Helper\Table;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace Controller;
|
namespace Controller;
|
||||||
|
|
||||||
use Model\Project as ProjectModel;
|
|
||||||
use Model\SubTask as SubTaskModel;
|
use Model\SubTask as SubTaskModel;
|
||||||
use Helper;
|
use Helper;
|
||||||
|
|
||||||
@@ -57,6 +56,11 @@ class App extends Base
|
|||||||
* Get tasks pagination
|
* Get tasks pagination
|
||||||
*
|
*
|
||||||
* @access public
|
* @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)
|
private function getTaskPagination($user_id, $paginate, $offset, $order, $direction)
|
||||||
{
|
{
|
||||||
@@ -94,6 +98,11 @@ class App extends Base
|
|||||||
* Get subtasks pagination
|
* Get subtasks pagination
|
||||||
*
|
*
|
||||||
* @access public
|
* @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)
|
private function getSubtaskPagination($user_id, $paginate, $offset, $order, $direction)
|
||||||
{
|
{
|
||||||
@@ -132,8 +141,13 @@ class App extends Base
|
|||||||
* Get projects pagination
|
* Get projects pagination
|
||||||
*
|
*
|
||||||
* @access public
|
* @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;
|
$limit = 5;
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,6 @@
|
|||||||
|
|
||||||
namespace Controller;
|
namespace Controller;
|
||||||
|
|
||||||
use Model\Project as ProjectModel;
|
|
||||||
use Model\User as UserModel;
|
|
||||||
use Core\Security;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Board controller
|
* Board controller
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
namespace Controller;
|
namespace Controller;
|
||||||
|
|
||||||
use Model\Task as TaskModel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Project controller
|
* Project controller
|
||||||
*
|
*
|
||||||
@@ -249,7 +247,7 @@ class Project extends Base
|
|||||||
|
|
||||||
if ($valid) {
|
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.'));
|
$this->session->flash(t('Project updated successfully.'));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace Model;
|
namespace Model;
|
||||||
|
|
||||||
use LogicException;
|
|
||||||
use SimpleValidator\Validator;
|
use SimpleValidator\Validator;
|
||||||
use SimpleValidator\Validators;
|
use SimpleValidator\Validators;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
namespace Model;
|
namespace Model;
|
||||||
|
|
||||||
use Core\Request;
|
use Core\Request;
|
||||||
use Auth\Database;
|
|
||||||
use SimpleValidator\Validator;
|
use SimpleValidator\Validator;
|
||||||
use SimpleValidator\Validators;
|
use SimpleValidator\Validators;
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ abstract class Base
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $values Input array
|
* @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)
|
public function removeFields(array &$values, array $keys)
|
||||||
{
|
{
|
||||||
@@ -120,8 +120,8 @@ abstract class Base
|
|||||||
* Force some fields to be at 0 if empty
|
* Force some fields to be at 0 if empty
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $values Input array
|
* @param array $values Input array
|
||||||
* @param array $keys List of keys
|
* @param string[] $keys List of keys
|
||||||
*/
|
*/
|
||||||
public function resetFields(array &$values, array $keys)
|
public function resetFields(array &$values, array $keys)
|
||||||
{
|
{
|
||||||
@@ -136,8 +136,8 @@ abstract class Base
|
|||||||
* Force some fields to be integer
|
* Force some fields to be integer
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $values Input array
|
* @param array $values Input array
|
||||||
* @param array $keys List of keys
|
* @param string[] $keys List of keys
|
||||||
*/
|
*/
|
||||||
public function convertIntegerFields(array &$values, array $keys)
|
public function convertIntegerFields(array &$values, array $keys)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class Board extends Base
|
|||||||
* Get Kanboard default columns
|
* Get Kanboard default columns
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return array
|
* @return string[]
|
||||||
*/
|
*/
|
||||||
public function getDefaultColumns()
|
public function getDefaultColumns()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
namespace Model;
|
namespace Model;
|
||||||
|
|
||||||
use SimpleValidator\Validator;
|
|
||||||
use SimpleValidator\Validators;
|
|
||||||
use Core\Translator;
|
use Core\Translator;
|
||||||
use Core\Security;
|
use Core\Security;
|
||||||
use Core\Session;
|
use Core\Session;
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class DateParser extends Base
|
|||||||
* Return the list of supported date formats (for the parser)
|
* Return the list of supported date formats (for the parser)
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return array
|
* @return string[]
|
||||||
*/
|
*/
|
||||||
public function getDateFormats()
|
public function getDateFormats()
|
||||||
{
|
{
|
||||||
@@ -103,7 +103,7 @@ class DateParser extends Base
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $values Database values
|
* @param array $values Database values
|
||||||
* @param array $fields Date fields
|
* @param string[] $fields Date fields
|
||||||
* @param string $format Date format
|
* @param string $format Date format
|
||||||
*/
|
*/
|
||||||
public function format(array &$values, array $fields, $format = '')
|
public function format(array &$values, array $fields, $format = '')
|
||||||
@@ -128,7 +128,7 @@ class DateParser extends Base
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $values Database values
|
* @param array $values Database values
|
||||||
* @param array $fields Date fields
|
* @param string[] $fields Date fields
|
||||||
*/
|
*/
|
||||||
public function convert(array &$values, array $fields)
|
public function convert(array &$values, array $fields)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class LastLogin extends Base
|
|||||||
* @param integer $user_id User id
|
* @param integer $user_id User id
|
||||||
* @param string $ip IP Address
|
* @param string $ip IP Address
|
||||||
* @param string $user_agent User Agent
|
* @param string $user_agent User Agent
|
||||||
* @return array
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function create($auth_type, $user_id, $ip, $user_agent)
|
public function create($auth_type, $user_id, $ip, $user_agent)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,13 +69,13 @@ class ProjectActivity extends Base
|
|||||||
* Get all events for the given projects list
|
* Get all events for the given projects list
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param integer $project_id Project id
|
* @param integer[] $project_ids Projects id
|
||||||
* @param integer $limit Maximum events number
|
* @param integer $limit Maximum events number
|
||||||
* @return array
|
* @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();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ class ProjectActivity extends Base
|
|||||||
User::TABLE.'.username AS author_username',
|
User::TABLE.'.username AS author_username',
|
||||||
User::TABLE.'.name AS author_name'
|
User::TABLE.'.name AS author_name'
|
||||||
)
|
)
|
||||||
->in('project_id', $projects)
|
->in('project_id', $project_ids)
|
||||||
->join(User::TABLE, 'id', 'creator_id')
|
->join(User::TABLE, 'id', 'creator_id')
|
||||||
->desc('id')
|
->desc('id')
|
||||||
->limit($limit)
|
->limit($limit)
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ class ProjectPermission extends Base
|
|||||||
* @access public
|
* @access public
|
||||||
* @param integer $project_id Project id
|
* @param integer $project_id Project id
|
||||||
* @param integer $user_id User 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
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function setOwner($project_id, $user_id, $is_owner = 1)
|
public function setOwner($project_id, $user_id, $is_owner = 1)
|
||||||
@@ -165,7 +165,7 @@ class ProjectPermission extends Base
|
|||||||
return $this->db
|
return $this->db
|
||||||
->table(self::TABLE)
|
->table(self::TABLE)
|
||||||
->eq('project_id', $project_id)
|
->eq('project_id', $project_id)
|
||||||
->eq('user_id', $user_id)
|
->eq('user_id', $user_id)
|
||||||
->update(array('is_owner' => $is_owner));
|
->update(array('is_owner' => $is_owner));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ class Swimlane extends Base
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param integer $project_id
|
* @param integer $project_id
|
||||||
* @return bool
|
* @return integer
|
||||||
*/
|
*/
|
||||||
public function getLastPosition($project_id)
|
public function getLastPosition($project_id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class TaskExport extends Base
|
|||||||
* Get column titles
|
* Get column titles
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return array
|
* @return string[]
|
||||||
*/
|
*/
|
||||||
public function getColumns()
|
public function getColumns()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ class TaskPaginator extends Base
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param integer $project_id Project id
|
* @param integer $project_id Project id
|
||||||
* @param array $status List of status id
|
|
||||||
* @return integer
|
* @return integer
|
||||||
*/
|
*/
|
||||||
public function countClosedTasks($project_id)
|
public function countClosedTasks($project_id)
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ class TaskPosition extends Base
|
|||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
* @param array $columns Sorted tasks
|
* @param array $columns Sorted tasks
|
||||||
|
* @param integer $swimlane_id Swimlane id
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
private function savePositions(array $columns, $swimlane_id)
|
private function savePositions(array $columns, $swimlane_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user