From f23caa7308100640963c41c9ca18bfa5e92f2c03 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Sun, 15 Feb 2026 19:41:52 +0000 Subject: [PATCH] Remove unneeded method_exists Signed-off-by: Kamil Tekiela --- phpstan-baseline.neon | 6 ------ src/Plugins.php | 6 +----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 5e7b53da2a..8cfde8f73a 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -8277,12 +8277,6 @@ parameters: count: 2 path: src/Plugins.php - - - message: '#^Call to function method_exists\(\) with PhpMyAdmin\\Properties\\Options\\OptionsPropertyItem and ''getText'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: src/Plugins.php - - message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#' identifier: empty.notAllowed diff --git a/src/Plugins.php b/src/Plugins.php index 425f853b9d..11475dd5a4 100644 --- a/src/Plugins.php +++ b/src/Plugins.php @@ -35,7 +35,6 @@ use function is_subclass_of; use function mb_strtolower; use function mb_strtoupper; use function mb_substr; -use function method_exists; use function sprintf; use function str_starts_with; use function strcasecmp; @@ -286,10 +285,7 @@ class Plugins // for main groups $ret .= "\n" . '
'; - $text = null; - if (method_exists($propertyGroup, 'getText')) { - $text = $propertyGroup->getText(); - } + $text = $propertyGroup->getText(); if ($text !== null && $text !== '') { $ret .= '
' . $plugin->getTranslatedText($text) . '
';