From 2ece62ec0dbbd51865aa8eed8ace461d82c538e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 19 Nov 2024 03:04:41 +0100 Subject: [PATCH] fix phpstan (#31994) * fix phpstan * fix phpstan --- build/phpstan/phpstan-baseline.neon | 54 ---------------------------- htdocs/comm/recap-client.php | 2 +- htdocs/contact/note.php | 2 +- htdocs/fourn/recap-fourn.php | 2 +- htdocs/product/note.php | 2 +- htdocs/public/website/styles.css.php | 6 +++- htdocs/societe/note.php | 2 +- htdocs/user/document.php | 2 +- 8 files changed, 11 insertions(+), 61 deletions(-) diff --git a/build/phpstan/phpstan-baseline.neon b/build/phpstan/phpstan-baseline.neon index 7fb11807257..55b851c12de 100644 --- a/build/phpstan/phpstan-baseline.neon +++ b/build/phpstan/phpstan-baseline.neon @@ -24804,36 +24804,6 @@ parameters: count: 3 path: ../../htdocs/loan/class/paymentloan.class.php - - - message: '#^Variable \$maxlength might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/loan/document.php - - - - message: '#^Variable \$morehtmlright might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/loan/document.php - - - - message: '#^Variable \$search_all might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/loan/list.php - - - - message: '#^Variable \$formproject might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/loan/note.php - - - - message: '#^Variable \$maxlength might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/loan/note.php - - message: '#^Variable \$object might not be defined\.$#' identifier: variable.undefined @@ -24882,12 +24852,6 @@ parameters: count: 4 path: ../../htdocs/loan/payment/payment.php - - - message: '#^Variable \$maxlength might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/loan/schedule.php - - message: '#^Variable \$result might not be defined\.$#' identifier: variable.undefined @@ -31302,24 +31266,6 @@ parameters: count: 1 path: ../../htdocs/public/website/styles.css.php - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/public/website/styles.css.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/public/website/styles.css.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/public/website/styles.css.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse diff --git a/htdocs/comm/recap-client.php b/htdocs/comm/recap-client.php index 7f3eedd4c9f..550baca1931 100644 --- a/htdocs/comm/recap-client.php +++ b/htdocs/comm/recap-client.php @@ -62,7 +62,7 @@ if ($socid > 0) { $societe->fetch($socid); /* - * Affichage onglets + * Show tabs */ $head = societe_prepare_head($societe); diff --git a/htdocs/contact/note.php b/htdocs/contact/note.php index 0e361fab772..4a10306005f 100644 --- a/htdocs/contact/note.php +++ b/htdocs/contact/note.php @@ -96,7 +96,7 @@ llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-societe page-contact if ($id > 0) { /* - * Affichage onglets + * Show tabs */ if (isModEnabled('notification')) { $langs->load("mails"); diff --git a/htdocs/fourn/recap-fourn.php b/htdocs/fourn/recap-fourn.php index 5930c489ef0..92ce582e8dd 100644 --- a/htdocs/fourn/recap-fourn.php +++ b/htdocs/fourn/recap-fourn.php @@ -66,7 +66,7 @@ if ($socid > 0) { $societe->fetch($socid); /* - * Affichage onglets + * Show tabs */ $head = societe_prepare_head($societe); diff --git a/htdocs/product/note.php b/htdocs/product/note.php index 6b087600a4a..a3a4ba2fa8d 100644 --- a/htdocs/product/note.php +++ b/htdocs/product/note.php @@ -117,7 +117,7 @@ llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-product page-card_no if ($id > 0 || !empty($ref)) { /* - * Affichage onglets + * Show tabs */ if (isModEnabled('notification')) { $langs->load("mails"); diff --git a/htdocs/public/website/styles.css.php b/htdocs/public/website/styles.css.php index 7127647b534..f26ee0a2683 100644 --- a/htdocs/public/website/styles.css.php +++ b/htdocs/public/website/styles.css.php @@ -85,7 +85,11 @@ function llxFooter($comment = '', $zone = 'private', $disabledoutputofmessages = require '../../master.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - +/** + * @var Conf $conf + * @var DoliDB $db + * @var Translate $langs + */ $error = 0; $website = GETPOST('website', 'alpha'); diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index 36ad653a329..29419145ba6 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -99,7 +99,7 @@ llxHeader('', $title, $help_url); if ($object->id > 0) { /* - * Affichage onglets + * Show tabs */ $head = societe_prepare_head($object); diff --git a/htdocs/user/document.php b/htdocs/user/document.php index 9e6f561a564..88917868a7f 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -147,7 +147,7 @@ llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-user page-card_docum if ($object->id) { /* - * Affichage onglets + * Show tabs */ if (isModEnabled('notification')) { $langs->load("mails");