Perhaps a silly question but it bugs me that I don't know ...
When I create an entity with app/console doctrine:generate:entity
it adds an @var
annotation to each property. What is @var
used for?
It obviously indicates the data type but I don't see it mentioned in any documentation and things seems to work whether it's there or not so I just wonder what uses it.
This is a standard phpdoc comment. It has nothing to do with Doctrine annotations, and they are ignored by Doctrine. They are used when generating documentation and also as metadata for IDE's that support code completion.
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