Fix qodana
This commit is contained in:
parent
0a07ab199b
commit
27792fe1ad
@ -112,7 +112,7 @@ class Orders extends DolibarrApi
|
|||||||
* @param string $ref Ref of object
|
* @param string $ref Ref of object
|
||||||
* @param string $ref_ext External reference of object
|
* @param string $ref_ext External reference of object
|
||||||
* @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id
|
* @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id
|
||||||
* @return array|mixed data without useless information
|
* @return Object Object with cleaned properties
|
||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -123,7 +123,7 @@ class BankAccounts extends DolibarrApi
|
|||||||
* Get account by ID.
|
* Get account by ID.
|
||||||
*
|
*
|
||||||
* @param int $id ID of account
|
* @param int $id ID of account
|
||||||
* @return array Account object
|
* @return Object Object with cleaned properties
|
||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
@ -315,7 +315,7 @@ class BankAccounts extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @param int $id ID of account
|
* @param int $id ID of account
|
||||||
* @param array $request_data data
|
* @param array $request_data data
|
||||||
* @return int
|
* @return Object Object with cleaned properties
|
||||||
*/
|
*/
|
||||||
public function put($id, $request_data = null)
|
public function put($id, $request_data = null)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -351,16 +351,18 @@ class Comment extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load comments linked with current task
|
* Load comments linked with current task into ->comments
|
||||||
*
|
*
|
||||||
* @param string $element_type Element type
|
* @param string $element_type Element type
|
||||||
* @param int $fk_element Id of element
|
* @param int $fk_element Id of element
|
||||||
* @return array Comment array
|
* @return int Result
|
||||||
*/
|
*/
|
||||||
public function fetchAllFor($element_type, $fk_element)
|
public function fetchAllFor($element_type, $fk_element)
|
||||||
{
|
{
|
||||||
global $db, $conf;
|
global $db, $conf;
|
||||||
|
|
||||||
$this->comments = array();
|
$this->comments = array();
|
||||||
|
|
||||||
if (!empty($element_type) && !empty($fk_element)) {
|
if (!empty($element_type) && !empty($fk_element)) {
|
||||||
$sql = "SELECT";
|
$sql = "SELECT";
|
||||||
$sql .= " c.rowid";
|
$sql .= " c.rowid";
|
||||||
|
|||||||
@ -198,9 +198,9 @@ class EvalMath
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* vars
|
* Function vars
|
||||||
*
|
*
|
||||||
* @return string Output
|
* @return array Output
|
||||||
*/
|
*/
|
||||||
public function vars()
|
public function vars()
|
||||||
{
|
{
|
||||||
@ -211,9 +211,9 @@ class EvalMath
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* vars
|
* Function funcs
|
||||||
*
|
*
|
||||||
* @return string Output
|
* @return array Output
|
||||||
*/
|
*/
|
||||||
private function funcs()
|
private function funcs()
|
||||||
{
|
{
|
||||||
@ -230,7 +230,7 @@ class EvalMath
|
|||||||
* Convert infix to postfix notation
|
* Convert infix to postfix notation
|
||||||
*
|
*
|
||||||
* @param string $expr Expression
|
* @param string $expr Expression
|
||||||
* @return string Output
|
* @return boolean|array Output
|
||||||
*/
|
*/
|
||||||
private function nfx($expr)
|
private function nfx($expr)
|
||||||
{
|
{
|
||||||
@ -367,6 +367,7 @@ class EvalMath
|
|||||||
}
|
}
|
||||||
$output[] = $op;
|
$output[] = $op;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -779,7 +779,7 @@ class FormTicket
|
|||||||
* @param string $morecss More CSS
|
* @param string $morecss More CSS
|
||||||
* @param int $use_multilevel If > 0 create a multilevel select which use $htmlname example: $use_multilevel = 1 permit to have 2 select boxes.
|
* @param int $use_multilevel If > 0 create a multilevel select which use $htmlname example: $use_multilevel = 1 permit to have 2 select boxes.
|
||||||
* @param Translate $outputlangs Output language
|
* @param Translate $outputlangs Output language
|
||||||
* @return void
|
* @return string|void String of HTML component
|
||||||
*/
|
*/
|
||||||
public function selectGroupTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '', $use_multilevel = 0, $outputlangs = null)
|
public function selectGroupTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '', $use_multilevel = 0, $outputlangs = null)
|
||||||
{
|
{
|
||||||
@ -985,7 +985,6 @@ class FormTicket
|
|||||||
}
|
}
|
||||||
$sql = substr($sql, 0, -2);
|
$sql = substr($sql, 0, -2);
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
} else {
|
|
||||||
}
|
}
|
||||||
$sql .= $this->db->order('ctc.pos', 'ASC');
|
$sql .= $this->db->order('ctc.pos', 'ASC');
|
||||||
|
|
||||||
|
|||||||
@ -178,7 +178,7 @@ class SimpleOpenID
|
|||||||
/**
|
/**
|
||||||
* SetOpenIDServer
|
* SetOpenIDServer
|
||||||
*
|
*
|
||||||
* @return void
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function GetError()
|
public function GetError()
|
||||||
{
|
{
|
||||||
@ -225,7 +225,7 @@ class SimpleOpenID
|
|||||||
* splitResponse
|
* splitResponse
|
||||||
*
|
*
|
||||||
* @param string $response Server
|
* @param string $response Server
|
||||||
* @return void
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function splitResponse($response)
|
public function splitResponse($response)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -907,7 +907,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
* @param Propal $object Object to show
|
* @param Propal $object Object to show
|
||||||
* @param int $posy Y
|
* @param int $posy Y
|
||||||
* @param Translate $outputlangs Langs object
|
* @param Translate $outputlangs Langs object
|
||||||
* @return void
|
* @return int
|
||||||
*/
|
*/
|
||||||
protected function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
protected function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -744,7 +744,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
* @param Object $object Object to show
|
* @param Object $object Object to show
|
||||||
* @param int $posy Y
|
* @param int $posy Y
|
||||||
* @param Translate $outputlangs Langs object
|
* @param Translate $outputlangs Langs object
|
||||||
* @return void
|
* @return int
|
||||||
*/
|
*/
|
||||||
protected function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
protected function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -29,7 +29,6 @@
|
|||||||
*/
|
*/
|
||||||
class Projects extends DolibarrApi
|
class Projects extends DolibarrApi
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array $FIELDS Mandatory fields, checked when create and update object
|
* @var array $FIELDS Mandatory fields, checked when create and update object
|
||||||
*/
|
*/
|
||||||
@ -267,10 +266,9 @@ class Projects extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @param int $id Id of project
|
* @param int $id Id of project
|
||||||
* @param int $userid Id of user (0 = connected user)
|
* @param int $userid Id of user (0 = connected user)
|
||||||
|
* @return array
|
||||||
*
|
*
|
||||||
* @url GET {id}/roles
|
* @url GET {id}/roles
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*/
|
*/
|
||||||
public function getRoles($id, $userid = 0)
|
public function getRoles($id, $userid = 0)
|
||||||
{
|
{
|
||||||
@ -301,6 +299,7 @@ class Projects extends DolibarrApi
|
|||||||
foreach ($this->project->roles as $line) {
|
foreach ($this->project->roles as $line) {
|
||||||
array_push($result, $this->_cleanObjectDatas($line));
|
array_push($result, $this->_cleanObjectDatas($line));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1480,7 +1480,7 @@ class Project extends CommonObject
|
|||||||
* @param int $list 0=Return array, 1=Return string list
|
* @param int $list 0=Return array, 1=Return string list
|
||||||
* @param int $socid 0=No filter on third party, id of third party
|
* @param int $socid 0=No filter on third party, id of third party
|
||||||
* @param string $filter additionnal filter on project (statut, ref, ...)
|
* @param string $filter additionnal filter on project (statut, ref, ...)
|
||||||
* @return array or string Array of projects id, or string with projects id separated with "," if list is 1
|
* @return array|string Array of projects id, or string with projects id separated with "," if list is 1
|
||||||
*/
|
*/
|
||||||
public function getProjectsAuthorizedForUser($user, $mode = 0, $list = 0, $socid = 0, $filter = '')
|
public function getProjectsAuthorizedForUser($user, $mode = 0, $list = 0, $socid = 0, $filter = '')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3489,7 +3489,7 @@ class User extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param int $deleteafterid Removed all users including the leaf $deleteafterid (and all its child) in user tree.
|
* @param int $deleteafterid Removed all users including the leaf $deleteafterid (and all its child) in user tree.
|
||||||
* @param string $filter SQL filter on users. This parameter must not come from user intput.
|
* @param string $filter SQL filter on users. This parameter must not come from user intput.
|
||||||
* @return array Array of users $this->users. Note: $this->parentof is also set.
|
* @return array|int Array of users $this->users. Note: $this->parentof is also set.
|
||||||
*/
|
*/
|
||||||
public function get_full_tree($deleteafterid = 0, $filter = '')
|
public function get_full_tree($deleteafterid = 0, $filter = '')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -182,7 +182,7 @@ class UserGroup extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param int $userid User id to search
|
* @param int $userid User id to search
|
||||||
* @param boolean $load_members Load all members of the group
|
* @param boolean $load_members Load all members of the group
|
||||||
* @return array Array of groups objects
|
* @return array|int Array of groups objects
|
||||||
*/
|
*/
|
||||||
public function listGroupsForUser($userid, $load_members = true)
|
public function listGroupsForUser($userid, $load_members = true)
|
||||||
{
|
{
|
||||||
@ -544,7 +544,7 @@ class UserGroup extends CommonObject
|
|||||||
* Charge dans l'objet group, la liste des permissions auquels le groupe a droit
|
* Charge dans l'objet group, la liste des permissions auquels le groupe a droit
|
||||||
*
|
*
|
||||||
* @param string $moduletag Name of module we want permissions ('' means all)
|
* @param string $moduletag Name of module we want permissions ('' means all)
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >=0 if OK
|
||||||
*/
|
*/
|
||||||
public function getrights($moduletag = '')
|
public function getrights($moduletag = '')
|
||||||
{
|
{
|
||||||
@ -552,12 +552,12 @@ class UserGroup extends CommonObject
|
|||||||
|
|
||||||
if ($moduletag && isset($this->_tab_loaded[$moduletag]) && $this->_tab_loaded[$moduletag]) {
|
if ($moduletag && isset($this->_tab_loaded[$moduletag]) && $this->_tab_loaded[$moduletag]) {
|
||||||
// Rights for this module are already loaded, so we leave
|
// Rights for this module are already loaded, so we leave
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($this->all_permissions_are_loaded)) {
|
if (!empty($this->all_permissions_are_loaded)) {
|
||||||
// We already loaded all rights for this group, so we leave
|
// We already loaded all rights for this group, so we leave
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user