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

flevour’s picture

Status: Active » Fixed

xano,
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

xano’s picture

Status: Fixed » Active

You 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?

flevour’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
flevour’s picture

Title: Drupal coding standards » Drupal coding standards - doxygen-style code comments

I won't be fixing minor errors such as indentation at lines 179-181. Renaming issue to focus on doxygen-style code comments.

xano’s picture

Title: Drupal coding standards - doxygen-style code comments » Drupal coding standards

Coder'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 like function worldclock_block($op = 'list', $delta = 0) {.

flevour’s picture

Title: Drupal coding standards » Drupal coding standards - doxygen-style code comments

Well 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

xano’s picture

I'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.

flevour’s picture

Bart, 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 :)

flevour’s picture

This 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