Remove unneeded method_exists

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
Kamil Tekiela 2026-02-15 19:41:52 +00:00
parent 43ac9ef575
commit f23caa7308
2 changed files with 1 additions and 11 deletions

View File

@ -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

View File

@ -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" . '<div id="' . $propertyGroup->getName() . '">';
$text = null;
if (method_exists($propertyGroup, 'getText')) {
$text = $propertyGroup->getText();
}
$text = $propertyGroup->getText();
if ($text !== null && $text !== '') {
$ret .= '<h5 class="card-title mt-4 mb-2">' . $plugin->getTranslatedText($text) . '</h5>';