-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document tree walker class strings #9553
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ | |
* the corresponding SQL. | ||
* | ||
* @psalm-import-type QueryComponent from Parser | ||
* @psalm-consistent-constructor | ||
*/ | ||
class SqlWalker implements TreeWalker | ||
{ | ||
|
@@ -172,7 +173,9 @@ class SqlWalker implements TreeWalker | |
private $quoteStrategy; | ||
|
||
/** | ||
* {@inheritDoc} | ||
* @param Query $query The parsed Query. | ||
* @param ParserResult $parserResult The result of the parsing process. | ||
* @psalm-param array<string, QueryComponent> $queryComponents The query components (symbol table). | ||
Comment on lines
+176
to
+178
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Psalm seems to ignore There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is supposed to work though: vimeo/psalm#4504 (comment) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But I think you'd need to add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't really work. If I add this annotation to the interface, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, I guess defining a constructor in an interface is quite the corner case. |
||
*/ | ||
public function __construct($query, $parserResult, array $queryComponents) | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As explained on #9551, output walkers cannot be arbitrary implementations of
TreeWalker
, we do expect anSqlWalker
here.