Merge pull request #23658 from FliyFly/qodanaincompatiblereturn
Fix (qodana)
This commit is contained in:
commit
7d6db10710
@ -370,7 +370,7 @@ class Boms extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @url PUT {id}/lines/{lineid}
|
* @url PUT {id}/lines/{lineid}
|
||||||
*
|
*
|
||||||
* @return array|bool
|
* @return object|bool
|
||||||
*/
|
*/
|
||||||
public function putLine($id, $lineid, $request_data = null)
|
public function putLine($id, $lineid, $request_data = null)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4264,7 +4264,7 @@ abstract class CommonObject
|
|||||||
* @param string $field_select name of field we need to get a list
|
* @param string $field_select name of field we need to get a list
|
||||||
* @param string $field_where name of field of object we need to get linked items
|
* @param string $field_where name of field of object we need to get linked items
|
||||||
* @param string $table_element name of association table
|
* @param string $table_element name of association table
|
||||||
* @return array Array of record
|
* @return array|int Array of record, -1 if empty
|
||||||
*/
|
*/
|
||||||
public static function getAllItemsLinkedByObjectID($fk_object_where, $field_select, $field_where, $table_element)
|
public static function getAllItemsLinkedByObjectID($fk_object_where, $field_select, $field_where, $table_element)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -316,7 +316,7 @@ class DoliDBSqlite3 extends DoliDB
|
|||||||
* @param string $passwd password
|
* @param string $passwd password
|
||||||
* @param string $name name of database (not used for mysql, used for pgsql)
|
* @param string $name name of database (not used for mysql, used for pgsql)
|
||||||
* @param integer $port Port of database server
|
* @param integer $port Port of database server
|
||||||
* @return SQLite3 Database access handler
|
* @return SQLite3|string Database access handler
|
||||||
* @see close()
|
* @see close()
|
||||||
*/
|
*/
|
||||||
public function connect($host, $login, $passwd, $name, $port = 0)
|
public function connect($host, $login, $passwd, $name, $port = 0)
|
||||||
|
|||||||
@ -295,7 +295,7 @@ class Donations extends DolibarrApi
|
|||||||
* @throws RestException 404
|
* @throws RestException 404
|
||||||
* @throws RestException 500 System error
|
* @throws RestException 500 System error
|
||||||
*
|
*
|
||||||
* @return array
|
* @return object
|
||||||
*/
|
*/
|
||||||
public function validate($id, $idwarehouse = 0, $notrigger = 0)
|
public function validate($id, $idwarehouse = 0, $notrigger = 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -633,7 +633,7 @@ class EcmDirectory extends CommonObject
|
|||||||
* level Level of line (Added by buildPathFromId call)
|
* level Level of line (Added by buildPathFromId call)
|
||||||
*
|
*
|
||||||
* @param int $force Force reload of full arbo even if already loaded in cache $this->cats
|
* @param int $force Force reload of full arbo even if already loaded in cache $this->cats
|
||||||
* @return array Tableau de array
|
* @return array|int Tableau de array if OK, -1 if KO
|
||||||
*/
|
*/
|
||||||
public function get_full_arbo($force = 0)
|
public function get_full_arbo($force = 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -502,7 +502,7 @@ class Shipments extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @url POST {id}/validate
|
* @url POST {id}/validate
|
||||||
*
|
*
|
||||||
* @return array
|
* @return object
|
||||||
* \todo An error 403 is returned if the request has an empty body.
|
* \todo An error 403 is returned if the request has an empty body.
|
||||||
* Error message: "Forbidden: Content type `text/plain` is not supported."
|
* Error message: "Forbidden: Content type `text/plain` is not supported."
|
||||||
* Workaround: send this in the body
|
* Workaround: send this in the body
|
||||||
@ -630,7 +630,7 @@ class Shipments extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @url POST {id}/close
|
* @url POST {id}/close
|
||||||
*
|
*
|
||||||
* @return int
|
* @return object
|
||||||
*/
|
*/
|
||||||
public function close($id, $notrigger = 0)
|
public function close($id, $notrigger = 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -336,9 +336,10 @@ class Interventions extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @param int $id Intervention ID
|
* @param int $id Intervention ID
|
||||||
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
||||||
* @return Object Object with cleaned properties
|
|
||||||
*
|
*
|
||||||
* @url POST {id}/validate
|
* @url POST {id}/validate
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
*/
|
*/
|
||||||
public function validate($id, $notrigger = 0)
|
public function validate($id, $notrigger = 0)
|
||||||
{
|
{
|
||||||
@ -371,9 +372,10 @@ class Interventions extends DolibarrApi
|
|||||||
* Close an intervention
|
* Close an intervention
|
||||||
*
|
*
|
||||||
* @param int $id Intervention ID
|
* @param int $id Intervention ID
|
||||||
* @return Object Object with cleaned properties
|
|
||||||
*
|
*
|
||||||
* @url POST {id}/close
|
* @url POST {id}/close
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
*/
|
*/
|
||||||
public function closeFichinter($id)
|
public function closeFichinter($id)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -673,7 +673,7 @@ class ProductFournisseur extends Product
|
|||||||
* @param int $limit Limit
|
* @param int $limit Limit
|
||||||
* @param int $offset Offset
|
* @param int $offset Offset
|
||||||
* @param int $socid Filter on a third party id
|
* @param int $socid Filter on a third party id
|
||||||
* @return array Array of ProductFournisseur with new properties to define supplier price
|
* @return array|int Array of ProductFournisseur with new properties to define supplier price
|
||||||
*/
|
*/
|
||||||
public function list_product_fournisseur_price($prodid, $sortfield = '', $sortorder = '', $limit = 0, $offset = 0, $socid = 0)
|
public function list_product_fournisseur_price($prodid, $sortfield = '', $sortorder = '', $limit = 0, $offset = 0, $socid = 0)
|
||||||
{
|
{
|
||||||
@ -1042,7 +1042,7 @@ class ProductFournisseur extends Product
|
|||||||
* @param string $sortorder Sort order
|
* @param string $sortorder Sort order
|
||||||
* @param int $limit Limit
|
* @param int $limit Limit
|
||||||
* @param int $offset Offset
|
* @param int $offset Offset
|
||||||
* @return array Array of Log prices
|
* @return array|int Array of Log prices
|
||||||
*/
|
*/
|
||||||
public function listProductFournisseurPriceLog($product_fourn_price_id, $sortfield = '', $sortorder = '', $limit = 0, $offset = 0)
|
public function listProductFournisseurPriceLog($product_fourn_price_id, $sortfield = '', $sortorder = '', $limit = 0, $offset = 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4869,7 +4869,7 @@ class Product extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Return all parent products for current product (first level only)
|
* Return all parent products for current product (first level only)
|
||||||
*
|
*
|
||||||
* @return array Array of product
|
* @return array|int Array of product
|
||||||
* @see hasFatherOrChild()
|
* @see hasFatherOrChild()
|
||||||
*/
|
*/
|
||||||
public function getFather()
|
public function getFather()
|
||||||
@ -4911,7 +4911,7 @@ class Product extends CommonObject
|
|||||||
* @param int $firstlevelonly Return only direct child
|
* @param int $firstlevelonly Return only direct child
|
||||||
* @param int $level Level of recursing call (start to 1)
|
* @param int $level Level of recursing call (start to 1)
|
||||||
* @param array $parents Array of all parents of $id
|
* @param array $parents Array of all parents of $id
|
||||||
* @return array Return array(prodid=>array(0=prodid, 1=>qty, 2=>product type, 3=>label, 4=>incdec, 5=>product ref)
|
* @return array|int Return array(prodid=>array(0=prodid, 1=>qty, 2=>product type, 3=>label, 4=>incdec, 5=>product ref)
|
||||||
*/
|
*/
|
||||||
public function getChildsArbo($id, $firstlevelonly = 0, $level = 1, $parents = array())
|
public function getChildsArbo($id, $firstlevelonly = 0, $level = 1, $parents = array())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -367,7 +367,7 @@ class PriceGlobalVariableUpdater
|
|||||||
/**
|
/**
|
||||||
* List all price global variables
|
* List all price global variables
|
||||||
*
|
*
|
||||||
* @return array Array of price global variable updaters
|
* @return array|int Array of price global variable updaters
|
||||||
*/
|
*/
|
||||||
public function listUpdaters()
|
public function listUpdaters()
|
||||||
{
|
{
|
||||||
@ -404,7 +404,7 @@ class PriceGlobalVariableUpdater
|
|||||||
/**
|
/**
|
||||||
* List all updaters which need to be processed
|
* List all updaters which need to be processed
|
||||||
*
|
*
|
||||||
* @return array Array of price global variable updaters
|
* @return array|int Array of price global variable updaters
|
||||||
*/
|
*/
|
||||||
public function listPendingUpdaters()
|
public function listPendingUpdaters()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -577,7 +577,7 @@ class Entrepot extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Return number of unique different product into a warehouse
|
* Return number of unique different product into a warehouse
|
||||||
*
|
*
|
||||||
* @return Array Array('nb'=>Nb, 'value'=>Value)
|
* @return array|int Array('nb'=>Nb, 'value'=>Value)
|
||||||
*/
|
*/
|
||||||
public function nb_different_products()
|
public function nb_different_products()
|
||||||
{
|
{
|
||||||
@ -608,7 +608,7 @@ class Entrepot extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Return stock and value of warehosue
|
* Return stock and value of warehosue
|
||||||
*
|
*
|
||||||
* @return Array Array('nb'=>Nb, 'value'=>Value)
|
* @return array|int Array('nb'=>Nb, 'value'=>Value)
|
||||||
*/
|
*/
|
||||||
public function nb_products()
|
public function nb_products()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -499,10 +499,10 @@ class Receptions extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @param int $id Reception ID
|
* @param int $id Reception ID
|
||||||
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
||||||
* @return Object Object with cleaned properties
|
|
||||||
*
|
*
|
||||||
* @url POST {id}/validate
|
* @url POST {id}/validate
|
||||||
*
|
*
|
||||||
|
* @return Object
|
||||||
* \todo An error 403 is returned if the request has an empty body.
|
* \todo An error 403 is returned if the request has an empty body.
|
||||||
* Error message: "Forbidden: Content type `text/plain` is not supported."
|
* Error message: "Forbidden: Content type `text/plain` is not supported."
|
||||||
* Workaround: send this in the body
|
* Workaround: send this in the body
|
||||||
@ -627,9 +627,10 @@ class Receptions extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @param int $id Reception ID
|
* @param int $id Reception ID
|
||||||
* @param int $notrigger Disabled triggers
|
* @param int $notrigger Disabled triggers
|
||||||
* @return Object Object with cleaned properties
|
|
||||||
*
|
*
|
||||||
* @url POST {id}/close
|
* @url POST {id}/close
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
*/
|
*/
|
||||||
public function close($id, $notrigger = 0)
|
public function close($id, $notrigger = 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1944,7 +1944,7 @@ class SupplierProposal extends CommonObject
|
|||||||
* @param int $offset For pagination
|
* @param int $offset For pagination
|
||||||
* @param string $sortfield Sort criteria
|
* @param string $sortfield Sort criteria
|
||||||
* @param string $sortorder Sort order
|
* @param string $sortorder Sort order
|
||||||
* @return int -1 if KO, array with result if OK
|
* @return array|int -1 if KO, array with result if OK
|
||||||
*/
|
*/
|
||||||
public function liste_array($shortlist = 0, $draft = 0, $notcurrentuser = 0, $socid = 0, $limit = 0, $offset = 0, $sortfield = 'p.datec', $sortorder = 'DESC')
|
public function liste_array($shortlist = 0, $draft = 0, $notcurrentuser = 0, $socid = 0, $limit = 0, $offset = 0, $sortfield = 'p.datec', $sortorder = 'DESC')
|
||||||
{
|
{
|
||||||
@ -2225,7 +2225,7 @@ class SupplierProposal extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param User $user Object user
|
* @param User $user Object user
|
||||||
* @param int $mode "opened" for askprice to close, "signed" for proposal to invoice
|
* @param int $mode "opened" for askprice to close, "signed" for proposal to invoice
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
|
||||||
*/
|
*/
|
||||||
public function load_board($user, $mode)
|
public function load_board($user, $mode)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user