From fda88da69fc3eaad17d80c0a9ed942a7dc4781a7 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 29 Oct 2023 21:06:33 +0100 Subject: [PATCH] refactoring --- lam/templates/misc/ajax.php | 4 ---- phpstan.neon | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lam/templates/misc/ajax.php b/lam/templates/misc/ajax.php index cb75672fb..93dabba52 100644 --- a/lam/templates/misc/ajax.php +++ b/lam/templates/misc/ajax.php @@ -406,7 +406,6 @@ class Ajax { private function dnSelection(): string { $dn = trim($_POST['dn']); if (empty($dn) || !get_preg($dn, 'dn')) { - $dnList = $this->getDefaultDns(); return ''; } else { @@ -414,9 +413,6 @@ class Ajax { } $html = $this->buildDnSelectionHtml($dnList, $dn); $json = json_encode(['dialogData' => $html], JSON_THROW_ON_ERROR); - if ($json === false) { - return ''; - } return $json; } diff --git a/phpstan.neon b/phpstan.neon index 1ac9c7e93..8941d22e2 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -34,6 +34,6 @@ parameters: - '#Parameter \#1 \$array of function array_keys expects array, mixed given.#' - '#Argument of an invalid type mixed supplied for foreach, only iterables are supported.#' - '#Parameter \#2 \$args of function call_user_func_array expects array, mixed given.#' - - '#Parameter \#1 \$input of method LAM\\AJAX\\Ajax::managePasswordChange\(\) expects array, mixed given.#' + - '#Parameter \#1 \$input of static method LAM\\AJAX\\Ajax::managePasswordChange\(\) expects array, mixed given.#' - '#Parameter \#1 \$input of method LAM\\AJAX\\Ajax::checkPasswordStrength\(\) expects array, mixed given.#' - '#Cannot access offset non-falsy-string on array\|object.#'