How to phpdoc implementation of IteratorAggregate #4220
-
see sandpit code: https://phpstan.org/r/5e9d2a38-e4d7-4fe2-b25e-0094a5f70c5d usecase https://github.com/atk4/data/blob/1fb2c24b2f5308b04a6c6ef412bb03e26fb2d6e1/src/Model.php#L1770 PHPStan shows an error:
but phpdoc |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
You need something like |
Beta Was this translation helpful? Give feedback.
-
There’s a documentation page describing everything around generics: https://phpstan.org/blog/generics-in-php-using-phpdocs |
Beta Was this translation helpful? Give feedback.
There’s a documentation page describing everything around generics: https://phpstan.org/blog/generics-in-php-using-phpdocs