From a82c517e09579c84470b3457884932f95dc79203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Sun, 5 Jan 2025 17:09:38 +0100 Subject: [PATCH] fix phpstan --- dev/build/phpstan/phpstan-baseline.neon | 18 ------------------ htdocs/comm/propal/class/propal.class.php | 4 ++-- htdocs/commande/class/commande.class.php | 4 ++-- htdocs/compta/facture/class/facture.class.php | 4 ++-- htdocs/contrat/class/contrat.class.php | 4 ++-- 5 files changed, 8 insertions(+), 26 deletions(-) diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index be42a96344b..9650d6771b0 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -9096,12 +9096,6 @@ parameters: count: 1 path: ../../../htdocs/core/class/commonobject.class.php - - - message: '#^Parameter \#17 \$pa_ht of method Commande\:\:updateline\(\) expects int, float given\.$#' - identifier: argument.type - count: 1 - path: ../../../htdocs/core/class/commonobject.class.php - - message: '#^Parameter \#2 \$line of method CommonObject\:\:printObjectLine\(\) expects CommonObjectLine, CommonObject\|stdClass given\.$#' identifier: argument.type @@ -20244,12 +20238,6 @@ parameters: count: 2 path: ../../../htdocs/fourn/commande/dispatch.php - - - message: '#^Variable \$reception might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/fourn/commande/dispatch.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -28734,12 +28722,6 @@ parameters: count: 16 path: ../../../htdocs/public/webportal/webportal.main.inc.php - - - message: '#^Variable \$logged_partnership might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/public/webportal/webportal.main.inc.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 3359667e3b2..2d63be548dd 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -13,7 +13,7 @@ * Copyright (C) 2013 Florian Henry * Copyright (C) 2014-2015 Marcos García * Copyright (C) 2018 Nicolas ZABOURI - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2022 ATM Consulting * Copyright (C) 2022 OpenDSI @@ -864,7 +864,7 @@ class Propal extends CommonObject * @param int $fk_parent_line Id of parent line (0 in most cases, used by modules adding sublevels into lines). * @param int $skip_update_total Keep fields total_xxx to 0 (used for special lines by some modules) * @param int $fk_fournprice Id of origin supplier price - * @param int $pa_ht Price (without tax) of product when it was bought + * @param float $pa_ht Price (without tax) of product when it was bought * @param string $label ??? * @param int $type 0/1=Product/service * @param int|string $date_start Start date of the line diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index e3b381a518a..00af4d7689f 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -11,7 +11,7 @@ * Copyright (C) 2014-2015 Marcos García * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2016-2022 Ferran Marcet - * Copyright (C) 2021-2024 Frédéric France + * Copyright (C) 2021-2025 Frédéric France * Copyright (C) 2022 Gauthier VERDOL * Copyright (C) 2024 MDW * Copyright (C) 2024 William Mead @@ -3123,7 +3123,7 @@ class Commande extends CommonOrder * @param int $fk_parent_line Id of parent line (0 in most cases, used by modules adding sublevels into lines). * @param int $skip_update_total Keep fields total_xxx to 0 (used for special lines by some modules) * @param int $fk_fournprice Id of origin supplier price - * @param int $pa_ht Price (without tax) of product when it was bought + * @param float $pa_ht Price (without tax) of product when it was bought * @param string $label Label * @param int $special_code Special code (also used by externals modules!) * @param array $array_options extrafields array diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 0d1435fa918..b4e9e4e24da 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -21,7 +21,7 @@ * Copyright (C) 2023 Gauthier VERDOL * Copyright (C) 2023 Nick Fragoulis * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -4145,7 +4145,7 @@ class Facture extends CommonInvoice * @param int $fk_parent_line Id of parent line (0 in most cases, used by modules adding sublevels into lines). * @param int $skip_update_total Keep fields total_xxx to 0 (used for special lines by some modules) * @param int $fk_fournprice Id of origin supplier price - * @param int $pa_ht Price (without tax) of product when it was bought + * @param float $pa_ht Price (without tax) of product when it was bought * @param string $label Label of the line (deprecated, do not use) * @param int $special_code Special code (also used by externals modules!) * @param array $array_options extrafields array diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 0f83d2dc1f4..8999641d19a 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -9,7 +9,7 @@ * Copyright (C) 2013 Florian Henry * Copyright (C) 2014-2015 Marcos García * Copyright (C) 2018 Nicolas ZABOURI - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2015-2018 Ferran Marcet * Copyright (C) 2024 William Mead * Copyright (C) 2024 MDW @@ -1701,7 +1701,7 @@ class Contrat extends CommonObject * @param string $price_base_type HT or TTC * @param int $info_bits Bits of type of lines * @param int $fk_fournprice Fourn price id - * @param int $pa_ht Buying price HT + * @param float $pa_ht Buying price HT * @param array $array_options extrafields array * @param string $fk_unit Code of the unit to use. Null to use the default one * @param int $rang Position