diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 6bd9e76da3..b1e0f735bc 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -11118,12 +11118,6 @@ parameters: count: 2 path: src/Partitioning/Partition.php - - - message: '#^Method PhpMyAdmin\\Partitioning\\Partition\:\:getPartitionMethod\(\) should return string\|null but returns mixed\.$#' - identifier: return.type - count: 1 - path: src/Partitioning/Partition.php - - message: '#^Only booleans are allowed in an if condition, string\|false\|null given\.$#' identifier: if.condNotBoolean diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 07ee639c3c..eeed9a2888 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -6497,12 +6497,6 @@ name]]> - - - - - - diff --git a/src/Partitioning/Partition.php b/src/Partitioning/Partition.php index 9de31667db..674aa72d2b 100644 --- a/src/Partitioning/Partition.php +++ b/src/Partitioning/Partition.php @@ -207,14 +207,14 @@ class Partition extends SubPartition { if (self::havePartitioning()) { $dbi = DatabaseInterface::getInstance(); - $partitionMethod = $dbi->fetchResultSimple( + $partitionMethod = $dbi->fetchValue( 'SELECT `PARTITION_METHOD` FROM `information_schema`.`PARTITIONS`' . ' WHERE `TABLE_SCHEMA` = ' . $dbi->quoteString($db) . ' AND `TABLE_NAME` = ' . $dbi->quoteString($table) . ' LIMIT 1', ); - if ($partitionMethod !== []) { - return $partitionMethod[0]; + if ($partitionMethod !== false) { + return $partitionMethod; } }