Active
Project:
World Clock
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Dec 2008 at 11:42 UTC
Updated:
18 Dec 2008 at 13:39 UTC
I quickly scanned your code and it doesn't comply with the Drupal coding standards. Use Coder to clean it up.
Version is 6.x-1.x-dev since there's no 6.x-2.x-dev tag yet.
Comments
Comment #1
flevour commentedxano,
thanks for your report, I have ran Coder and fixed what was possible to fix. I won't fix some of the things it reports as they would make the code more hard to read.
Cheers,
Francesco
Comment #2
xanoYou are still not using doxygen-style code comments to explain what parameters a function takes and what value it returns. Also, could you please explain what parts of the code would be harder to read if you wrote it according to the standards?
Comment #3
flevour commentedComment #4
flevour commentedI won't be fixing minor errors such as indentation at lines 179-181. Renaming issue to focus on doxygen-style code comments.
Comment #5
xanoCoder's right. Either put all array items on the same line or put every item on a separate line. This just looks messy for no reason.
Also,
function worldclock_block($op='list', $delta=0) {should look likefunction worldclock_block($op = 'list', $delta = 0) {.Comment #6
flevour commentedWell done spotting the declaration error. I've fixed all the problems in all the branches. Since my Coder gives now empty results, I'm resetting title to focus on doxygen-style documentation.
Xano, you look very focused on these errors and thanks for pushing the module to a better code quality.
It would help if you could provide patches instead of simple indications!
Have fun,
Francesco
Comment #7
xanoI'de love too, but I'm busy enough with my own modules and other personal stuff. Besides, give a man a fish, and he will have food for a day. Teach him how to fish and he'll have food for a lifetime ;-)
I'm just trying to help :) Webchick has been pushing me some time ago as well when I was making the same 'mistakes' you have made with World Clock.
Comment #8
flevour commentedBart, thanks for your contribution today!
Good luck with your modules then,
happy hacking,
Francesco
PS: I have just taken co-mantainership for this module, so I am actually patching errors left from the original developer. Code is going to improve a lot in next days to come :)
Comment #9
flevour commentedThis patch has 2 more related tasks:
* doxygen style documentation for custom function
* function reorder to put hooks at top
I'm delaying the latter in the attempt to decrease the chance of rejection for existing patches.
Francesco