Skip to content

Commit 746f48f

Browse files
committed
Add missing return types annotations
Signed-off-by: Maurício Meneghini Fauth <[email protected]>
1 parent ed0b4ba commit 746f48f

21 files changed

+54
-263
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## [5.6.0] - YYYY-MM-DD
44

5+
* Add missing return types annotations
6+
57
## [5.5.0] - 2021-12-08
68

79
* Add WITH support (#165, #331)

phpstan-baseline.neon

Lines changed: 0 additions & 170 deletions
Original file line numberDiff line numberDiff line change
@@ -760,11 +760,6 @@ parameters:
760760
count: 1
761761
path: src/Components/OptionsArray.php
762762

763-
-
764-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\:\\:merge\\(\\) has no return type specified\\.$#"
765-
count: 1
766-
path: src/Components/OptionsArray.php
767-
768763
-
769764
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\:\\:merge\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
770765
count: 1
@@ -1000,16 +995,6 @@ parameters:
1000995
count: 1
1001996
path: src/Context.php
1002997

1003-
-
1004-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Context\\:\\:load\\(\\) has no return type specified\\.$#"
1005-
count: 1
1006-
path: src/Context.php
1007-
1008-
-
1009-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Context\\:\\:setMode\\(\\) has no return type specified\\.$#"
1010-
count: 1
1011-
path: src/Context.php
1012-
1013998
-
1014999
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Context\\:\\:\\$KEYWORDS type has no value type specified in iterable type array\\.$#"
10151000
count: 1
@@ -1020,31 +1005,11 @@ parameters:
10201005
count: 1
10211006
path: src/Context.php
10221007

1023-
-
1024-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Core\\:\\:error\\(\\) has no return type specified\\.$#"
1025-
count: 1
1026-
path: src/Core.php
1027-
10281008
-
10291009
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Exceptions\\\\ParserException\\:\\:\\$token \\(PhpMyAdmin\\\\SqlParser\\\\Token\\) does not accept PhpMyAdmin\\\\SqlParser\\\\Token\\|null\\.$#"
10301010
count: 1
10311011
path: src/Exceptions/ParserException.php
10321012

1033-
-
1034-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Lexer\\:\\:error\\(\\) has no return type specified\\.$#"
1035-
count: 1
1036-
path: src/Lexer.php
1037-
1038-
-
1039-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Lexer\\:\\:lex\\(\\) has no return type specified\\.$#"
1040-
count: 1
1041-
path: src/Lexer.php
1042-
1043-
-
1044-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Lexer\\:\\:setDelimiter\\(\\) has no return type specified\\.$#"
1045-
count: 1
1046-
path: src/Lexer.php
1047-
10481013
-
10491014
message: "#^Parameter \\#1 \\$msg \\(string\\) of method PhpMyAdmin\\\\SqlParser\\\\Lexer\\:\\:error\\(\\) should be compatible with parameter \\$error \\(Exception\\) of method PhpMyAdmin\\\\SqlParser\\\\Core\\:\\:error\\(\\)$#"
10501015
count: 1
@@ -1075,16 +1040,6 @@ parameters:
10751040
count: 1
10761041
path: src/Parser.php
10771042

1078-
-
1079-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Parser\\:\\:error\\(\\) has no return type specified\\.$#"
1080-
count: 1
1081-
path: src/Parser.php
1082-
1083-
-
1084-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Parser\\:\\:parse\\(\\) has no return type specified\\.$#"
1085-
count: 1
1086-
path: src/Parser.php
1087-
10881043
-
10891044
message: "#^Parameter \\#1 \\$msg \\(string\\) of method PhpMyAdmin\\\\SqlParser\\\\Parser\\:\\:error\\(\\) should be compatible with parameter \\$error \\(Exception\\) of method PhpMyAdmin\\\\SqlParser\\\\Core\\:\\:error\\(\\)$#"
10901045
count: 1
@@ -1105,26 +1060,11 @@ parameters:
11051060
count: 1
11061061
path: src/Parser.php
11071062

1108-
-
1109-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statement\\:\\:after\\(\\) has no return type specified\\.$#"
1110-
count: 1
1111-
path: src/Statement.php
1112-
1113-
-
1114-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statement\\:\\:before\\(\\) has no return type specified\\.$#"
1115-
count: 1
1116-
path: src/Statement.php
1117-
11181063
-
11191064
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statement\\:\\:getClauses\\(\\) return type has no value type specified in iterable type array\\.$#"
11201065
count: 1
11211066
path: src/Statement.php
11221067

1123-
-
1124-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statement\\:\\:parse\\(\\) has no return type specified\\.$#"
1125-
count: 1
1126-
path: src/Statement.php
1127-
11281068
-
11291069
message: "#^PHPDoc tag @var has no value type specified in iterable type array\\.$#"
11301070
count: 4
@@ -1150,11 +1090,6 @@ parameters:
11501090
count: 1
11511091
path: src/Statement.php
11521092

1153-
-
1154-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\AlterStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
1155-
count: 1
1156-
path: src/Statements/AlterStatement.php
1157-
11581093
-
11591094
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\AlterStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#"
11601095
count: 1
@@ -1200,11 +1135,6 @@ parameters:
12001135
count: 4
12011136
path: src/Statements/CreateStatement.php
12021137

1203-
-
1204-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
1205-
count: 1
1206-
path: src/Statements/CreateStatement.php
1207-
12081138
-
12091139
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$DB_OPTIONS type has no value type specified in iterable type array\\.$#"
12101140
count: 1
@@ -1280,11 +1210,6 @@ parameters:
12801210
count: 1
12811211
path: src/Statements/CreateStatement.php
12821212

1283-
-
1284-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\DeleteStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
1285-
count: 1
1286-
path: src/Statements/DeleteStatement.php
1287-
12881213
-
12891214
message: "#^Parameter \\#1 \\$component of static method PhpMyAdmin\\\\SqlParser\\\\Components\\\\ExpressionArray\\:\\:build\\(\\) expects array\\<PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\>, array\\<PhpMyAdmin\\\\SqlParser\\\\Components\\\\OrderKeyword\\> given\\.$#"
12901215
count: 1
@@ -1320,11 +1245,6 @@ parameters:
13201245
count: 1
13211246
path: src/Statements/DropStatement.php
13221247

1323-
-
1324-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\InsertStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
1325-
count: 1
1326-
path: src/Statements/InsertStatement.php
1327-
13281248
-
13291249
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\InsertStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#"
13301250
count: 1
@@ -1345,11 +1265,6 @@ parameters:
13451265
count: 1
13461266
path: src/Statements/LoadStatement.php
13471267

1348-
-
1349-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\LoadStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
1350-
count: 1
1351-
path: src/Statements/LoadStatement.php
1352-
13531268
-
13541269
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\LoadStatement\\:\\:\\$FIELDS_OPTIONS type has no value type specified in iterable type array\\.$#"
13551270
count: 1
@@ -1390,31 +1305,11 @@ parameters:
13901305
count: 1
13911306
path: src/Statements/LoadStatement.php
13921307

1393-
-
1394-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\LockStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
1395-
count: 1
1396-
path: src/Statements/LockStatement.php
1397-
1398-
-
1399-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\MaintenanceStatement\\:\\:after\\(\\) has no return type specified\\.$#"
1400-
count: 1
1401-
path: src/Statements/MaintenanceStatement.php
1402-
1403-
-
1404-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\NotImplementedStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
1405-
count: 1
1406-
path: src/Statements/NotImplementedStatement.php
1407-
14081308
-
14091309
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\OptimizeStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#"
14101310
count: 1
14111311
path: src/Statements/OptimizeStatement.php
14121312

1413-
-
1414-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\PurgeStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
1415-
count: 1
1416-
path: src/Statements/PurgeStatement.php
1417-
14181313
-
14191314
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\PurgeStatement\\:\\:parseExpectedKeyword\\(\\) has parameter \\$expectedKeywords with no value type specified in iterable type array\\.$#"
14201315
count: 1
@@ -1435,11 +1330,6 @@ parameters:
14351330
count: 1
14361331
path: src/Statements/PurgeStatement.php
14371332

1438-
-
1439-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\RenameStatement\\:\\:before\\(\\) has no return type specified\\.$#"
1440-
count: 1
1441-
path: src/Statements/RenameStatement.php
1442-
14431333
-
14441334
message: "#^Parameter \\#1 \\$component of static method PhpMyAdmin\\\\SqlParser\\\\Components\\\\RenameOperation\\:\\:build\\(\\) expects PhpMyAdmin\\\\SqlParser\\\\Components\\\\RenameOperation, array\\<PhpMyAdmin\\\\SqlParser\\\\Components\\\\RenameOperation\\> given\\.$#"
14451335
count: 1
@@ -1450,11 +1340,6 @@ parameters:
14501340
count: 1
14511341
path: src/Statements/RepairStatement.php
14521342

1453-
-
1454-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\ReplaceStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
1455-
count: 1
1456-
path: src/Statements/ReplaceStatement.php
1457-
14581343
-
14591344
message: "#^Parameter \\#1 \\$component of static method PhpMyAdmin\\\\SqlParser\\\\Components\\\\Array2d\\:\\:build\\(\\) expects array\\<PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\>, PhpMyAdmin\\\\SqlParser\\\\Components\\\\Array2d given\\.$#"
14601345
count: 1
@@ -1525,11 +1410,6 @@ parameters:
15251410
count: 1
15261411
path: src/Statements/ShowStatement.php
15271412

1528-
-
1529-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\TransactionStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
1530-
count: 1
1531-
path: src/Statements/TransactionStatement.php
1532-
15331413
-
15341414
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\TransactionStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#"
15351415
count: 1
@@ -1550,11 +1430,6 @@ parameters:
15501430
count: 1
15511431
path: src/Statements/UpdateStatement.php
15521432

1553-
-
1554-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\WithStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
1555-
count: 1
1556-
path: src/Statements/WithStatement.php
1557-
15581433
-
15591434
message: "#^Parameter \\#1 \\$name of class PhpMyAdmin\\\\SqlParser\\\\Components\\\\WithKeyword constructor expects string, mixed given\\.$#"
15601435
count: 1
@@ -1570,11 +1445,6 @@ parameters:
15701445
count: 1
15711446
path: src/TokensList.php
15721447

1573-
-
1574-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\TokensList\\:\\:add\\(\\) has no return type specified\\.$#"
1575-
count: 1
1576-
path: src/TokensList.php
1577-
15781448
-
15791449
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\TokensList\\:\\:\\$tokens type has no value type specified in iterable type array\\.$#"
15801450
count: 1
@@ -1595,16 +1465,6 @@ parameters:
15951465
count: 1
15961466
path: src/Tools/ContextGenerator.php
15971467

1598-
-
1599-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Tools\\\\ContextGenerator\\:\\:build\\(\\) has no return type specified\\.$#"
1600-
count: 1
1601-
path: src/Tools/ContextGenerator.php
1602-
1603-
-
1604-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Tools\\\\ContextGenerator\\:\\:buildAll\\(\\) has no return type specified\\.$#"
1605-
count: 1
1606-
path: src/Tools/ContextGenerator.php
1607-
16081468
-
16091469
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Tools\\\\ContextGenerator\\:\\:generate\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
16101470
count: 1
@@ -1655,16 +1515,6 @@ parameters:
16551515
count: 2
16561516
path: src/Tools/TestGenerator.php
16571517

1658-
-
1659-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Tools\\\\TestGenerator\\:\\:build\\(\\) has no return type specified\\.$#"
1660-
count: 1
1661-
path: src/Tools/TestGenerator.php
1662-
1663-
-
1664-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Tools\\\\TestGenerator\\:\\:buildAll\\(\\) has no return type specified\\.$#"
1665-
count: 1
1666-
path: src/Tools/TestGenerator.php
1667-
16681518
-
16691519
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Tools\\\\TestGenerator\\:\\:generate\\(\\) return type has no value type specified in iterable type array\\.$#"
16701520
count: 1
@@ -1690,11 +1540,6 @@ parameters:
16901540
count: 1
16911541
path: src/Tools/TestGenerator.php
16921542

1693-
-
1694-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Translator\\:\\:load\\(\\) has no return type specified\\.$#"
1695-
count: 1
1696-
path: src/Translator.php
1697-
16981543
-
16991544
message: "#^Class PhpMyAdmin\\\\SqlParser\\\\UtfString implements generic interface ArrayAccess but does not specify its types\\: TKey, TValue$#"
17001545
count: 1
@@ -1705,11 +1550,6 @@ parameters:
17051550
count: 1
17061551
path: src/Utils/BufferedQuery.php
17071552

1708-
-
1709-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Utils\\\\BufferedQuery\\:\\:setDelimiter\\(\\) has no return type specified\\.$#"
1710-
count: 1
1711-
path: src/Utils/BufferedQuery.php
1712-
17131553
-
17141554
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Utils\\\\BufferedQuery\\:\\:\\$options type has no value type specified in iterable type array\\.$#"
17151555
count: 1
@@ -2460,11 +2300,6 @@ parameters:
24602300
count: 1
24612301
path: tests/TestCase.php
24622302

2463-
-
2464-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Tests\\\\TestCase\\:\\:runParserTest\\(\\) has no return type specified\\.$#"
2465-
count: 1
2466-
path: tests/TestCase.php
2467-
24682303
-
24692304
message: "#^PHPDoc tag @var has no value type specified in iterable type array\\.$#"
24702305
count: 1
@@ -2480,11 +2315,6 @@ parameters:
24802315
count: 1
24812316
path: tests/Utils/BufferedQueryTest.php
24822317

2483-
-
2484-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Tests\\\\Utils\\\\BufferedQueryTest\\:\\:testExtract\\(\\) has no return type specified\\.$#"
2485-
count: 1
2486-
path: tests/Utils/BufferedQueryTest.php
2487-
24882318
-
24892319
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Tests\\\\Utils\\\\BufferedQueryTest\\:\\:testExtract\\(\\) has parameter \\$expected with no value type specified in iterable type array\\.$#"
24902320
count: 1

0 commit comments

Comments
 (0)