Fix some PHPAnalyzer issues
This commit is contained in:
parent
1522be603b
commit
0a14c8d5e5
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
namespace Auth;
|
||||
|
||||
use Core\Request;
|
||||
use Core\Security;
|
||||
|
||||
/**
|
||||
* ReverseProxy backend
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,6 @@
|
|||
|
||||
namespace Controller;
|
||||
|
||||
use Model\Project as ProjectModel;
|
||||
use Model\User as UserModel;
|
||||
use Core\Security;
|
||||
|
||||
/**
|
||||
* Board controller
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace Model;
|
||||
|
||||
use LogicException;
|
||||
use SimpleValidator\Validator;
|
||||
use SimpleValidator\Validators;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
namespace Model;
|
||||
|
||||
use Core\Request;
|
||||
use Auth\Database;
|
||||
use SimpleValidator\Validator;
|
||||
use SimpleValidator\Validators;
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class Board extends Base
|
|||
* Get Kanboard default columns
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
* @return string[]
|
||||
*/
|
||||
public function getDefaultColumns()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
namespace Model;
|
||||
|
||||
use SimpleValidator\Validator;
|
||||
use SimpleValidator\Validators;
|
||||
use Core\Translator;
|
||||
use Core\Security;
|
||||
use Core\Session;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ class Swimlane extends Base
|
|||
*
|
||||
* @access public
|
||||
* @param integer $project_id
|
||||
* @return bool
|
||||
* @return integer
|
||||
*/
|
||||
public function getLastPosition($project_id)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ class TaskExport extends Base
|
|||
* Get column titles
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
* @return string[]
|
||||
*/
|
||||
public function getColumns()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue