Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Liam Morland’s picture

Status: Active » Needs review
jhodgdon’s picture

Version: 7.x-dev » 8.x-dev
Status: Needs review » Needs work
Issue tags: +Needs backport to D7

Thanks for bringing this up!

The patches need a bit of work though:

a) Read the help text under the Attachments field -- regarding the file name you need to use so that the test bot will recognize the files as patches to test.

b) If there is no return value, we don't use

+ * @return
+ *   Nothing.

See http://drupal.org/node/1354#functions

b) Instead of "uid", in documentation write out "User ID", or in this case perhaps "User IDs".

c) Generally the parameter documentation needs to follow the style of other parameter docs. Such as

+ * @param $operation
+ *   String: "add_role" or "remove_role". The action to be taken.

Better:
The action to be taken, either "add_role" or "remove_role".

d) You might also check and see whether this function doc is already being cleaned up in this other issue:
#1326666: Clean up API docs for user module
If so, mark this issue as a duplicate of the other one.

Liam Morland’s picture

Status: Needs work » Needs review
FileSize
699 bytes

Updated D8 patch attached. If accepted, I will create D7 version.

jhodgdon’s picture

Title: Documentation problem with user_multiple_role_edit » user_multiple_role_edit doc needs more detail

My fault on this one... I should have said "user ID" rather than "User ID".

Maybe you could also fix up the first line of this function according to standards?
http://drupal.org/node/1354#functions
(should start with verb)

Actually though if it is a callback, then it should also have a line about that (see the bottom of that standards section on functions for details).

jhodgdon’s picture

Status: Needs review » Needs work
Liam Morland’s picture

Status: Needs work » Needs review
FileSize
817 bytes

Thanks. Update attached. I am not sure if the callback part is done correctly. The function is used as a callback, but can also be used directly.

jhodgdon’s picture

Status: Needs review » Needs work

Getting closer!

I took a look at user_user_operations and I think maybe for this function we can just omit the callback line, but maybe we should put in
@see user_user_operations()
(that would go at the end of the documentation block)

The first line looks much better. The verb tenses are incorrect though -- should be Adds/removes.

One more thing:
Array of user IDs (int; not string username).
==> How about:
Array of (integer) user IDs.

Thanks for all the iterations!

Liam Morland’s picture

Status: Needs work » Needs review
FileSize
781 bytes

Updated.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

OK! Thanks!

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x and 8.x. Thanks.

Automatically closed -- issue fixed for 2 weeks with no activity.