Skip to content

Add explicit types for 'nested_parenthesis' #286

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

Merged
merged 2 commits into from
Dec 9, 2022
Merged

Conversation

sirbrillig
Copy link
Owner

@sirbrillig sirbrillig commented Dec 9, 2022

This adds PHPDoc types when accessing the keys of the 'nested_parenthesis' property of tokens. From what I know, the type of that property is always array<int, int>, but for some reason in the most recent update of Psalm it no longer is able to figure that out, so here we add explicit types for it.

I'm not sure if the keys can ever be some other type, but just in case this type allows them to be either string or null also.

@sirbrillig sirbrillig merged commit 6a0e2ff into 2.x Dec 9, 2022
@sirbrillig sirbrillig deleted the fix-nested-parens-types branch December 9, 2022 23:29
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.

1 participant