From cab697f557f9aab9a4cc7fce2d722e7cbf9a52ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 29 Sep 2024 13:07:21 +0200 Subject: [PATCH] fix phpstan (#31183) * fix phpstan * fix phpstan --- htdocs/core/lib/ldap.lib.php | 11 +++++------ phpstan.neon.dist | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/htdocs/core/lib/ldap.lib.php b/htdocs/core/lib/ldap.lib.php index a3ea72226a1..9b5c039372e 100644 --- a/htdocs/core/lib/ldap.lib.php +++ b/htdocs/core/lib/ldap.lib.php @@ -1,7 +1,8 @@ - * Copyright (C) 2006-2021 Regis Houssin - * Copyright (C) 2024 MDW +/* Copyright (C) 2006 Laurent Destailleur + * Copyright (C) 2006-2021 Regis Houssin + * Copyright (C) 2024 MDW + * Copyright (C) 2024 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 @@ -125,15 +126,13 @@ function show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass) * @param array<'count'|int|string,int|string|array> $result Array to show. This array is already encoded into charset_output * @param int $level Level * @param int $count Count - * @param string $var Var + * @param bool $var Var deprecated (replaced by css oddeven) * @param int<0,1> $hide Hide * @param int $subcount Subcount * @return int */ function show_ldap_content($result, $level, $count, $var, $hide = 0, $subcount = 0) { - global $bc, $conf; - $count--; if ($count == 0) { return -1; // To stop loop diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 0d72459e616..4510d0c9e7c 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -94,7 +94,6 @@ parameters: - '#::HTML2OpenIDServer\(\) expects string, array given.#' - '#create_line\(\) expects string, float given.#' - '# dol_stringtotime expects string, DateTime given.#' - - '# show_ldap_content expects string, true given.#' - '#expects string, bool\|mysqli_result\|resource given.#' - '#( |::)((multi)?selectarray)\(\) expects array#' - '# (reWriteAllMenus|check_authentication) expects array#'