I've searched for a solution but I can't find any suitable for Twig, I know it's a quality of life thing. But it would make templating slightly easier.
Example
{% for userObj in userObjCollection %} {{ userObj.property }} {# I want to type hint userObj so I can use intellisense to get the right property #} {% endfor %}
I'm currently using the PHPStorm IDE,
any suggestions or pointers are greatly appreciated.
Edit Note that this is pure a question for an easier way to code within the loop. Not something a user of a site would come in contact with. (Also added phpstorm tag to clarify)
Edit 2
I've got the Symfony2 and PHP Annotations plugins installed (Sorry for not pointing this out earlier)
Use this in your twig:
{# @var foo \FooObject #}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With