Skip to content

Nested array check #10462

Closed Answered by ondrejmirtes
mitelg asked this question in Support
Jan 22, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

From the looks of it I think you've missed one more nested level: https://phpstan.org/r/cabe8249-bb26-4d1a-bfbc-ec6202a6e24d

It's easy to figure it out if you verify what PHPStan thinks of your type. Given your original example this is what $response is: https://phpstan.org/r/34a7498d-ed83-425b-9a37-5874a9149810

But I think you've meant it to be array{aggregations: array<string, array{buckets: array{key: string}}>}, right?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mitelg
Comment options

Answer selected by mitelg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
2 participants