diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 897f60e8aaa..7e2cdc56543 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -2088,7 +2088,7 @@ class BookKeeping extends CommonObject * FIXME: This function takes the parent of parent to get the root account ! * * @param string $account Accounting account - * @return array Array with root account information (max 2 upper level) + * @return array|int Array with root account information (max 2 upper level), <0 if KO */ public function getRootAccount($account = null) { diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index ad029628739..9138a757989 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -712,6 +712,7 @@ class Orders extends DolibarrApi * @throws RestException 401 * @throws RestException 404 * @throws RestException 500 System error + * */ public function validate($id, $idwarehouse = 0, $notrigger = 0) { diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 86fcfbea1ad..6348d8e1325 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2727,7 +2727,7 @@ class Commande extends CommonOrder * @param int $offset For pagination * @param string $sortfield Sort criteria * @param string $sortorder Sort order - * @return int -1 if KO, array with result if OK + * @return int|array -1 if KO, array with result if OK */ public function liste_array($shortlist = 0, $draft = 0, $excluser = '', $socid = 0, $limit = 0, $offset = 0, $sortfield = 'c.date_commande', $sortorder = 'DESC') { diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 0984b6e212b..379cda22d43 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -1868,7 +1868,7 @@ class Contact extends CommonObject * Updates all roles (default contact for companies) according to values inside the ->roles array. * This is called by update of contact. * - * @return float|int + * @return int * @see fetchRoles() */ public function updateRoles() @@ -1878,7 +1878,7 @@ class Contact extends CommonObject $error = 0; if (!isset($this->roles)) { - return; // Avoid to loose roles when property not set + return 0; // Avoid to loose roles when property not set } $this->db->begin(); diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 4fd18a74f34..3e3678fbcad 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -758,7 +758,7 @@ class Contrat extends CommonObject * * @param int $only_services 0=Default, 1=Force only services (depending on setup, we may also have physical products in a contract) * @param int $loadalsotranslation 0=Default, 1=Load also translations of product descriptions - * @return ContratLigne[] Return array of contract lines + * @return array|int Return array of contract lines */ public function fetch_lines($only_services = 0, $loadalsotranslation = 0) { diff --git a/htdocs/debugbar/class/DataCollector/DolRequestDataCollector.php b/htdocs/debugbar/class/DataCollector/DolRequestDataCollector.php index 4ddcac9af7c..a74669e5238 100644 --- a/htdocs/debugbar/class/DataCollector/DolRequestDataCollector.php +++ b/htdocs/debugbar/class/DataCollector/DolRequestDataCollector.php @@ -62,7 +62,7 @@ class DolRequestDataCollector extends RequestDataCollector /** * Return widget settings * - * @return void + * @return array */ public function getWidgets() { diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 94fa12fd050..ebbc83302d5 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -2375,7 +2375,7 @@ class ExpenseReport extends CommonObject * Return list of people with permission to validate expense reports. * Search for permission "approve expense report" * - * @return array Array of user ids + * @return array|int Array of user ids, <0 if KO */ public function fetch_users_approver_expensereport() { diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 7f76261bcea..15d2b64dc73 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -4222,12 +4222,12 @@ function migrate_delete_old_dir($db, $langs, $conf) * @param Conf $conf Object conf * @param array $listofmodule List of modules, like array('MODULE_KEY_NAME'=>', $reloadmode) * @param int $force 1=Reload module even if not already loaded - * @return int <0 if KO, >0 if OK + * @return int <0 if KO, >0 if OK */ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $force = 0) { if (count($listofmodule) == 0) { - return; + return 0; } dolibarr_install_syslog("upgrade2::migrate_reload_modules force=".$force.", listofmodule=".join(',', array_keys($listofmodule))); diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php index 66d0ae14d58..21397085729 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php @@ -882,7 +882,7 @@ class pdf_standard_myobject extends ModelePDFMyObject * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @param Translate $outputlangsbis Object lang for output bis - * @return void + * @return float|int */ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis = null) { diff --git a/htdocs/product/class/productbatch.class.php b/htdocs/product/class/productbatch.class.php index 52a39205b14..750e5d5bd7c 100644 --- a/htdocs/product/class/productbatch.class.php +++ b/htdocs/product/class/productbatch.class.php @@ -431,7 +431,7 @@ class Productbatch extends CommonObject * @param int $fk_product_stock id product_stock for objet * @param int $with_qty 1 = doesn't return line with 0 quantity * @param int $fk_product If set to a product id, get eatby and sellby from table llx_product_lot - * @return array <0 if KO, array of batch + * @return array|int <0 if KO, array of batch */ public static function findAll($dbs, $fk_product_stock, $with_qty = 0, $fk_product = 0) { diff --git a/htdocs/product/dynamic_price/class/price_expression.class.php b/htdocs/product/dynamic_price/class/price_expression.class.php index b9010f60f18..d38851e0eaa 100644 --- a/htdocs/product/dynamic_price/class/price_expression.class.php +++ b/htdocs/product/dynamic_price/class/price_expression.class.php @@ -162,7 +162,7 @@ class PriceExpression /** * List all price expressions * - * @return array Array of price expressions + * @return array|int Array of price expressions, <0 if ko */ public function list_price_expression() { diff --git a/htdocs/product/dynamic_price/class/price_global_variable.class.php b/htdocs/product/dynamic_price/class/price_global_variable.class.php index 336fb024470..99407851174 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable.class.php @@ -311,7 +311,7 @@ class PriceGlobalVariable /** * List all price global variables * - * @return array Array of price global variables + * @return array|int Array of price global variables, <0 if ko */ public function listGlobalVariables() { diff --git a/htdocs/product/stock/class/productstockentrepot.class.php b/htdocs/product/stock/class/productstockentrepot.class.php index a0310a16359..1151890a4b1 100644 --- a/htdocs/product/stock/class/productstockentrepot.class.php +++ b/htdocs/product/stock/class/productstockentrepot.class.php @@ -242,7 +242,7 @@ class ProductStockEntrepot extends CommonObject * @param array $filter filter array * @param string $filtermode filter mode (AND or OR) * - * @return int <0 if KO, >0 if OK + * @return int|array <0 if KO, array if OK */ public function fetchAll($fk_product = '', $fk_entrepot = '', $sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') { diff --git a/htdocs/projet/class/api_tasks.class.php b/htdocs/projet/class/api_tasks.class.php index 1c8105ea931..7c68b8bdeab 100644 --- a/htdocs/projet/class/api_tasks.class.php +++ b/htdocs/projet/class/api_tasks.class.php @@ -271,6 +271,7 @@ class Tasks extends DolibarrApi * @return array Array of roles * * @url GET {id}/roles + * */ public function getRoles($id, $userid = 0) { diff --git a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php index a0747f13f45..8ee6043f870 100644 --- a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php +++ b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php @@ -801,7 +801,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @param Translate $outputlangsbis Object lang for output bis - * @return void + * @return float|int */ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis = null) { diff --git a/htdocs/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php index 8b4e32c05d2..5f8c27dab4f 100644 --- a/htdocs/resource/class/html.formresource.class.php +++ b/htdocs/resource/class/html.formresource.class.php @@ -77,7 +77,7 @@ class FormResource * @param int $limit Limit number of answers * @param string $morecss More css * @param bool $multiple add [] in the name of element and add 'multiple' attribut - * @return string HTML string with + * @return string|array HTML string with */ public function select_resource_list($selected = '', $htmlname = 'fk_resource', $filter = '', $showempty = 0, $showtype = 0, $forcecombo = 0, $event = array(), $filterkey = '', $outputmode = 0, $limit = 20, $morecss = '', $multiple = false) { diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 7076b63d1d4..99724fddc63 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -2883,7 +2883,7 @@ class Ticket extends CommonObject * * @param User $user Object user * @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) { diff --git a/htdocs/webservices/server_order.php b/htdocs/webservices/server_order.php index 0f0eb79d10e..bed089abea1 100644 --- a/htdocs/webservices/server_order.php +++ b/htdocs/webservices/server_order.php @@ -654,7 +654,7 @@ function getOrdersForThirdParty($authentication, $idthirdparty) * * @param array $authentication Array of authentication information * @param array $order Order info - * @return int Id of new order + * @return array array of new order */ function createOrder($authentication, $order) { diff --git a/htdocs/webservices/server_other.php b/htdocs/webservices/server_other.php index ae1a480710f..c51ca01639e 100644 --- a/htdocs/webservices/server_other.php +++ b/htdocs/webservices/server_other.php @@ -185,7 +185,7 @@ function getVersions($authentication) * @param string $modulepart Properties of document * @param string $file Relative path * @param string $refname Ref of object to check permission for external users (autodetect if not provided) - * @return void + * @return array */ function getDocument($authentication, $modulepart, $file, $refname = '') { diff --git a/htdocs/webservices/server_project.php b/htdocs/webservices/server_project.php index b64ccc94d59..16aef76c699 100644 --- a/htdocs/webservices/server_project.php +++ b/htdocs/webservices/server_project.php @@ -235,7 +235,7 @@ $server->register( * * @param array $authentication Array of authentication information * @param array $project Project info - * @return int Id of new order + * @return array array of new order */ function createProject($authentication, $project) { diff --git a/htdocs/zapier/class/api_zapier.class.php b/htdocs/zapier/class/api_zapier.class.php index e6edefcc616..c98f3bab6c7 100644 --- a/htdocs/zapier/class/api_zapier.class.php +++ b/htdocs/zapier/class/api_zapier.class.php @@ -239,7 +239,7 @@ class Zapier extends DolibarrApi * Create hook object * * @param array $request_data Request datas - * @return int ID of hook + * @return array ID of hook * * @url POST /hook/ */