Block.module missing some @phpdocs

eojthebrave - August 20, 2009 - 17:45
Project:Drupal
Version:6.x-dev
Component:documentation
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Issue tags:Needs Documentation, Novice, Quick fix
Description

block.module has a couple of functions that are missing @phpdocs

#1

Davy Van Den Bremt - August 23, 2009 - 07:41
Assigned to:Anonymous» Davy Van Den Bremt
Status:active» needs review
AttachmentSizeStatusTest resultOperations
block-phpdoc-554992.patch7.73 KBIdleFailed: Failed to apply patch.View details | Re-test

#2

Davy Van Den Bremt - August 23, 2009 - 08:43

Don't trust the previous one. Had some leftovers from another patch. This is the one.

AttachmentSizeStatusTest resultOperations
block-phpdoc-554992-2.patch2.87 KBIdleFailed: Failed to apply patch.View details | Re-test

#3

Davy Van Den Bremt - August 23, 2009 - 08:48

Ignore previous one again. I should stop patching for today :(

AttachmentSizeStatusTest resultOperations
block-phpdoc-554992-2.patch1.03 KBIdleFailed: Failed to apply patch.View details | Re-test

#4

Dries - August 23, 2009 - 09:49
Status:needs review» needs work

In documentation, we write ID instead of id. Quick reroll?

#5

Davy Van Den Bremt - August 23, 2009 - 09:56
Status:needs work» needs review
AttachmentSizeStatusTest resultOperations
block-phpdoc-554992-3.patch1.03 KBIdleFailed: Failed to apply patch.View details | Re-test

#6

jhodgdon - August 26, 2009 - 17:29
Status:needs review» needs work

Function descriptions should be in 3rd person. E.g. "gets" vs. "get" and "saves" vs. "save".

Also, I would prefer to see a bit more description of the return values. block_box_get() should say something like
An associative array containing the box information from the database.
rather than
The box.

What is a box, anyway?

On the save function, is the return value always TRUE? That seems odd. Why would a function return TRUE in all cases?

#7

jhodgdon - August 26, 2009 - 17:30
Component:block.module» documentation
Category:task» bug report
Priority:minor» normal

Changing component also. Normally, API doc issues are put into component "documentation. And it is a doc "bug" of normal priority if some functions are missing doc.

#8

jhodgdon - October 1, 2009 - 16:00
Assigned to:Davy Van Den Bremt» Anonymous

Hmmm... It appears that block_box_get() and block_box_save() have changed names in Drupal 7 since this patch was submitted. They are now called block_custom_block_get() etc. And they are still missing doc. All of the other functions in the block module have doc (not necessarily great doc, but at least a doc block).

The corresponding D6 functions are also missing doc, so if this patch is accepted for D7, it should then be backported (with appropriate function names) to D6.

AttachmentSizeStatusTest resultOperations
554992.patch1.4 KBIdlePassed: 13631 passes, 0 fails, 0 exceptionsView details | Re-test

#9

jhodgdon - October 1, 2009 - 16:01
Status:needs work» needs review

#10

Dries - October 3, 2009 - 22:08
Status:needs review» fixed

Committed to CVS HEAD. Thanks.

#11

jhodgdon - October 4, 2009 - 17:39
Version:7.x-dev» 6.x-dev
Status:fixed» patch (to be ported)

Needs port to D6.

#12

jhodgdon - October 5, 2009 - 15:51
Status:patch (to be ported)» reviewed & tested by the community

Here's a Drupal 6 port of the patch. Same functions, different names, exact same functionality. Marking RTBC as it's the same patch approved for D7.

AttachmentSizeStatusTest resultOperations
554992_D6.patch1.41 KBIgnoredNoneNone

#13

Gábor Hojtsy - October 6, 2009 - 12:13
Status:reviewed & tested by the community» fixed

Thanks, committed to Drupal 6.

#14

System Message - October 20, 2009 - 12:20
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.