fix phan and phpstan

This commit is contained in:
Frédéric France 2024-12-17 20:32:52 +01:00
parent d898975123
commit 1ab4e57ab9
No known key found for this signature in database
GPG Key ID: CE25B0B7B53B9177
3 changed files with 3 additions and 8 deletions

View File

@ -30342,12 +30342,6 @@ parameters:
count: 2
path: ../../htdocs/salaries/paiement_salary.php
-
message: '#^Variable \$sumpaid might not be defined\.$#'
identifier: variable.undefined
count: 3
path: ../../htdocs/salaries/paiement_salary.php
-
message: '#^Negated boolean expression is always false\.$#'
identifier: booleanNot.alwaysFalse

View File

@ -523,7 +523,7 @@ return [
'htdocs/salaries/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
'htdocs/salaries/class/api_salaries.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
'htdocs/salaries/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
'htdocs/salaries/paiement_salary.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
'htdocs/salaries/paiement_salary.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
'htdocs/salaries/virement_request.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/societe/admin/societe.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'],
'htdocs/societe/ajax/company.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],

View File

@ -167,6 +167,7 @@ $help_url = '';
llxHeader('', '', $help_url);
$salary = $object;
$sumpaid = 0.0;
// Formulaire de creation d'un paiement de charge
if ($action == 'create') {
@ -214,7 +215,7 @@ if ($action == 'create') {
$resql = $db->query($sql);
if ($resql) {
$obj = $db->fetch_object($resql);
$sumpaid = $obj->total;
$sumpaid = (float) $obj->total;
$db->free($resql);
}
/*print '<tr><td>'.$langs->trans("AlreadyPaid").'</td><td>'.price($sumpaid,0,$outputlangs,1,-1,-1,$conf->currency).'</td></tr>';