mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 07:32:32 +01:00
Qual: Fix phan/phpstan notices (#31289)
* Qual: Fix phan/phpstan notices # Qual: Fix phan/phpstan notices Fix several phan/phpstan notices * Fix spelling in Changelog
This commit is contained in:
@@ -1102,7 +1102,7 @@ function GETPOSTINT($paramname, $method = 0)
|
||||
* Return the value of a $_GET or $_POST supervariable, converted into float.
|
||||
*
|
||||
* @param string $paramname Name of the $_GET or $_POST parameter
|
||||
* @param string|int $rounding Type of rounding ('', 'MU', 'MT, 'MS', 'CU', 'CT', integer) {@see price2num()}
|
||||
* @param ''|'MU'|'MT'|'MS'|'CU'|'CT'|int $rounding Type of rounding ('', 'MU', 'MT, 'MS', 'CU', 'CT', integer) {@see price2num()}
|
||||
* @return float Value converted into float
|
||||
* @since Dolibarr V20
|
||||
*/
|
||||
@@ -6670,8 +6670,8 @@ function vatrate($rate, $addpercent = false, $info_bits = 0, $usestarfornpr = 0,
|
||||
* @param int<0,1> $form Type of formatting: 1=HTML, 0=no formatting (no by default)
|
||||
* @param Translate|string|null $outlangs Object langs for output. '' use default lang. 'none' use international separators.
|
||||
* @param int $trunc 1=Truncate if there is more decimals than MAIN_MAX_DECIMALS_SHOWN (default), 0=Does not truncate. Deprecated because amount are rounded (to unit or total amount accuracy) before being inserted into database or after a computation, so this parameter should be useless.
|
||||
* @param int $rounding MINIMUM number of decimal to show: 0=no change, -1=we use min(getDolGlobalString('MAIN_MAX_DECIMALS_UNIT'), getDolGlobalString('MAIN_MAX_DECIMALS_TOT'))
|
||||
* @param int|string $forcerounding MAXIMUM number of decimal to forcerounding decimal: -1=no change, -2=keep non zero part, 'MU' or 'MT' or a numeric to round to MU or MT or to a given number of decimal
|
||||
* @param int<-1,max> $rounding MINIMUM number of decimal to show: 0=no change, -1=we use min(getDolGlobalString('MAIN_MAX_DECIMALS_UNIT'), getDolGlobalString('MAIN_MAX_DECIMALS_TOT'))
|
||||
* @param ''|'MU'|'MT'|'MS'|'CU'|'CT'|int<-2,max> $forcerounding MAXIMUM number of decimal to forcerounding decimal: -1=no change, -2=keep non zero part, 'MU' or 'MT' or a numeric to round to MU or MT or to a given number of decimal
|
||||
* @param string $currency_code To add currency symbol (''=add nothing, 'auto'=Use default currency, 'XXX'=add currency symbols for XXX currency)
|
||||
* @return string String with formatted amount
|
||||
*
|
||||
@@ -6786,14 +6786,14 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
|
||||
* should be roundtext2num().
|
||||
*
|
||||
* @param string|float $amount Amount to convert/clean or round
|
||||
* @param string|int $rounding ''=No rounding
|
||||
* 'MU'=Round to Max unit price (MAIN_MAX_DECIMALS_UNIT)
|
||||
* 'MT'=Round to Max for totals with Tax (MAIN_MAX_DECIMALS_TOT)
|
||||
* 'MS'=Round to Max for stock quantity (MAIN_MAX_DECIMALS_STOCK)
|
||||
* 'CU'=Round to Max unit price of foreign currency accuracy
|
||||
* 'CT'=Round to Max for totals with Tax of foreign currency accuracy
|
||||
* Numeric = Nb of digits for rounding (For example 2 for a percentage)
|
||||
* @param int $option Put 1 if you know that content is already universal format number (so no correction on decimal will be done)
|
||||
* @param ''|'MU'|'MT'|'MS'|'CU'|'CT'|int<0,max> $rounding ''=No rounding
|
||||
* 'MU'=Round to Max unit price (MAIN_MAX_DECIMALS_UNIT)
|
||||
* 'MT'=Round to Max for totals with Tax (MAIN_MAX_DECIMALS_TOT)
|
||||
* 'MS'=Round to Max for stock quantity (MAIN_MAX_DECIMALS_STOCK)
|
||||
* 'CU'=Round to Max unit price of foreign currency accuracy
|
||||
* 'CT'=Round to Max for totals with Tax of foreign currency accuracy
|
||||
* Numeric = Nb of digits for rounding (For example 2 for a percentage)
|
||||
* @param int<0,2> $option Put 1 if you know that content is already universal format number (so no correction on decimal will be done)
|
||||
* Put 2 if you know that number is a user input (so we know we have to fix decimal separator).
|
||||
* @return string Amount with universal numeric format (Example: '99.99999'), or error message.
|
||||
* If conversion fails to return a numeric, it returns:
|
||||
@@ -6931,7 +6931,7 @@ function price2num($amount, $rounding = '', $option = 0)
|
||||
* @param int $unit Unit scale of dimension (Example: 0=kg, -3=g, -6=mg, 98=ounce, 99=pound, ...)
|
||||
* @param string $type 'weight', 'volume', ...
|
||||
* @param Translate $outputlangs Translate language object
|
||||
* @param int $round -1 = non rounding, x = number of decimal
|
||||
* @param int<-1,max> $round -1 = non rounding, x = number of decimal
|
||||
* @param string $forceunitoutput 'no' or numeric (-3, -6, ...) compared to $unit (In most case, this value is value defined into $conf->global->MAIN_WEIGHT_DEFAULT_UNIT)
|
||||
* @param int $use_short_label 1=Use short label ('g' instead of 'gram'). Short labels are not translated.
|
||||
* @return string String to show dimensions
|
||||
|
||||
Reference in New Issue
Block a user