问题
I'm new to Doctrine
and Zend
. I realized that in nearly all entity models (whereever I read a tutorial) I saw these documentor tags like @var
or @property
.
They aren't required, right? So is it a bad thing to leave them out? It's really time-consuming adding and altering them for every attribute in my Entities.
回答1:
This is simply a good habbit of programming and documenting your code. It helps your IDE to function better and makes it easier for other people (including yourself in a year from now on) to maintain your code.
来源:https://stackoverflow.com/questions/13975744/zend-framework-2-doctrine-2-use-of-documentor-tags