Proper Way to Document Class in Netbeans PHP

后端 未结 3 702
暗喜
暗喜 2021-01-13 11:02

For reasons of ease of maintenance AND IDE class auto-completion and member hinting, I\'ve used PHPDoc in my project. Given this example class:

class my_clas         


        
3条回答
  •  清歌不尽
    2021-01-13 11:31

    I prefer to use @var above each property and no @property at all. I feel that this allows you to more closely associate the comments with the thing that is being commented on. I.e., the comments for a property are always right next to the property. If you're using the @property style and you've got a big class with a ton of properties, it's entirely possible that the comment which describes a property is pages away from it.

提交回复
热议问题