From 119456ce0f96fbefb0ef1f9997344cd3d44dde1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 29 Sep 2024 15:29:56 +0200 Subject: [PATCH] fix phpstan (#31182) * fix phpstan * fix phpstan --------- Co-authored-by: Laurent Destailleur --- htdocs/hrm/compare.php | 14 +++++++------- phpstan.neon.dist | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/hrm/compare.php b/htdocs/hrm/compare.php index 9974d4f8347..9e40bd8bcfd 100644 --- a/htdocs/hrm/compare.php +++ b/htdocs/hrm/compare.php @@ -121,10 +121,10 @@ print dol_get_fiche_head($head, 'compare', '', 1); $fk_usergroup2 = 0; $fk_job = (int) GETPOST('fk_job'); if ($fk_job <= 0) { - $fk_usergroup2 = GETPOST('fk_usergroup2'); + $fk_usergroup2 = GETPOSTINT('fk_usergroup2'); } -$fk_usergroup1 = GETPOST('fk_usergroup1'); +$fk_usergroup1 = GETPOSTINT('fk_usergroup1'); ?> @@ -237,11 +237,11 @@ $fk_usergroup1 = GETPOST('fk_usergroup1'); $job = new Job($db); $job->fetch($fk_job); $userlist2 = ''; +
  • +

    ' . $job->label . '

    +

    ' . $job->description . '

    +
  • + '; } else { $userlist2 = displayUsersListWithPicto($TUser2, $fk_usergroup2, 'list2'); $TSkill2 = getSkillForUsers($TUser2); diff --git a/phpstan.neon.dist b/phpstan.neon.dist index d985f2d1474..89b88e27b15 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -84,7 +84,7 @@ parameters: - '# EmailCollector::getpart\(\) expects string#' - '#expects int, float#' - '#::saveboxorder\(\) expects int, array#' - - '# (fetchObjectByElement|print_actions_filter|dol_mktime|dol_remove_file_process|displayUsersListWithPicto) expects int, array\|string given.#' + - '# (fetchObjectByElement|print_actions_filter|dol_mktime|dol_remove_file_process) expects int, array\|string given.#' - '# (CSMSFile) constructor expects int, array\|string given.#' - '#(?:ProductFournisseur::logPrice\(\)) expects float\|null#' - '#(?:(?:Asset::addDepreciationL|Facture(?:(?:(?:Fournisseur)?::add|Fournisseur::update)l))ine\(\)|calcul_price_total|dol_convertToWord|(?:loanCalcMonthlyPaymen|print_paypal_redirec)t) expects float, string given.#'