I'm not positive on this since the coding standards page doesn't mention constructors, but my understanding is that those functions do not require a doc comment.

442 | ERROR | Missing function doc comment

Comments

jhedstrom’s picture

Looking through the code a bit, I see that this should already be working. The file I'm testing is in Drush, and I still get the warnings errors on all the __construct methods.

klausi’s picture

Why do you think that constructors do not need a comment? I think it is important to document them, to explain parameters or to describe what is done and why it is done on object creation. The coding standards make no exception for __construct().

jhedstrom’s picture

Status: Active » Closed (works as designed)

My only reference was looking around core, which is full of un-commented __construct methods (pager, sqlite driver, tablesort, etc). However, plenty of them are commented, and looking through the docs issue queue, it would appear that they should all be commented.