Hey, I just made a few changes to the comments, but the main reason for this patch is to change the opening <?PHP tag to enable my text editor to properly colorize the code. Just makes it easier to read as I attempt to help out on this project. :-)

Comments

mrtoner’s picture

Version: 6.x-1.x-dev »
StatusFileSize
new26.2 KB

Okay, this latest patch cleans up the formatting of the module somewhat as I am learning about Drupal coding standards.

litwol’s picture

Status: Needs review » Needs work

#1 doesnt apply anymore. Please re-roll after the latest commits to HEAD.

mrtoner’s picture

Title: Cleanup for my text editor » Cleanup comments & formatting
Status: Needs work » Needs review
StatusFileSize
new22.62 KB

Re-rolled against HEAD.

mrtoner’s picture

StatusFileSize
new23.44 KB

Hmm. I should have included the edits from #297852: t() not used for hook_menu().

mrtoner’s picture

StatusFileSize
new37.49 KB

Installed the Coder module and found a bunch more edits I needed to make. Also added a description for the admin page and added some indents for readability.

naheemsays’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies cleanly and most changes seem to be sane.

I do have a question about tabbing (with spaces) though... in some places the module uses multiple spaces before an equals so that multiple lines align their equals signs. I on the other hand tend to use just one space - am I in the wrong?

EDIT - another copding convention question - are we following the . convention? I know that it has been changed for Drupal 7 and that some maintainers dislike the version for previous drupal releases, so I would like a clarification on that too.

I would also assume that this is a fragile patch and should probably be merged before others.

mrtoner’s picture

I do have a question about tabbing (with spaces) though... in some places the module uses multiple spaces before an equals so that multiple lines align their equals signs. I on the other hand tend to use just one space - am I in the wrong?

It's optional and a matter of personal preference. I like the readability.

another copding convention question - are we following the . convention? I know that it has been changed for Drupal 7 and that some maintainers dislike the version for previous drupal releases, so I would like a clarification on that too.

This is the first serious contribution to Drupal for me, so I'm not familiar with that?

litwol’s picture

This is a big patch. i will review and commit it now. beware that this may (and most likely will) break other patches because this one is so big.

naheemsays’s picture

@ MrToner - prior to Drupal 7 (still in dev), the coding style enforced was that when concatenating two strings, the dot (.) would have a space between itself and any functions/variables, but not between it and quotation marks, giving code like $x = $y ."stuff";.

This was recenly changed to be the same with other projects and have a space on both side, making the above code $x = $y . "stuff";.

Nothing major, but sometimes it makes a difference. reference: #245115: Fix Drupal's awkward coding standards for the . operator

litwol’s picture

Status: Reviewed & tested by the community » Fixed
StatusFileSize
new36.83 KB

I did few minor style changes to make coder module happy. I'm attaching the patch which was used.

commit details are here: http://drupal.org/cvs?commit=137669

mrtoner’s picture

@nbz: I have always used a space on either side, so I was confused when Coder made its suggestions. I'm for the D7 way.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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