Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
toolbar.module
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
29 Nov 2010 at 17:30 UTC
Updated:
29 Dec 2010 at 03:10 UTC
Jump to comment: Most recent file
I think this is just code-style. I much prefer to drop out of control structures before returning, but also the variant parts of the statement have already been abstracted out with a variable, so I am at a loss to explain why the two identical statements haven’t been combined.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | toolbar-cs.patch | 1 KB | zeta ζ |
| #2 | toolbar-cs.patch | 1 KB | zeta ζ |
| toolbar-cs.patch | 1.03 KB | zeta ζ |
Comments
Comment #2
zeta ζ commentedslight omission…
Comment #3
idflood commentedPatch looks good for me. After applying it the toolbar toggle still behave as expected.
Comment #4
zeta ζ commentedHi idflood,
Thanks for testing this: Could you mark it RTBC? Being a code style issue, it’s simple enough to not need extensive testing. What you have done is perfectly adequate.
Comment #5
damien tournoud commentedSounds reasonable. This is a minor code clean-up.
Comment #6
dries commentedThis patch no longer applies. It needs a re-roll.
Comment #7
zeta ζ commentedRe-roll…
Would you be interested in a coding-standards page, advising do not return from inside a control structure / one return at end of each function?
Comment #8
webchickCommitted to HEAD. Thanks!
zeta ζ: That sounds like a good idea. Maybe coordinate either at http://groups.drupal.org/documentation-team or http://groups.drupal.org/coding-standards-and-best-practices on the best place for that?