Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Apr 2010 at 04:45 UTC
Updated:
6 May 2010 at 23:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
jhodgdonHere's a patch.
Comment #2
jhodgdonwhoops, must be getting tired. I forgot to revert that last patch. Sigh. Here's a patch with just the intended changes for this issue.
Comment #4
jhodgdonOK, here's one that should be right... I hope...
Comment #5
aspilicious commentedDELETED COMMENTS
I was wrong, hooks have to be in the imperative form...
Comment #6
aspilicious commentedBack to needs review
Comment #7
puregin commented@aspilicious: I'm new to this (or rather back after an absense), so I was just looking into the doc standards. Looks like #487802: Function doc standard for Drupal is non-standard in industry has determined that the standard should be changed to "3rd person declarative" for summary lines.
Having a look at the rest of the patch now...
Comment #8
jhodgdonPlease read the doc standards page
http://drupal.org/node/1354
It describes our current standards. That issue is old, and we have different standards for hook *definitions*
Comment #9
puregin commentedThe descriptions are good, and the examples make sense. Should we mention what the @return value is?
The attached patch changes the summary lines to 3rd person declarative.
Comment #10
puregin commented@jhodgdon thanks for the reference to the new standards. Do you have a pointer to the discussion re: imperative vs. declarative for hooks? Thanks!
Comment #11
jhodgdonNo, not off-hand and no time to search for it. Good luck on that. :)
As you can see on the doxygen standards page, we do not include @return when there is no return value, which there isn' t for these functions.
And, if you read the section on "hook descriptions", you will find that for hooks that my patch in #4 has the correct verb cases
and the one in #9 is incorrect.
http://drupal.org/node/1354#hooks
Comment #12
blg@bgreenaway.com commentedThis issue is now one of merely the verb case, as all other concerns are in fact fixed (equally) by both patches.
In reference to jhodgdon#4 and puregin#9 a comparison with the list of currently documented (and approved) hook descriptions for D7 here http://api.drupal.org/api/group/hooks/7 clearly shows patch at #4 jhodgdon's is the correct (& more consistent) patch. Verb 'ACT' rather than 'ACTS'.
The linked page shows roughly 10-15% of documented hooks are so far in error in this regard where both execute and executes exist in the docs, declare and declares exist in the doc, alter and alters exist in the doc and many more examples of both plural and singular verb case.
Look for the most common case type, and that is the singular case. As node/1354 points out api.drupal.org standard for hooks is the singular type case. So #4 is both correct, by standards, and passes simpletest testing.
Please commit the patch by jhodgdon, 777092c.patch in comment #4.
Comment #13
dries commentedCommitted to CVS HEAD. Thanks.