Zend Framework 2 - Doctrine 2 - Use of Documentor Tags

孤街醉人 提交于 2019-12-24 09:00:18

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!