Skip to content

Commit 9ccec4b

Browse files
kamil-tekielaMauricioFauth
authored andcommitted
Change type hint
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
1 parent 3481429 commit 9ccec4b

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

phpstan-baseline.neon

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3060,11 +3060,6 @@ parameters:
30603060
count: 1
30613061
path: src/Controllers/Server/PrivilegesController.php
30623062

3063-
-
3064-
message: "#^Parameter \\#4 \\$dbname of method PhpMyAdmin\\\\Server\\\\Privileges\\:\\:updatePrivileges\\(\\) expects string, mixed given\\.$#"
3065-
count: 1
3066-
path: src/Controllers/Server/PrivilegesController.php
3067-
30683063
-
30693064
message: "#^Parameter \\#4 \\$hostname of method PhpMyAdmin\\\\Server\\\\Privileges\\:\\:getHtmlForUserProperties\\(\\) expects string, mixed given\\.$#"
30703065
count: 1
@@ -12316,6 +12311,11 @@ parameters:
1231612311
count: 1
1231712312
path: src/Server/Privileges.php
1231812313

12314+
-
12315+
message: "#^Method PhpMyAdmin\\\\Server\\\\Privileges\\:\\:getDbname\\(\\) should return array\\<string\\>\\|string\\|null but returns array\\<mixed\\>\\|string\\|null\\.$#"
12316+
count: 1
12317+
path: src/Server/Privileges.php
12318+
1231912319
-
1232012320
message: "#^Offset '@@old_passwords' does not exist on array\\<string\\|null\\>\\|null\\.$#"
1232112321
count: 1

psalm-baseline.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2446,7 +2446,6 @@
24462446
<code><![CDATA[$GLOBALS['errorUrl']]]></code>
24472447
</InvalidArrayOffset>
24482448
<MixedArgument>
2449-
<code><![CDATA[$dbName ?? '']]></code>
24502449
<code><![CDATA[$request->getQueryParam('initial')]]></code>
24512450
<code><![CDATA[$urlDbname ?? '']]></code>
24522451
<code><![CDATA[$urlDbname ?? '']]></code>
@@ -2456,7 +2455,6 @@
24562455
</MixedArgumentTypeCoercion>
24572456
<MixedAssignment>
24582457
<code><![CDATA[$GLOBALS['errorUrl']]]></code>
2459-
<code><![CDATA[$dbName]]></code>
24602458
</MixedAssignment>
24612459
<RedundantConditionGivenDocblockType>
24622460
<code><![CDATA[! empty($GLOBALS['message']) && $GLOBALS['message'] instanceof Message]]></code>
@@ -9826,8 +9824,10 @@
98269824
<code><![CDATA[$origValue]]></code>
98279825
</MixedOperand>
98289826
<MixedReturnTypeCoercion>
9827+
<code><![CDATA[$dbname]]></code>
98299828
<code><![CDATA[$extraData]]></code>
98309829
<code><![CDATA[(string|bool)[]]]></code>
9830+
<code><![CDATA[string|string[]|null]]></code>
98319831
</MixedReturnTypeCoercion>
98329832
<PossiblyFalseOperand>
98339833
<code><![CDATA[mb_strpos($row1['Type'], '(')]]></code>

src/Controllers/Server/PrivilegesController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public function __invoke(ServerRequest $request): Response
203203
$GLOBALS['username'] ?? '',
204204
$GLOBALS['hostname'] ?? '',
205205
$tablename ?? $routinename ?? '',
206-
$dbName ?? '',
206+
$dbName,
207207
$itemType,
208208
);
209209
}

src/Server/Privileges.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3303,7 +3303,7 @@ public function getTablename(ServerRequest $request): string|null
33033303
return null;
33043304
}
33053305

3306-
/** @return string|mixed[]|null */
3306+
/** @return string|string[]|null */
33073307
public function getDbname(ServerRequest $request): string|array|null
33083308
{
33093309
$dbname = null;

0 commit comments

Comments
 (0)