mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge pull request #32466 from frederic34/phpstan_merry_christmas
fix phpstan 🎅 🎄
This commit is contained in:
commit
4e4bdb812c
|
|
@ -5592,12 +5592,6 @@ parameters:
|
|||
count: 3
|
||||
path: ../../htdocs/compta/facture/class/facture-rec.class.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#1 \$qty of function calcul_price_total expects float, string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 1
|
||||
path: ../../htdocs/compta/facture/class/facture-rec.class.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#1 \$vatrate of function getLocalTaxesFromRate expects int\|string, float given\.$#'
|
||||
identifier: argument.type
|
||||
|
|
@ -5610,12 +5604,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../htdocs/compta/facture/class/facture-rec.class.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#2 \$pu of function calcul_price_total expects float, string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 1
|
||||
path: ../../htdocs/compta/facture/class/facture-rec.class.php
|
||||
|
||||
-
|
||||
message: '#^Property CommonObject\:\:\$array_options \(array\<string, mixed\>\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
|
|
@ -5670,12 +5658,6 @@ parameters:
|
|||
count: 3
|
||||
path: ../../htdocs/compta/facture/class/facture.class.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#1 \$qty of function calcul_price_total expects float, string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 2
|
||||
path: ../../htdocs/compta/facture/class/facture.class.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#1 \$substitutionarray of function complete_substitutions_array expects array\<string, string\>, array\<string, int\|string\> given\.$#'
|
||||
identifier: argument.type
|
||||
|
|
@ -5688,42 +5670,18 @@ parameters:
|
|||
count: 2
|
||||
path: ../../htdocs/compta/facture/class/facture.class.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#15 \$pu_devise of function calcul_price_total expects float, string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 2
|
||||
path: ../../htdocs/compta/facture/class/facture.class.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#2 \$alreadypaid of method CommonInvoice\:\:getLibStatut\(\) expects int, float given\.$#'
|
||||
identifier: argument.type
|
||||
count: 1
|
||||
path: ../../htdocs/compta/facture/class/facture.class.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#2 \$pu of function calcul_price_total expects float, string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 2
|
||||
path: ../../htdocs/compta/facture/class/facture.class.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#4 \$txtva of method Facture\:\:addline\(\) expects float, string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 1
|
||||
path: ../../htdocs/compta/facture/class/facture.class.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#5 \$uselocaltax1_rate of function calcul_price_total expects float, string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 1
|
||||
path: ../../htdocs/compta/facture/class/facture.class.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#6 \$uselocaltax2_rate of function calcul_price_total expects float, string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 1
|
||||
path: ../../htdocs/compta/facture/class/facture.class.php
|
||||
|
||||
-
|
||||
message: '#^Property CommonInvoice\:\:\$close_code \(string\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
|
|
|
|||
|
|
@ -975,14 +975,14 @@ class FactureRec extends CommonInvoice
|
|||
if (empty($remise_percent)) {
|
||||
$remise_percent = 0;
|
||||
}
|
||||
$qty = price2num($qty);
|
||||
$pu_ht = price2num($pu_ht);
|
||||
$pu_ttc = price2num($pu_ttc);
|
||||
$qty = (float) price2num($qty);
|
||||
$pu_ht = (float) price2num($pu_ht);
|
||||
$pu_ttc = (float) price2num($pu_ttc);
|
||||
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
$txlocaltax1 = (float) price2num($txlocaltax1);
|
||||
$txlocaltax2 = (float) price2num($txlocaltax2);
|
||||
if (empty($txtva)) {
|
||||
$txtva = 0;
|
||||
}
|
||||
|
|
@ -1183,8 +1183,8 @@ class FactureRec extends CommonInvoice
|
|||
if (!preg_match('/\((.*)\)/', (string) $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
$txlocaltax1 = (float) price2num($txlocaltax1);
|
||||
$txlocaltax2 = (float) price2num($txlocaltax2);
|
||||
if (empty($txlocaltax1)) {
|
||||
$txlocaltax1 = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3946,16 +3946,16 @@ class Facture extends CommonInvoice
|
|||
}
|
||||
|
||||
$remise_percent = (float) price2num($remise_percent);
|
||||
$qty = price2num($qty);
|
||||
$pu_ht = price2num($pu_ht);
|
||||
$pu_ht_devise = price2num($pu_ht_devise);
|
||||
$pu_ttc = price2num($pu_ttc);
|
||||
$pa_ht = price2num($pa_ht);
|
||||
$qty = (float) price2num($qty);
|
||||
$pu_ht = (float) price2num($pu_ht);
|
||||
$pu_ht_devise = (float) price2num($pu_ht_devise);
|
||||
$pu_ttc = (float) price2num($pu_ttc);
|
||||
$pa_ht = (float) price2num($pa_ht);
|
||||
if (!preg_match('/\((.*)\)/', (string) $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
$txlocaltax1 = (float) price2num($txlocaltax1);
|
||||
$txlocaltax2 = (float) price2num($txlocaltax2);
|
||||
|
||||
if ($price_base_type == 'HT') {
|
||||
$pu = $pu_ht;
|
||||
|
|
@ -4208,15 +4208,15 @@ class Facture extends CommonInvoice
|
|||
}
|
||||
|
||||
$remise_percent = (float) price2num($remise_percent);
|
||||
$qty = price2num($qty);
|
||||
$pu = price2num($pu);
|
||||
$pu_ht_devise = price2num($pu_ht_devise);
|
||||
$pa_ht = price2num($pa_ht);
|
||||
$qty = (float) price2num($qty);
|
||||
$pu = (float) price2num($pu);
|
||||
$pu_ht_devise = (float) price2num($pu_ht_devise);
|
||||
$pa_ht = (float) price2num($pa_ht);
|
||||
if (!preg_match('/\((.*)\)/', (string) $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
$txlocaltax1 = (float) price2num($txlocaltax1);
|
||||
$txlocaltax2 = (float) price2num($txlocaltax2);
|
||||
$txlocaltax1 = (float) price2num($txlocaltax1);
|
||||
$txlocaltax2 = (float) price2num($txlocaltax2);
|
||||
|
||||
// Check parameters
|
||||
if ($type < 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user