Remove unneeded method_exists
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
parent
43ac9ef575
commit
f23caa7308
@ -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
|
||||
|
||||
@ -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>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user