Skip to content

Use reindex in ConstantArrayType::slice#1341

Merged
ondrejmirtes merged 2 commits intophpstan:1.7.xfrom
herndlm:slice-reindex
May 24, 2022
Merged

Use reindex in ConstantArrayType::slice#1341
ondrejmirtes merged 2 commits intophpstan:1.7.xfrom
herndlm:slice-reindex

Conversation

@herndlm
Copy link
Copy Markdown
Contributor

@herndlm herndlm commented May 23, 2022

... and simplify and cleanup ArraySliceFunctionReturnTypeExtension

@herndlm herndlm marked this pull request as ready for review May 23, 2022 18:52
@herndlm herndlm marked this pull request as draft May 23, 2022 20:12
@herndlm herndlm marked this pull request as ready for review May 23, 2022 20:46
@ondrejmirtes ondrejmirtes merged commit 9b7ef13 into phpstan:1.7.x May 24, 2022
@ondrejmirtes
Copy link
Copy Markdown
Member

Thank you!

@herndlm herndlm deleted the slice-reindex branch May 24, 2022 08:06
@herndlm
Copy link
Copy Markdown
Contributor Author

herndlm commented May 24, 2022

fyi I'm planning to add proper support for optional properties next to ConstantArrayType::slice / array_slice, does that make sense? E.g. https://phpstan.org/r/0d34734c-78b5-433d-ad40-4a4eb3e427b1 is a bit weird IMO, as currently optional props are completely ignored apparently.

no need for you to look further into that, I have a plan already. just wanted to verify this was not on purpose or so.

@ondrejmirtes
Copy link
Copy Markdown
Member

Yeah, it should model all possible combinations of optional keys :)

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