Fix qodana
This commit is contained in:
parent
6ab68be4b3
commit
6da47ea49b
@ -705,6 +705,7 @@ class Orders extends DolibarrApi
|
||||
* @param int $id Order ID
|
||||
* @param int $idwarehouse Warehouse ID
|
||||
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
||||
* @return Object Object with cleaned properties
|
||||
*
|
||||
* @url POST {id}/validate
|
||||
*
|
||||
@ -712,8 +713,6 @@ class Orders extends DolibarrApi
|
||||
* @throws RestException 401
|
||||
* @throws RestException 404
|
||||
* @throws RestException 500 System error
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function validate($id, $idwarehouse = 0, $notrigger = 0)
|
||||
{
|
||||
|
||||
@ -78,7 +78,7 @@ class FormOrder extends Form
|
||||
* @param string $selected Id of preselected input method
|
||||
* @param string $htmlname Name of HTML select list
|
||||
* @param int $addempty 0=list with no empty value, 1=list with empty value
|
||||
* @return array Tableau des sources de commandes
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function selectInputMethod($selected = '', $htmlname = 'source_id', $addempty = 0)
|
||||
{
|
||||
|
||||
@ -1995,7 +1995,7 @@ class Holiday extends CommonObject
|
||||
* Return list of people with permission to validate leave requests.
|
||||
* Search for permission "approve leave requests"
|
||||
*
|
||||
* @return array Array of user ids
|
||||
* @return array|int Array of user ids or -1 if error
|
||||
*/
|
||||
public function fetch_users_approver_holiday()
|
||||
{
|
||||
|
||||
@ -267,12 +267,11 @@ class Tasks extends DolibarrApi
|
||||
/**
|
||||
* Get roles a user is assigned to a task with
|
||||
*
|
||||
* @param int $id Id of task
|
||||
* @param int $userid Id of user (0 = connected user)
|
||||
* @param int $id Id of task
|
||||
* @param int $userid Id of user (0 = connected user)
|
||||
* @return array Array of roles
|
||||
*
|
||||
* @url GET {id}/roles
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getRoles($id, $userid = 0)
|
||||
{
|
||||
@ -301,6 +300,7 @@ class Tasks extends DolibarrApi
|
||||
foreach ($this->task->roles as $line) {
|
||||
array_push($result, $this->_cleanObjectDatas($line));
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@ -60,7 +60,6 @@ class Receptions extends DolibarrApi
|
||||
*
|
||||
* @param int $id ID of reception
|
||||
* @return Object Object with cleaned properties
|
||||
*
|
||||
* @throws RestException
|
||||
*/
|
||||
public function get($id)
|
||||
@ -386,14 +385,12 @@ class Receptions extends DolibarrApi
|
||||
/**
|
||||
* Delete a line to given reception
|
||||
*
|
||||
*
|
||||
* @param int $id Id of reception to update
|
||||
* @param int $lineid Id of line to delete
|
||||
* @return array
|
||||
*
|
||||
* @url DELETE {id}/lines/{lineid}
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @throws RestException 401
|
||||
* @throws RestException 404
|
||||
*/
|
||||
@ -412,23 +409,27 @@ class Receptions extends DolibarrApi
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
// TODO Check the lineid $lineid is a line of ojbect
|
||||
// TODO Check the lineid $lineid is a line of object
|
||||
|
||||
$updateRes = $this->reception->deleteline(DolibarrApiAccess::$user, $lineid);
|
||||
if ($updateRes > 0) {
|
||||
return $this->get($id);
|
||||
} else {
|
||||
if ($updateRes < 0) {
|
||||
throw new RestException(405, $this->reception->error);
|
||||
}
|
||||
|
||||
return array(
|
||||
'success' => array(
|
||||
'code' => 200,
|
||||
'message' => 'Line deleted'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update reception general fields (won't touch lines of reception)
|
||||
*
|
||||
* @param int $id Id of reception to update
|
||||
* @param array $request_data Datas
|
||||
*
|
||||
* @return int
|
||||
* @param int $id Id of reception to update
|
||||
* @param array $request_data Datas
|
||||
* @return Object Object with cleaned properties
|
||||
*/
|
||||
public function put($id, $request_data = null)
|
||||
{
|
||||
@ -462,7 +463,6 @@ class Receptions extends DolibarrApi
|
||||
* Delete reception
|
||||
*
|
||||
* @param int $id Reception ID
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function delete($id)
|
||||
|
||||
@ -407,9 +407,9 @@ class Recruitment extends DolibarrApi
|
||||
/**
|
||||
* Update jobposition
|
||||
*
|
||||
* @param int $id Id of jobposition to update
|
||||
* @param array $request_data Datas
|
||||
* @return int
|
||||
* @param int $id Id of jobposition to update
|
||||
* @param array $request_data Datas
|
||||
* @return Object Object with cleaned properties
|
||||
*
|
||||
* @throws RestException
|
||||
*
|
||||
@ -450,9 +450,9 @@ class Recruitment extends DolibarrApi
|
||||
/**
|
||||
* Update candidature
|
||||
*
|
||||
* @param int $id Id of candidature to update
|
||||
* @param array $request_data Datas
|
||||
* @return int
|
||||
* @param int $id Id of candidature to update
|
||||
* @param array $request_data Datas
|
||||
* @return Object Object with cleaned properties
|
||||
*
|
||||
* @throws RestException
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user