qual: phpstan for /htdocs/compta/bank/card.php

htdocs/compta/bank/card.php	130	Property Account::$courant (int) does not accept array|string.
htdocs/compta/bank/card.php	131	Property Account::$clos (int) does not accept array|string.
htdocs/compta/bank/card.php	162	Property Account::$fk_accountancy_journal (int) does not accept string.
htdocs/compta/bank/card.php	164	Property Account::$fk_accountancy_journal (int) does not accept array|string.
htdocs/compta/bank/card.php	167	Property Account::$solde (float) does not accept string.
htdocs/compta/bank/card.php	168	Property Account::$balance (float) does not accept string.
htdocs/compta/bank/card.php	173	Property Account::$state_id (int) does not accept array|string.
htdocs/compta/bank/card.php	174	Property CommonObject::$country_id (int) does not accept array|string.
htdocs/compta/bank/card.php	176	Property Account::$min_allowed (float) does not accept array|string.
htdocs/compta/bank/card.php	177	Property Account::$min_desired (float) does not accept array|string.
htdocs/compta/bank/card.php	243	Property Account::$courant (int) does not accept array|string.
htdocs/compta/bank/card.php	244	Property Account::$clos (int) does not accept array|string.
htdocs/compta/bank/card.php	275	Property Account::$fk_accountancy_journal (int) does not accept string.
htdocs/compta/bank/card.php	277	Property Account::$fk_accountancy_journal (int) does not accept array|string.
htdocs/compta/bank/card.php	282	Property Account::$state_id (int) does not accept array|string.
htdocs/compta/bank/card.php	283	Property CommonObject::$country_id (int) does not accept array|string.
htdocs/compta/bank/card.php	285	Property Account::$min_allowed (float) does not accept array|string.
htdocs/compta/bank/card.php	286	Property Account::$min_desired (float) does not accept array|string.
This commit is contained in:
thibdrev 2024-01-24 20:14:54 +01:00 committed by GitHub
parent c451526d2a
commit 7a8bb902e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -127,8 +127,8 @@ if (empty($reshook)) {
$object->ref = dol_string_nospecial(trim(GETPOST('ref', 'alpha')));
$object->label = trim(GETPOST("label", 'alphanohtml'));
$object->courant = GETPOST("type");
$object->clos = GETPOST("clos");
$object->courant = GETPOSTINT("type");
$object->clos = GETPOSTINT("clos");
$object->rappro = (GETPOST("norappro", 'alpha') ? 0 : 1);
$object->url = trim(GETPOST("url", 'alpha'));
@ -157,24 +157,24 @@ if (empty($reshook)) {
} else {
$object->account_number = $account_number;
}
$fk_accountancy_journal = GETPOST('fk_accountancy_journal', 'int');
$fk_accountancy_journal = GETPOSTINT('fk_accountancy_journal');
if ($fk_accountancy_journal <= 0) {
$object->fk_accountancy_journal = '';
} else {
$object->fk_accountancy_journal = $fk_accountancy_journal;
}
$object->solde = price2num(GETPOST("solde", 'alpha'));
$object->balance = price2num(GETPOST("solde", 'alpha'));
$object->solde = GETPOSTFLOAT("solde");
$object->balance = GETPOSTFLOAT("solde");
$object->date_solde = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST('reday', 'int'), GETPOST("reyear", 'int'));
$object->currency_code = trim(GETPOST("account_currency_code"));
$object->state_id = GETPOST("account_state_id", 'int');
$object->country_id = GETPOST("account_country_id", 'int');
$object->state_id = GETPOSTINT("account_state_id");
$object->country_id = GETPOSTINT("account_country_id");
$object->min_allowed = GETPOST("account_min_allowed", 'int');
$object->min_desired = GETPOST("account_min_desired", 'int');
$object->min_allowed = GETPOSTFLOAT("account_min_allowed");
$object->min_desired = GETPOSTFLOAT("account_min_desired");
$object->comment = trim(GETPOST("account_comment", 'restricthtml'));
$object->fk_user_author = $user->id;
@ -240,8 +240,8 @@ if (empty($reshook)) {
$object->ref = dol_string_nospecial(trim(GETPOST('ref', 'alpha')));
$object->label = trim(GETPOST("label", 'alphanohtml'));
$object->courant = GETPOST("type");
$object->clos = GETPOST("clos");
$object->courant = GETPOSTINT("type");
$object->clos = GETPOSTINT("clos");
$object->rappro = (GETPOST("norappro", 'alpha') ? 0 : 1);
$object->url = trim(GETPOST("url", 'alpha'));
@ -270,7 +270,7 @@ if (empty($reshook)) {
} else {
$object->account_number = $account_number;
}
$fk_accountancy_journal = GETPOST('fk_accountancy_journal', 'int');
$fk_accountancy_journal = GETPOSTINT('fk_accountancy_journal');
if ($fk_accountancy_journal <= 0) {
$object->fk_accountancy_journal = '';
} else {
@ -279,11 +279,11 @@ if (empty($reshook)) {
$object->currency_code = trim(GETPOST("account_currency_code"));
$object->state_id = GETPOST("account_state_id", 'int');
$object->country_id = GETPOST("account_country_id", 'int');
$object->state_id = GETPOSTINT("account_state_id");
$object->country_id = GETPOSTINT("account_country_id");
$object->min_allowed = GETPOST("account_min_allowed", 'int');
$object->min_desired = GETPOST("account_min_desired", 'int');
$object->min_allowed = GETPOSTFLOAT("account_min_allowed");
$object->min_desired = GETPOSTFLOAT("account_min_desired");
$object->comment = trim(GETPOST("account_comment", 'restricthtml'));
if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED && empty($object->account_number)) {