* phpstan

* phpstan
This commit is contained in:
Frédéric FRANCE
2024-10-05 18:49:54 +02:00
committed by GitHub
parent 868d885806
commit 7fe28032d1
2 changed files with 3 additions and 3 deletions

View File

@@ -4825,8 +4825,8 @@ function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF
} elseif ($trunc == 'middle') {
$newstring = dol_textishtml($string) ? dol_string_nohtmltag($string, 1) : $string;
if (dol_strlen($newstring, $stringencoding) > 2 && dol_strlen($newstring, $stringencoding) > ($size + 1)) {
$size1 = round($size / 2);
$size2 = round($size / 2);
$size1 = (int) round($size / 2);
$size2 = (int) round($size / 2);
return dol_substr($newstring, 0, $size1, $stringencoding).'…'.dol_substr($newstring, dol_strlen($newstring, $stringencoding) - $size2, $size2, $stringencoding);
} else {
return $string;

View File

@@ -71,7 +71,7 @@ parameters:
- '# SMTPs::(getFrom|getErrorsTo|getReplyTo)\(\) expects bool, string given.#'
- '# getLocalTaxesFromRate expects int\|string#'
- '#::(options)\(\) expects int\|string#'
- '# (print_barre_liste|dol_substr) expects int\|null#'
- '# print_barre_liste expects int\|null#'
- '#(?:colorAdjustBrightness|imap_(?:(?:fetch)?body|fetchstructure)) expects int, string#'
- '#(sendTicketMessageByEmail|addItemsFact|update_price|recur|addDepreciationLine|addline|generate|update|getSelectConditionsPaiements|select_state|listBoxes|literalBarcodeType)\(\) expects int, string#'
- '#on array{url: mixed} in empty\(\) does not exist.#'