Results 1 to 1 of 1
Jul 1, 2012, 09:08 #1
Question on PHPDoc usage for interfaces.
This is merely a poll type question. I understand how to use phpdoc and it's attributes. However, something occurred to me while coding today. I coded up a few interface declarations, before moving on the various concrete derivitives, and what I noticed was that at the time of documenting the interfaces, I missed some @throws attributes. This was mainly due to not really knowing before I got into active code, what exceptions would be thrown. This makes me wonder if interfaces should have any phpdoc besides that page and class blocks. After thinking about it, I came to two conclusions. One, if using an IDE with intellisense, you'd see whatever was documented in the implementation anyway, not the interface. And two, it's a real pain going back to an interface file to add phpdoc attributes just so they match the implementations. What are your opinions, and do you document interfaces? Why or why not? Thanks for your time.