Skip to content

Fix Node::getType() returning an incorrect value for some nodes#1568

Merged
ondrejmirtes merged 1 commit intophpstan:1.8.xfrom
Muqsit:node-gettype-fix
Jul 29, 2022
Merged

Fix Node::getType() returning an incorrect value for some nodes#1568
ondrejmirtes merged 1 commit intophpstan:1.8.xfrom
Muqsit:node-gettype-fix

Conversation

@Muqsit
Copy link
Copy Markdown
Contributor

@Muqsit Muqsit commented Jul 29, 2022

ClassConstantsNode::getType() and ClassPropertiesNode::getType() return the same value: PHPStan_Node_ClassPropertiesNode.
FunctionReturnStatementsNode::getType() and MethodReturnStatementsNode::getType() return the same value: PHPStan_Node_FunctionReturnStatementsNode.
Based on other Node class's getType() retval, the value seems to be unique for each node class and is derived from the class's FQN. Moreover, the two pairs of nodes are isolated (independent) from one another.

@ondrejmirtes ondrejmirtes merged commit 53e0753 into phpstan:1.8.x Jul 29, 2022
@ondrejmirtes
Copy link
Copy Markdown
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants