From 3cb5235a38d02b7b0b49e1bf22e3b2ed032de337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Fri, 3 Jan 2025 18:17:19 +0100 Subject: [PATCH] fix phpstan --- build/phpstan/phpstan-baseline.neon | 18 ------------------ htdocs/install/check.php | 5 ++++- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/build/phpstan/phpstan-baseline.neon b/build/phpstan/phpstan-baseline.neon index f29a45f3b58..52a7cf2692d 100644 --- a/build/phpstan/phpstan-baseline.neon +++ b/build/phpstan/phpstan-baseline.neon @@ -21858,24 +21858,6 @@ parameters: count: 1 path: ../../htdocs/install/check.php - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 19 - path: ../../htdocs/install/check.php - - - - message: '#^Variable \$conffile might not be defined\.$#' - identifier: variable.undefined - count: 19 - path: ../../htdocs/install/check.php - - - - message: '#^Variable \$conffiletoshow might not be defined\.$#' - identifier: variable.undefined - count: 13 - path: ../../htdocs/install/check.php - - message: '#^Variable \$db might not be defined\.$#' identifier: variable.undefined diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 76cdc282233..5e9c4086283 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -7,7 +7,7 @@ * Copyright (C) 2014 Marcos García * Copyright (C) 2015-2016 Raphaël Doursenaud * 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 @@ -32,6 +32,7 @@ define('ALLOWED_IF_UPGRADE_UNLOCK_FOUND', 1); include_once 'inc.php'; /** + * @var Conf $conf already created in inc.php * @var Translate $langs * * @var string $dolibarr_main_db_host @@ -39,6 +40,8 @@ include_once 'inc.php'; * @var string $dolibarr_main_db_name * @var string $dolibarr_main_db_user * @var string $dolibarr_main_db_pass + * @var string $conffile + * @var string $conffiletoshow */ $err = 0;