From 5c740cce6dc8d31241eefcda856313ae5203e5ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Sat, 1 Mar 2025 10:10:40 +0100 Subject: [PATCH] fix phpstan --- dev/build/phpstan/phpstan-baseline.neon | 90 ------------------------- htdocs/core/extrafieldsinexport.inc.php | 22 ++++++ htdocs/core/extrafieldsinimport.inc.php | 22 ++++++ 3 files changed, 44 insertions(+), 90 deletions(-) diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index 3503fe0debf..031706786df 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -10800,96 +10800,6 @@ parameters: count: 1 path: ../../../htdocs/core/db/sqlite3.class.php - - - message: '#^Cannot access property \$db on mixed\.$#' - identifier: property.nonObject - count: 3 - path: ../../../htdocs/core/extrafieldsinexport.inc.php - - - - message: '#^Cannot access property \$export_TypeFields_array on mixed\.$#' - identifier: property.nonObject - count: 2 - path: ../../../htdocs/core/extrafieldsinexport.inc.php - - - - message: '#^Cannot access property \$export_entities_array on mixed\.$#' - identifier: property.nonObject - count: 2 - path: ../../../htdocs/core/extrafieldsinexport.inc.php - - - - message: '#^Cannot access property \$export_fields_array on mixed\.$#' - identifier: property.nonObject - count: 2 - path: ../../../htdocs/core/extrafieldsinexport.inc.php - - - - message: '#^Cannot access property \$export_special_array on mixed\.$#' - identifier: property.nonObject - count: 1 - path: ../../../htdocs/core/extrafieldsinexport.inc.php - - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/extrafieldsinexport.inc.php - - - - message: '#^Variable \$r might not be defined\.$#' - identifier: variable.undefined - count: 7 - path: ../../../htdocs/core/extrafieldsinexport.inc.php - - - - message: '#^Variable \$this might not be defined\.$#' - identifier: variable.undefined - count: 10 - path: ../../../htdocs/core/extrafieldsinexport.inc.php - - - - message: '#^Cannot access property \$db on mixed\.$#' - identifier: property.nonObject - count: 3 - path: ../../../htdocs/core/extrafieldsinimport.inc.php - - - - message: '#^Cannot access property \$import_TypeFields_array on mixed\.$#' - identifier: property.nonObject - count: 2 - path: ../../../htdocs/core/extrafieldsinimport.inc.php - - - - message: '#^Cannot access property \$import_entities_array on mixed\.$#' - identifier: property.nonObject - count: 2 - path: ../../../htdocs/core/extrafieldsinimport.inc.php - - - - message: '#^Cannot access property \$import_fields_array on mixed\.$#' - identifier: property.nonObject - count: 2 - path: ../../../htdocs/core/extrafieldsinimport.inc.php - - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/extrafieldsinimport.inc.php - - - - message: '#^Variable \$r might not be defined\.$#' - identifier: variable.undefined - count: 6 - path: ../../../htdocs/core/extrafieldsinimport.inc.php - - - - message: '#^Variable \$this might not be defined\.$#' - identifier: variable.undefined - count: 9 - path: ../../../htdocs/core/extrafieldsinimport.inc.php - - message: '#^Variable \$conf might not be defined\.$#' identifier: variable.undefined diff --git a/htdocs/core/extrafieldsinexport.inc.php b/htdocs/core/extrafieldsinexport.inc.php index 52cea37c47b..189022990a3 100644 --- a/htdocs/core/extrafieldsinexport.inc.php +++ b/htdocs/core/extrafieldsinexport.inc.php @@ -1,5 +1,27 @@ + * Copyright (C) 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +/** + * @var Conf $conf + * @var DolibarrModules $this + * @var string $keyforselect + * @var string $keyforelement + * @var string $keyforaliasextra + * @var int $r */ ' @phan-var-force DolibarrModules $this diff --git a/htdocs/core/extrafieldsinimport.inc.php b/htdocs/core/extrafieldsinimport.inc.php index 740043d47c0..4cc23c37945 100644 --- a/htdocs/core/extrafieldsinimport.inc.php +++ b/htdocs/core/extrafieldsinimport.inc.php @@ -1,5 +1,27 @@ + * Copyright (C) 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +/** + * @var Conf $conf + * @var DolibarrModules $this + * @var string $keyforselect + * @var string $keyforelement + * @var string $keyforaliasextra + * @var int $r */ '@phan-var-force DolibarrModules $this';