diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 07fae627c56..e0e8360d234 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -894,11 +894,11 @@ function array2table($data, $tableMarkup = 1, $tableoptions = '', $troptions = ' * @param string $field Field containing already used values of counter * @param string $where To add a filter on selection (for example to filter on invoice types) * @param Societe|'' $objsoc The company that own the object we need a counter for - * @param string $date Date to use for the {y},{m},{d} tags. + * @param int|'' $date Date to use for the {y},{m},{d} tags. is timestamp or '' to use dol_now() * @param string $mode 'next' for next value or 'last' for last value * @param bool $bentityon Activate the entity filter. Default is true (for modules not compatible with multicompany) * @param User $objuser Object user we need data from. - * @param int $forceentity Entity id to force + * @param string $forceentity Entity id to force, can be '0' or '1' or '1,2' etc * @return string New value (numeric) or error message */ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $date = '', $mode = 'next', $bentityon = true, $objuser = null, $forceentity = null) diff --git a/htdocs/core/modules/expensereport/mod_expensereport_sand.php b/htdocs/core/modules/expensereport/mod_expensereport_sand.php index 15180f5ff26..0c5962c871e 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_sand.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_sand.php @@ -152,7 +152,7 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport $fuser->fetch($object->fk_user_author); } - $numFinal = get_next_value($db, $mask, 'expensereport', 'ref', '', null, (string) $date, 'next', true, $fuser); + $numFinal = get_next_value($db, $mask, 'expensereport', 'ref', '', null, $date, 'next', true, $fuser); return $numFinal; } diff --git a/phpstan.neon.dist b/phpstan.neon.dist index bf07ab6eb46..6e4c06a6a12 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -74,13 +74,12 @@ parameters: - '# SMTPs::(getFrom|getErrorsTo|getReplyTo)\(\) expects bool, string given.#' - '# (dolibarr_set_const|yn|getLocalTaxesFromRate) expects int\|string#' - '#::(options)\(\) expects int\|string#' - - '# (print_barre_liste|getCurrentPeriodOfFiscalYear|dol_substr|get_next_value) expects int\|null#' + - '# (print_barre_liste|getCurrentPeriodOfFiscalYear|dol_substr) expects int\|null#' - '#(?:colorAdjustBrightness|imap_(?:(?:fetch)?body|fetchstructure)) expects int, string#' - '# (Setup|Asset|Proposals|Orders|Invoices|FactureRec|BonPrelevement|Products|Thirdparties)::_fetch\S*\(\) expects int, string#' - '#(sendTicketMessageByEmail|addItemsFact|update_price|recur|addDepreciationLine|addline|generate|buildRumNumber|update|update_label|getSelectConditionsPaiements|select_state|listBoxes|addLineRec|literalBarcodeType)\(\) expects int, string#' - '#on array{url: mixed} in empty\(\) does not exist.#' - '#EvalMath::trigger\(\) expects string, int given#' - - '#get_next_value expects string, int given#' - '# Diff::generatePartialDiff\(\) expects array#' - '# EmailCollector::getpart\(\) expects string#' - '#expects int, float#'