Skip to content

Commit

Permalink
Add missing return types annotations
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Dec 28, 2021
1 parent ed0b4ba commit 746f48f
Show file tree
Hide file tree
Showing 21 changed files with 54 additions and 263 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## [5.6.0] - YYYY-MM-DD

* Add missing return types annotations

## [5.5.0] - 2021-12-08

* Add WITH support (#165, #331)
Expand Down
170 changes: 0 additions & 170 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -760,11 +760,6 @@ parameters:
count: 1
path: src/Components/OptionsArray.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\:\\:merge\\(\\) has no return type specified\\.$#"
count: 1
path: src/Components/OptionsArray.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\:\\:merge\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -1000,16 +995,6 @@ parameters:
count: 1
path: src/Context.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Context\\:\\:load\\(\\) has no return type specified\\.$#"
count: 1
path: src/Context.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Context\\:\\:setMode\\(\\) has no return type specified\\.$#"
count: 1
path: src/Context.php

-
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Context\\:\\:\\$KEYWORDS type has no value type specified in iterable type array\\.$#"
count: 1
Expand All @@ -1020,31 +1005,11 @@ parameters:
count: 1
path: src/Context.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Core\\:\\:error\\(\\) has no return type specified\\.$#"
count: 1
path: src/Core.php

-
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Exceptions\\\\ParserException\\:\\:\\$token \\(PhpMyAdmin\\\\SqlParser\\\\Token\\) does not accept PhpMyAdmin\\\\SqlParser\\\\Token\\|null\\.$#"
count: 1
path: src/Exceptions/ParserException.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Lexer\\:\\:error\\(\\) has no return type specified\\.$#"
count: 1
path: src/Lexer.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Lexer\\:\\:lex\\(\\) has no return type specified\\.$#"
count: 1
path: src/Lexer.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Lexer\\:\\:setDelimiter\\(\\) has no return type specified\\.$#"
count: 1
path: src/Lexer.php

-
message: "#^Parameter \\#1 \\$msg \\(string\\) of method PhpMyAdmin\\\\SqlParser\\\\Lexer\\:\\:error\\(\\) should be compatible with parameter \\$error \\(Exception\\) of method PhpMyAdmin\\\\SqlParser\\\\Core\\:\\:error\\(\\)$#"
count: 1
Expand Down Expand Up @@ -1075,16 +1040,6 @@ parameters:
count: 1
path: src/Parser.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Parser\\:\\:error\\(\\) has no return type specified\\.$#"
count: 1
path: src/Parser.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Parser\\:\\:parse\\(\\) has no return type specified\\.$#"
count: 1
path: src/Parser.php

-
message: "#^Parameter \\#1 \\$msg \\(string\\) of method PhpMyAdmin\\\\SqlParser\\\\Parser\\:\\:error\\(\\) should be compatible with parameter \\$error \\(Exception\\) of method PhpMyAdmin\\\\SqlParser\\\\Core\\:\\:error\\(\\)$#"
count: 1
Expand All @@ -1105,26 +1060,11 @@ parameters:
count: 1
path: src/Parser.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statement\\:\\:after\\(\\) has no return type specified\\.$#"
count: 1
path: src/Statement.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statement\\:\\:before\\(\\) has no return type specified\\.$#"
count: 1
path: src/Statement.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statement\\:\\:getClauses\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Statement.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statement\\:\\:parse\\(\\) has no return type specified\\.$#"
count: 1
path: src/Statement.php

-
message: "#^PHPDoc tag @var has no value type specified in iterable type array\\.$#"
count: 4
Expand All @@ -1150,11 +1090,6 @@ parameters:
count: 1
path: src/Statement.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\AlterStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
count: 1
path: src/Statements/AlterStatement.php

-
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\AlterStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -1200,11 +1135,6 @@ parameters:
count: 4
path: src/Statements/CreateStatement.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
count: 1
path: src/Statements/CreateStatement.php

-
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$DB_OPTIONS type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -1280,11 +1210,6 @@ parameters:
count: 1
path: src/Statements/CreateStatement.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\DeleteStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
count: 1
path: src/Statements/DeleteStatement.php

-
message: "#^Parameter \\#1 \\$component of static method PhpMyAdmin\\\\SqlParser\\\\Components\\\\ExpressionArray\\:\\:build\\(\\) expects array\\<PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\>, array\\<PhpMyAdmin\\\\SqlParser\\\\Components\\\\OrderKeyword\\> given\\.$#"
count: 1
Expand Down Expand Up @@ -1320,11 +1245,6 @@ parameters:
count: 1
path: src/Statements/DropStatement.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\InsertStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
count: 1
path: src/Statements/InsertStatement.php

-
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\InsertStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#"
count: 1
Expand All @@ -1345,11 +1265,6 @@ parameters:
count: 1
path: src/Statements/LoadStatement.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\LoadStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
count: 1
path: src/Statements/LoadStatement.php

-
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\LoadStatement\\:\\:\\$FIELDS_OPTIONS type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -1390,31 +1305,11 @@ parameters:
count: 1
path: src/Statements/LoadStatement.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\LockStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
count: 1
path: src/Statements/LockStatement.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\MaintenanceStatement\\:\\:after\\(\\) has no return type specified\\.$#"
count: 1
path: src/Statements/MaintenanceStatement.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\NotImplementedStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
count: 1
path: src/Statements/NotImplementedStatement.php

-
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\OptimizeStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Statements/OptimizeStatement.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\PurgeStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
count: 1
path: src/Statements/PurgeStatement.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\PurgeStatement\\:\\:parseExpectedKeyword\\(\\) has parameter \\$expectedKeywords with no value type specified in iterable type array\\.$#"
count: 1
Expand All @@ -1435,11 +1330,6 @@ parameters:
count: 1
path: src/Statements/PurgeStatement.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\RenameStatement\\:\\:before\\(\\) has no return type specified\\.$#"
count: 1
path: src/Statements/RenameStatement.php

-
message: "#^Parameter \\#1 \\$component of static method PhpMyAdmin\\\\SqlParser\\\\Components\\\\RenameOperation\\:\\:build\\(\\) expects PhpMyAdmin\\\\SqlParser\\\\Components\\\\RenameOperation, array\\<PhpMyAdmin\\\\SqlParser\\\\Components\\\\RenameOperation\\> given\\.$#"
count: 1
Expand All @@ -1450,11 +1340,6 @@ parameters:
count: 1
path: src/Statements/RepairStatement.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\ReplaceStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
count: 1
path: src/Statements/ReplaceStatement.php

-
message: "#^Parameter \\#1 \\$component of static method PhpMyAdmin\\\\SqlParser\\\\Components\\\\Array2d\\:\\:build\\(\\) expects array\\<PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\>, PhpMyAdmin\\\\SqlParser\\\\Components\\\\Array2d given\\.$#"
count: 1
Expand Down Expand Up @@ -1525,11 +1410,6 @@ parameters:
count: 1
path: src/Statements/ShowStatement.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\TransactionStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
count: 1
path: src/Statements/TransactionStatement.php

-
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\TransactionStatement\\:\\:\\$OPTIONS type has no value type specified in iterable type array\\.$#"
count: 1
Expand All @@ -1550,11 +1430,6 @@ parameters:
count: 1
path: src/Statements/UpdateStatement.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Statements\\\\WithStatement\\:\\:parse\\(\\) has no return type specified\\.$#"
count: 1
path: src/Statements/WithStatement.php

-
message: "#^Parameter \\#1 \\$name of class PhpMyAdmin\\\\SqlParser\\\\Components\\\\WithKeyword constructor expects string, mixed given\\.$#"
count: 1
Expand All @@ -1570,11 +1445,6 @@ parameters:
count: 1
path: src/TokensList.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\TokensList\\:\\:add\\(\\) has no return type specified\\.$#"
count: 1
path: src/TokensList.php

-
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\TokensList\\:\\:\\$tokens type has no value type specified in iterable type array\\.$#"
count: 1
Expand All @@ -1595,16 +1465,6 @@ parameters:
count: 1
path: src/Tools/ContextGenerator.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Tools\\\\ContextGenerator\\:\\:build\\(\\) has no return type specified\\.$#"
count: 1
path: src/Tools/ContextGenerator.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Tools\\\\ContextGenerator\\:\\:buildAll\\(\\) has no return type specified\\.$#"
count: 1
path: src/Tools/ContextGenerator.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Tools\\\\ContextGenerator\\:\\:generate\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -1655,16 +1515,6 @@ parameters:
count: 2
path: src/Tools/TestGenerator.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Tools\\\\TestGenerator\\:\\:build\\(\\) has no return type specified\\.$#"
count: 1
path: src/Tools/TestGenerator.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Tools\\\\TestGenerator\\:\\:buildAll\\(\\) has no return type specified\\.$#"
count: 1
path: src/Tools/TestGenerator.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Tools\\\\TestGenerator\\:\\:generate\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
Expand All @@ -1690,11 +1540,6 @@ parameters:
count: 1
path: src/Tools/TestGenerator.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Translator\\:\\:load\\(\\) has no return type specified\\.$#"
count: 1
path: src/Translator.php

-
message: "#^Class PhpMyAdmin\\\\SqlParser\\\\UtfString implements generic interface ArrayAccess but does not specify its types\\: TKey, TValue$#"
count: 1
Expand All @@ -1705,11 +1550,6 @@ parameters:
count: 1
path: src/Utils/BufferedQuery.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Utils\\\\BufferedQuery\\:\\:setDelimiter\\(\\) has no return type specified\\.$#"
count: 1
path: src/Utils/BufferedQuery.php

-
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Utils\\\\BufferedQuery\\:\\:\\$options type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -2460,11 +2300,6 @@ parameters:
count: 1
path: tests/TestCase.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Tests\\\\TestCase\\:\\:runParserTest\\(\\) has no return type specified\\.$#"
count: 1
path: tests/TestCase.php

-
message: "#^PHPDoc tag @var has no value type specified in iterable type array\\.$#"
count: 1
Expand All @@ -2480,11 +2315,6 @@ parameters:
count: 1
path: tests/Utils/BufferedQueryTest.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Tests\\\\Utils\\\\BufferedQueryTest\\:\\:testExtract\\(\\) has no return type specified\\.$#"
count: 1
path: tests/Utils/BufferedQueryTest.php

-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Tests\\\\Utils\\\\BufferedQueryTest\\:\\:testExtract\\(\\) has parameter \\$expected with no value type specified in iterable type array\\.$#"
count: 1
Expand Down
Loading

0 comments on commit 746f48f

Please sign in to comment.