fix phpstan (#31161)

* fix phpstan

* fix phpstan
This commit is contained in:
Frédéric FRANCE 2024-09-28 11:16:05 +02:00 committed by GitHub
parent 340bd12ee7
commit 752eaea64e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 4 deletions

View File

@ -6907,7 +6907,7 @@ abstract class CommonObject
}
break;
case 'double':
$value = price2num($value);
$value = price2num((string) $value);
if (!is_numeric($value) && $value != '') {
dol_syslog($langs->trans("ExtraLanguageHasWrongValue")." on ".$attributeLabel."(".$value."is not '".$attributeType."')", LOG_DEBUG);
$this->errors[] = $langs->trans("ExtraLanguageHasWrongValue", $attributeLabel);

View File

@ -724,7 +724,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
$pdf->MultiCell($largcol2, $tab2_hl, price((string) $tvaval, 0, $outputlangs), 0, 'R', 1);
}
}
//}
@ -749,7 +749,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
$pdf->MultiCell($largcol2, $tab2_hl, price((string) $tvaval, 0, $outputlangs), 0, 'R', 1);
}
}
//}

View File

@ -86,7 +86,6 @@ parameters:
- '#::saveboxorder\(\) expects int, array#'
- '# (fetchObjectByElement|print_actions_filter|dol_mktime|dol_get_first_day|dol_remove_file_process|displayUsersListWithPicto) expects int, array\|string given.#'
- '# (CSMSFile) constructor expects int, array\|string given.#'
- '# (?:price(?:2num)?) expects float\|string#'
- '#(?:ProductFournisseur::logPrice\(\)) expects float\|null#'
- '#(?:(?:Asset::addDepreciationL|Facture(?:(?:(?:Fournisseur)?::add|Fournisseur::update)l))ine\(\)|calcul_price_total|dol_convertToWord|(?:loanCalcMonthlyPaymen|print_paypal_redirec)t) expects float, string given.#'
- '#(?:(?:EvalMath::trigger|F(?:acture(?:(?:Fournisseur)?Rec::addline)|ichinterRec::addLineRec)|SMTPs::socket_send_str)\(\)|dolMd2Html|setEventMessages) expects string\|null#'