From 13bc1e2e1641f159ca7b635acd3e12864cd72e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 4 Nov 2025 18:46:24 +0100 Subject: [PATCH] clean code (#36098) * clean code * clean baseline --- dev/build/phpstan/phpstan-baseline.neon | 42 ------------------------- htdocs/core/lib/fichinter.lib.php | 4 +-- 2 files changed, 2 insertions(+), 44 deletions(-) diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index 77593ce99a4..fe93cf61878 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -144,18 +144,6 @@ parameters: count: 1 path: ../../../htdocs/accountancy/class/accountancyexport.class.php - - - message: '#^Variable \$invoice might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/accountancy/class/accountancyexport.class.php - - - - message: '#^Call to function array_key_exists\(\) with ''error'' and array\{ref\: mixed, label\: mixed, acquisition_value_ht\: mixed, depreciation\: non\-empty\-array\, disposal\?\: array\{date\: mixed, amount\: mixed, subject_to_vat\: bool\}\} will always evaluate to false\.$#' - identifier: function.impossibleType - count: 1 - path: ../../../htdocs/accountancy/class/accountingjournal.class.php - - message: '#^Parameter \#2 \$callback of function array_filter expects \(callable\(string\)\: bool\)\|null, ''strlen'' given\.$#' identifier: argument.type @@ -174,18 +162,6 @@ parameters: count: 1 path: ../../../htdocs/accountancy/class/lettering.class.php - - - message: '#^Variable \$save_element_by_link might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/accountancy/class/lettering.class.php - - - - message: '#^Variable \$save_link_by_element might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/accountancy/class/lettering.class.php - - message: '#^Parameter \#2 \$callback of function array_filter expects \(callable\(string\)\: bool\)\|null, ''strlen'' given\.$#' identifier: argument.type @@ -198,12 +174,6 @@ parameters: count: 2 path: ../../../htdocs/accountancy/closure/index.php - - - message: '#^Variable \$current_fiscal_period in isset\(\) always exists and is not nullable\.$#' - identifier: isset.variable - count: 4 - path: ../../../htdocs/accountancy/closure/index.php - - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue @@ -324,12 +294,6 @@ parameters: count: 1 path: ../../../htdocs/accountancy/journal/expensereportsjournal.php - - - message: '#^Variable \$def_tva might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/accountancy/journal/expensereportsjournal.php - - message: '#^Ternary operator condition is always true\.$#' identifier: ternary.alwaysTrue @@ -14520,12 +14484,6 @@ parameters: count: 1 path: ../../../htdocs/reception/class/reception.class.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/reception/class/receptionlinebatch.class.php - - message: '#^Property ReceptionLineBatch\:\:\$batch \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property diff --git a/htdocs/core/lib/fichinter.lib.php b/htdocs/core/lib/fichinter.lib.php index b42ec0d0d31..9fb1ea40106 100644 --- a/htdocs/core/lib/fichinter.lib.php +++ b/htdocs/core/lib/fichinter.lib.php @@ -31,7 +31,7 @@ /** * Prepare array with list of tabs * - * @param CommonObject $object Object related to tabs + * @param Fichinter $object Object related to tabs * @return array Array of tabs to show */ function fichinter_prepare_head($object) @@ -221,7 +221,7 @@ function fichinter_admin_prepare_head() /** * Prepare array with list of tabs * - * @param Object $object Object related to tabs + * @param FichinterRec $object Object related to tabs * @return array Array of tabs to show */ function fichinter_rec_prepare_head($object)