Fix an issue detected by Psalm

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2023-03-06 18:33:34 -03:00
parent 0a05f8bfcb
commit 730bea74ac
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
3 changed files with 1 additions and 11 deletions

View File

@ -399,11 +399,8 @@ class Table implements Stringable
public function getRowFormat(): string
{
$tableRowFormat = $this->getStatusInfo('ROW_FORMAT', false, true);
if ($tableRowFormat === false) {
return '';
}
return $tableRowFormat ?? '';
return is_string($tableRowFormat) ? $tableRowFormat : '';
}
/**

View File

@ -8500,11 +8500,6 @@ parameters:
count: 1
path: libraries/classes/Table.php
-
message: "#^Method PhpMyAdmin\\\\Table\\:\\:getRowFormat\\(\\) should return string but returns mixed\\.$#"
count: 1
path: libraries/classes/Table.php
-
message: "#^Method PhpMyAdmin\\\\Table\\:\\:getSQLToCreateForeignKey\\(\\) has parameter \\$field with no value type specified in iterable type array\\.$#"
count: 1

View File

@ -13658,7 +13658,6 @@
<code>string</code>
<code>string</code>
<code>string</code>
<code>string</code>
</MixedInferredReturnType>
<MixedMethodCall>
<code>has</code>
@ -13682,7 +13681,6 @@
<code><![CDATA[$tableCollation ?? '']]></code>
<code><![CDATA[$tableCollation ?? '']]></code>
<code>$tableComment</code>
<code>$tableRowFormat</code>
<code><![CDATA[end($this->errors)]]></code>
<code><![CDATA[end($this->messages)]]></code>
<code>json_decode($value, true)</code>