Skip to content

Commit efed553

Browse files
committed
Fix invalid PHP doc blocks
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
1 parent bd095c7 commit efed553

6 files changed

Lines changed: 4 additions & 39 deletions

File tree

libraries/classes/Controllers/LintController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __invoke(ServerRequest $request): void
3232
* The client, which will receive the JSON response will decode the message and
3333
* and any HTML fragments that are displayed to the user will be encoded anyway.
3434
*
35-
* @var string
35+
* @var string $sqlQuery
3636
*/
3737
$sqlQuery = $request->getParsedBodyParam('sql_query', '');
3838

libraries/classes/Linter.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,6 @@ public static function lint($query)
131131

132132
/**
133133
* The response containing of all errors.
134-
*
135-
* @var array
136134
*/
137135
$response = [];
138136

libraries/classes/Plugins/Export/ExportSql.php

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,7 +1462,7 @@ public function getTableDef(
14621462
/**
14631463
* `CREATE TABLE` statement.
14641464
*
1465-
* @var CreateStatement
1465+
* @var CreateStatement $statement
14661466
*/
14671467
$statement = $parser->statements[0];
14681468

@@ -1537,7 +1537,7 @@ public function getTableDef(
15371537
/**
15381538
* `CREATE TABLE` statement.
15391539
*
1540-
* @var CreateStatement
1540+
* @var CreateStatement $statement
15411541
*/
15421542
$statement = $parser->statements[0];
15431543

@@ -1555,37 +1555,26 @@ public function getTableDef(
15551555

15561556
/**
15571557
* Fragments containing definition of each constraint.
1558-
*
1559-
* @var array
15601558
*/
15611559
$constraints = [];
15621560

15631561
/**
15641562
* Fragments containing definition of each index.
1565-
*
1566-
* @var array
15671563
*/
15681564
$indexes = [];
15691565

15701566
/**
15711567
* Fragments containing definition of each FULLTEXT index.
1572-
*
1573-
* @var array
15741568
*/
15751569
$indexesFulltext = [];
15761570

15771571
/**
1578-
* Fragments containing definition of each foreign key that will
1579-
* be dropped.
1580-
*
1581-
* @var array
1572+
* Fragments containing definition of each foreign key that will be dropped.
15821573
*/
15831574
$dropped = [];
15841575

15851576
/**
15861577
* Fragment containing definition of the `AUTO_INCREMENT`.
1587-
*
1588-
* @var array
15891578
*/
15901579
$autoIncrement = [];
15911580

@@ -1639,15 +1628,11 @@ public function getTableDef(
16391628

16401629
/**
16411630
* The header of the `ALTER` statement (`ALTER TABLE tbl`).
1642-
*
1643-
* @var string
16441631
*/
16451632
$alterHeader = 'ALTER TABLE ' . Util::backquoteCompat($tableAlias, $compat, $GLOBALS['sql_backquotes']);
16461633

16471634
/**
16481635
* The footer of the `ALTER` statement (usually ';')
1649-
*
1650-
* @var string
16511636
*/
16521637
$alterFooter = ';' . "\n";
16531638

phpcs.xml.dist

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@
4242
<rule ref="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion.RequiredConstructorPropertyPromotion">
4343
<severity>4</severity>
4444
</rule>
45-
<rule ref="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration.InvalidFormat">
46-
<severity>4</severity>
47-
</rule>
4845
<rule ref="SlevomatCodingStandard.Commenting.RequireOneLineDocComment.MultiLineDocComment">
4946
<severity>4</severity>
5047
</rule>

phpstan-baseline.neon

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5525,11 +5525,6 @@ parameters:
55255525
count: 1
55265526
path: libraries/classes/Linter.php
55275527

5528-
-
5529-
message: "#^PHPDoc tag @var has no value type specified in iterable type array\\.$#"
5530-
count: 1
5531-
path: libraries/classes/Linter.php
5532-
55335528
-
55345529
message: "#^Parameter \\#2 \\$pos of static method PhpMyAdmin\\\\Linter\\:\\:findLineNumberAndColumn\\(\\) expects int, int\\|string\\|null given\\.$#"
55355530
count: 1
@@ -6405,11 +6400,6 @@ parameters:
64056400
count: 1
64066401
path: libraries/classes/Plugins/Export/ExportSql.php
64076402

6408-
-
6409-
message: "#^PHPDoc tag @var has no value type specified in iterable type array\\.$#"
6410-
count: 5
6411-
path: libraries/classes/Plugins/Export/ExportSql.php
6412-
64136403
-
64146404
message: "#^Parameter \\#1 \\$list of class PhpMyAdmin\\\\SqlParser\\\\Parser constructor expects PhpMyAdmin\\\\SqlParser\\\\TokensList\\|PhpMyAdmin\\\\SqlParser\\\\UtfString\\|string\\|null, \\(array\\<int, string\\>\\|string\\|null\\) given\\.$#"
64156405
count: 1

psalm-baseline.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11263,12 +11263,7 @@
1126311263
<code><![CDATA[$trigger['create']]]></code>
1126411264
</MixedArgument>
1126511265
<MixedArgumentTypeCoercion>
11266-
<code>$autoIncrement</code>
1126711266
<code>$compats</code>
11268-
<code>$constraints</code>
11269-
<code>$dropped</code>
11270-
<code>$indexes</code>
11271-
<code>$indexesFulltext</code>
1127211267
</MixedArgumentTypeCoercion>
1127311268
<MixedArrayAccess>
1127411269
<code><![CDATA[$GLOBALS['cfg']['Export']['remove_definer_from_definitions']]]></code>

0 commit comments

Comments
 (0)