From 5e4a4da130cbf077fd4470c305765b5e4cd10086 Mon Sep 17 00:00:00 2001 From: Hystepik Date: Wed, 20 Dec 2023 14:22:45 +0100 Subject: [PATCH] Fix some php codce smell --- htdocs/accountancy/admin/accountmodel.php | 2 +- htdocs/accountancy/admin/categories_list.php | 2 +- htdocs/accountancy/admin/journals_list.php | 2 +- htdocs/accountancy/class/accountancyexport.class.php | 6 +++--- htdocs/accountancy/class/bookkeeping.class.php | 2 +- htdocs/adherents/class/adherent.class.php | 4 ++-- htdocs/admin/dict.php | 2 +- htdocs/admin/mails_templates.php | 2 +- htdocs/admin/website.php | 2 +- htdocs/blockedlog/class/blockedlog.class.php | 6 +++--- htdocs/bom/class/bom.class.php | 6 +++--- htdocs/categories/class/categorie.class.php | 2 +- htdocs/comm/action/class/actioncomm.class.php | 6 +++--- htdocs/comm/action/class/api_agendaevents.class.php | 2 +- htdocs/comm/action/class/ical.class.php | 2 +- htdocs/comm/action/index.php | 4 ++-- htdocs/comm/propal/class/propal.class.php | 12 ++++++------ htdocs/commande/class/commande.class.php | 12 ++++++------ 18 files changed, 38 insertions(+), 38 deletions(-) diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 5a2b7aa5e21..456b1503ca7 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -740,7 +740,7 @@ $db->close(); * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered * @return void */ -function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context = '') +function fieldListAccountModel($fieldlist, $obj = null, $tabname = '', $context = '') { global $langs, $db; global $form; diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 35126c5d464..66f411c8cca 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -958,7 +958,7 @@ $db->close(); * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered * @return void */ -function fieldListAccountingCategories($fieldlist, $obj = '', $tabname = '', $context = '') +function fieldListAccountingCategories($fieldlist, $obj = null, $tabname = '', $context = '') { global $conf, $langs, $db; global $form, $mysoc; diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index 02158f7536a..c1ad8bdb0c5 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -691,7 +691,7 @@ $db->close(); * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered * @return void */ -function fieldListJournal($fieldlist, $obj = '', $tabname = '', $context = '') +function fieldListJournal($fieldlist, $obj = null, $tabname = '', $context = '') { global $conf, $langs, $db; global $form, $mysoc; diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 737573ef21e..7573dbee9f4 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -829,7 +829,7 @@ class AccountancyExport * @param array $objectLines data * @param resource $exportFile [=null] File resource to export or print if null * @param array $archiveFileList [=array()] Archive file list : array of ['path', 'name'] - * @param bool $withAttachment [=0] Not add files or 1 to have attached in an archive + * @param int $withAttachment [=0] Not add files or 1 to have attached in an archive * @return array Archive file list : array of ['path', 'name'] */ public function exportQuadratus($objectLines, $exportFile = null, $archiveFileList = array(), $withAttachment = 0) @@ -1309,7 +1309,7 @@ class AccountancyExport * @param array $objectLines data * @param resource $exportFile [=null] File resource to export or print if null * @param array $archiveFileList [=array()] Archive file list : array of ['path', 'name'] - * @param bool $withAttachment [=0] Not add files or 1 to have attached in an archive + * @param int $withAttachment [=0] Not add files or 1 to have attached in an archive * @return array Archive file list : array of ['path', 'name'] */ public function exportFEC($objectLines, $exportFile = null, $archiveFileList = array(), $withAttachment = 0) @@ -1520,7 +1520,7 @@ class AccountancyExport * @param array $objectLines data * @param resource $exportFile [=null] File resource to export or print if null * @param array $archiveFileList [=array()] Archive file list : array of ['path', 'name'] - * @param bool $withAttachment [=0] Not add files or 1 to have attached in an archive + * @param int $withAttachment [=0] Not add files or 1 to have attached in an archive * @return array Archive file list : array of ['path', 'name'] */ public function exportFEC2($objectLines, $exportFile = null, $archiveFileList = array(), $withAttachment = 0) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index ffda82c2174..9de46b09d39 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -2124,7 +2124,7 @@ class BookKeeping extends CommonObject * @param array $event Event options * @param int $select_in Value is a aa.rowid (0 default) or aa.account_number (1) * @param int $select_out Set value returned by select 0=rowid (default), 1=account_number - * @param int $aabase Set accounting_account base class to display empty=all or from 1 to 8 will display only account beginning by this number + * @param string $aabase Set accounting_account base class to display empty=all or from 1 to 8 will display only account beginning by this number * @return string String with HTML select */ public function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $aabase = '') diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 154b886ae0e..dee2b122ae7 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -1361,7 +1361,7 @@ class Adherent extends CommonObject * @param bool $fetch_subscriptions To load member subscriptions * @return int >0 if OK, 0 if not found, <0 if KO */ - public function fetch($rowid, $ref = '', $fk_soc = '', $ref_ext = '', $fetch_optionals = true, $fetch_subscriptions = true) + public function fetch($rowid, $ref = '', $fk_soc = 0, $ref_ext = '', $fetch_optionals = true, $fetch_subscriptions = true) { global $langs; @@ -1679,7 +1679,7 @@ class Adherent extends CommonObject * @param string $num_chq Numero cheque (if Id bank account provided) * @param string $emetteur_nom Name of cheque writer * @param string $emetteur_banque Name of bank of cheque - * @param string $autocreatethirdparty Auto create new thirdparty if member not yet linked to a thirdparty and we request an option that generate invoice. + * @param int $autocreatethirdparty Auto create new thirdparty if member not yet linked to a thirdparty and we request an option that generate invoice. * @param string $ext_payment_id External id of payment (for example Stripe charge id) * @param string $ext_payment_site Name of external paymentmode (for example 'stripe') * @return int Return integer <0 if KO, >0 if OK diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index d1fbb458549..6a6ee16dbcb 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -2540,7 +2540,7 @@ $db->close(); * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered * @return string '' or value of entity into table */ -function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') +function fieldList($fieldlist, $obj = null, $tabname = '', $context = '') { global $conf, $langs, $db, $mysoc; global $form; diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index f658d456f8d..cabbe69c319 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -1354,7 +1354,7 @@ $db->close(); * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered * @return void */ -function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') +function fieldList($fieldlist, $obj = null, $tabname = '', $context = '') { global $langs, $user, $db; global $form; diff --git a/htdocs/admin/website.php b/htdocs/admin/website.php index 44a394ebe8f..3a6d4639fbb 100644 --- a/htdocs/admin/website.php +++ b/htdocs/admin/website.php @@ -681,7 +681,7 @@ $db->close(); * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered * @return void */ -function fieldListWebsites($fieldlist, $obj = '', $tabname = '', $context = '') +function fieldListWebsites($fieldlist, $obj = null, $tabname = '', $context = '') { global $conf, $langs, $db; global $form; diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index a69c839f369..e5279635b2a 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -797,7 +797,7 @@ class BlockedLog * Encode data * * @param string $data Data to serialize - * @param string $mode 0=serialize, 1=json_encode + * @param int $mode 0=serialize, 1=json_encode * @return string Value serialized, an object (stdClass) */ public function dolEncodeBlockedData($data, $mode = 0) @@ -817,7 +817,7 @@ class BlockedLog * Decode data * * @param string $data Data to unserialize - * @param string $mode 0=unserialize, 1=json_decode + * @param int $mode 0=unserialize, 1=json_decode * @return object Value unserialized, an object (stdClass) */ public function dolDecodeBlockedData($data, $mode = 0) @@ -852,7 +852,7 @@ class BlockedLog * Create blocked log in database. * * @param User $user Object user that create - * @param int $forcesignature Force signature (for example '0000000000' when we disabled the module) + * @param string $forcesignature Force signature (for example '0000000000' when we disabled the module) * @return int Return integer <0 if KO, >0 if OK */ public function create($user, $forcesignature = '') diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 9c89778d555..108de19475a 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -602,7 +602,7 @@ class BOM extends CommonObject * @param int $fk_default_workstation Default workstation * @return int Return integer <0 if KO, Id of created object if OK */ - public function addLine($fk_product, $qty, $qty_frozen = 0, $disable_stock_change = 0, $efficiency = 1.0, $position = -1, $fk_bom_child = null, $import_key = null, $fk_unit = '', $array_options = 0, $fk_default_workstation = null) + public function addLine($fk_product, $qty, $qty_frozen = 0, $disable_stock_change = 0, $efficiency = 1.0, $position = -1, $fk_bom_child = null, $import_key = null, $fk_unit = '', $array_options = array(), $fk_default_workstation = null) { global $mysoc, $conf, $langs, $user; @@ -710,7 +710,7 @@ class BOM extends CommonObject * @param int $fk_default_workstation Default workstation * @return int Return integer <0 if KO, Id of updated BOM-Line if OK */ - public function updateLine($rowid, $qty, $qty_frozen = 0, $disable_stock_change = 0, $efficiency = 1.0, $position = -1, $import_key = null, $fk_unit = 0, $array_options = 0, $fk_default_workstation = null) + public function updateLine($rowid, $qty, $qty_frozen = 0, $disable_stock_change = 0, $efficiency = 1.0, $position = -1, $import_key = null, $fk_unit = 0, $array_options = array(), $fk_default_workstation = null) { global $mysoc, $conf, $langs, $user; @@ -1594,7 +1594,7 @@ class BOM extends CommonObject * @param int $level Protection against infinite loop * @return void */ - public function getParentBomTreeRecursive(&$TParentBom, $bom_id = '', $level = 1) + public function getParentBomTreeRecursive(&$TParentBom, $bom_id = 0, $level = 1) { // Protection against infinite loop diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 3a57d245956..f7008dad5eb 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1385,7 +1385,7 @@ class Categorie extends CommonObject * @param string $sep Separator * @param string $url Url ('', 'none' or 'urltouse') * @param int $nocolor 0 - * @param string $addpicto Add picto into link + * @param int $addpicto Add picto into link * @return array */ public function print_all_ways($sep = '>>', $url = '', $nocolor = 0, $addpicto = 0) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 8f13709a1e0..7ebd0a3413c 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -784,7 +784,7 @@ class ActionComm extends CommonObject * @param string $ref Ref of action to get * @param string $ref_ext Ref ext to get * @param string $email_msgid Email msgid - * @param string $loadresources 1=Load also resources + * @param int $loadresources 1=Load also resources * @return int Return integer <0 if KO, >0 if OK */ public function fetch($id, $ref = '', $ref_ext = '', $email_msgid = '', $loadresources = 1) @@ -1328,7 +1328,7 @@ class ActionComm extends CommonObject * @param string $filter Other filter * @param string $sortfield Sort on this field * @param string $sortorder ASC or DESC - * @param string $limit Limit number of answers + * @param int $limit Limit number of answers * @return ActionComm[]|string Error string if KO, array with actions if OK */ public function getActions($socid = 0, $fk_element = 0, $elementtype = '', $filter = '', $sortfield = 'a.datep', $sortorder = 'DESC', $limit = 0) @@ -1542,7 +1542,7 @@ class ActionComm extends CommonObject * @param int $percent Percent * @param int $mode 0=Long label, 1=Short label, 2=Picto+Short label, 3=Picto, 4=Picto+Short label, 5=Short label+Picto, 6=Picto+Long label, 7=Very short label+Picto * @param int $hidenastatus 1=Show nothing if status is "Not applicable" - * @param int $datestart Date start of event + * @param int|string $datestart Date start of event * @return string Label */ public function LibStatut($percent, $mode, $hidenastatus = 0, $datestart = '') diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index 5c86aa9f6b5..50fb1882aaf 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -103,7 +103,7 @@ class AgendaEvents extends DolibarrApi * @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names * @return array Array of Agenda Events objects */ - public function index($sortfield = "t.id", $sortorder = 'ASC', $limit = 100, $page = 0, $user_ids = 0, $sqlfilters = '', $properties = '') + public function index($sortfield = "t.id", $sortorder = 'ASC', $limit = 100, $page = 0, $user_ids = '', $sqlfilters = '', $properties = '') { global $db, $conf; diff --git a/htdocs/comm/action/class/ical.class.php b/htdocs/comm/action/class/ical.class.php index bace864360e..d7b60f5e5ef 100644 --- a/htdocs/comm/action/class/ical.class.php +++ b/htdocs/comm/action/class/ical.class.php @@ -109,7 +109,7 @@ class ICal * * @param string $uri Url * @param string $usecachefile Full path of a cache file to use a cache file - * @param string $delaycache Delay in seconds for cache (by default 3600 secondes) + * @param int $delaycache Delay in seconds for cache (by default 3600 secondes) * @return array|string */ public function parse($uri, $usecachefile = '', $delaycache = 3600) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index f008b84dfad..87835c9b36f 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1743,8 +1743,8 @@ $db->close(); * @param string $newparam Parameters on current URL * @param int $showinfo Add extended information (used by day and week view) * @param int $minheight Minimum height for each event. 60px by default. - * @param string $nonew 0=Add "new entry button", 1=No "new entry button", -1=Only "new entry button" - * @param string $bookcalcalendarsarray Used for Bookcal module array of calendar of bookcal + * @param int $nonew 0=Add "new entry button", 1=No "new entry button", -1=Only "new entry button" + * @param array $bookcalcalendarsarray Used for Bookcal module array of calendar of bookcal * @return void */ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint = 0, $maxnbofchar = 16, $newparam = '', $showinfo = 0, $minheight = 60, $nonew = 0, $bookcalcalendarsarray = array()) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index d470fc8bc52..c5e9175a2af 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -577,8 +577,8 @@ class Propal extends CommonObject * @param int $fk_fournprice Id supplier price * @param int $pa_ht Buying price without tax * @param string $label ??? - * @param int $date_start Start date of the line - * @param int $date_end End date of the line + * @param int|string $date_start Start date of the line + * @param int|string $date_end End date of the line * @param array $array_options extrafields array * @param string $fk_unit Code of the unit to use. Null to use the default one * @param string $origin Depend on global conf MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION can be 'orderdet', 'propaldet'..., else 'order','propal,'.... @@ -589,7 +589,7 @@ class Propal extends CommonObject * @return int >0 if OK, <0 if KO * @see add_product() */ - public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $info_bits = 0, $type = 0, $rang = -1, $special_code = 0, $fk_parent_line = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $origin = '', $origin_id = 0, $pu_ht_devise = 0, $fk_remise_except = 0, $noupdateafterinsertline = 0) + public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $info_bits = 0, $type = 0, $rang = -1, $special_code = 0, $fk_parent_line = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $date_start = '', $date_end = '', $array_options = array(), $fk_unit = null, $origin = '', $origin_id = 0, $pu_ht_devise = 0, $fk_remise_except = 0, $noupdateafterinsertline = 0) { global $mysoc, $conf, $langs; @@ -827,8 +827,8 @@ class Propal extends CommonObject * @param int $pa_ht Price (without tax) of product when it was bought * @param string $label ??? * @param int $type 0/1=Product/service - * @param int $date_start Start date of the line - * @param int $date_end End date of the line + * @param int|string $date_start Start date of the line + * @param int|string $date_end End date of the line * @param array $array_options extrafields array * @param string $fk_unit Code of the unit to use. Null to use the default one * @param double $pu_ht_devise Unit price in currency @@ -836,7 +836,7 @@ class Propal extends CommonObject * @param integer $rang line rank * @return int 0 if OK, <0 if KO */ - public function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $desc = '', $price_base_type = 'HT', $info_bits = 0, $special_code = 0, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $type = 0, $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0, $rang = 0) + public function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $desc = '', $price_base_type = 'HT', $info_bits = 0, $special_code = 0, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $type = 0, $date_start = '', $date_end = '', $array_options = array(), $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0, $rang = 0) { global $mysoc, $langs; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 5ec0a3374d1..76701e51ca7 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1483,8 +1483,8 @@ class Commande extends CommonOrder * @param int $fk_remise_except Id remise * @param string $price_base_type HT or TTC * @param float $pu_ttc Prix unitaire TTC - * @param int $date_start Start date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html) - * @param int $date_end End date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html) + * @param int|string $date_start Start date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html) + * @param int|string $date_end End date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html) * @param int $type Type of line (0=product, 1=service). Not used if fk_product is defined, the type of product is used. * @param int $rang Position of line * @param int $special_code Special code (also used by externals modules!) @@ -1508,7 +1508,7 @@ class Commande extends CommonOrder * par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,produit) * et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue) */ - public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $info_bits = 0, $fk_remise_except = 0, $price_base_type = 'HT', $pu_ttc = 0, $date_start = '', $date_end = '', $type = 0, $rang = -1, $special_code = 0, $fk_parent_line = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $array_options = 0, $fk_unit = null, $origin = '', $origin_id = 0, $pu_ht_devise = 0, $ref_ext = '', $noupdateafterinsertline = 0) + public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $info_bits = 0, $fk_remise_except = 0, $price_base_type = 'HT', $pu_ttc = 0, $date_start = '', $date_end = '', $type = 0, $rang = -1, $special_code = 0, $fk_parent_line = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $array_options = array(), $fk_unit = null, $origin = '', $origin_id = 0, $pu_ht_devise = 0, $ref_ext = '', $noupdateafterinsertline = 0) { global $mysoc, $conf, $langs, $user; @@ -1755,8 +1755,8 @@ class Commande extends CommonOrder * @param int $idproduct Product Id * @param float $qty Quantity * @param float $remise_percent Product discount relative - * @param int $date_start Start date of the line - * @param int $date_end End date of the line + * @param int|string $date_start Start date of the line + * @param int|string $date_end End date of the line * @return void * * TODO Remplacer les appels a cette fonction par generation objet Ligne @@ -2728,7 +2728,7 @@ class Commande extends CommonOrder * @param string $sortorder Sort order * @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') + public function liste_array($shortlist = 0, $draft = 0, $excluser = null, $socid = 0, $limit = 0, $offset = 0, $sortfield = 'c.date_commande', $sortorder = 'DESC') { // phpcs:enable global $user;