diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index 644808826d5..397312fbb5f 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -118,12 +118,12 @@ class mod_codeproduct_elephant extends ModeleProductCode /** * Return an example of result returned by getNextValue * - * @param Translate $langs Object langs - * @param Product $objproduct Object product - * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) - * @return string Return string example + * @param Translate $langs Object langs + * @param Product|string $objproduct Object product + * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @return string Return string example */ - public function getExample($langs, $objproduct = null, $type = -1) + public function getExample($langs, $objproduct = '', $type = -1) { $exampleproduct = $exampleservice = ''; diff --git a/htdocs/core/modules/product/mod_codeproduct_leopard.php b/htdocs/core/modules/product/mod_codeproduct_leopard.php index 990d55b691e..d8ae7f91676 100644 --- a/htdocs/core/modules/product/mod_codeproduct_leopard.php +++ b/htdocs/core/modules/product/mod_codeproduct_leopard.php @@ -85,11 +85,11 @@ class mod_codeproduct_leopard extends ModeleProductCode /** * Return an example of result returned by getNextValue * - * @param ?Product $objproduct Object product - * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) - * @return string Return next value + * @param Product|string $objproduct Object product + * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @return string Return next value */ - public function getNextValue($objproduct = null, $type = -1) + public function getNextValue($objproduct = '', $type = -1) { return ''; } diff --git a/htdocs/core/modules/product/modules_product.class.php b/htdocs/core/modules/product/modules_product.class.php index 6d9e87bf023..cfe79891429 100644 --- a/htdocs/core/modules/product/modules_product.class.php +++ b/htdocs/core/modules/product/modules_product.class.php @@ -64,11 +64,11 @@ abstract class ModeleProductCode extends CommonNumRefGenerator /** * Return next value available * - * @param ?Product $objproduct Object product - * @param int $type Type - * @return string Value + * @param Product|string $objproduct Object product + * @param int $type Type + * @return string Value */ - public function getNextValue($objproduct = null, $type = -1) + public function getNextValue($objproduct = '', $type = -1) { global $langs; return $langs->trans("Function_getNextValue_InModuleNotWorking");