Closed (works as designed)
Project:
Drupal Code Sniffer
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2012 at 20:17 UTC
Updated:
9 Mar 2012 at 19:05 UTC
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
Comment #1
jhedstromLooking 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
__constructmethods.Comment #2
klausiWhy 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().
Comment #3
jhedstromMy 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.