I propose that a coding standard be to require a blank line between function definitions. That is, instead of:

function foo() {
  return 'baz';
}
function bar() {
  return 'baz';
}

You would have:

function foo() {
  return 'baz';
}

function bar() {
  return 'baz';
}

(I am reporting this minor feature request via the issue queue because I could not find a way to edit the Coding Standards page.)

Comments

dw317’s picture

Title: Require blank line between function definitions » Coding Standards: Require blank line between function definitions
leehunter’s picture

Project: Documentation » Drupal core
Version: » 7.26
Component: Correction/Clarification » documentation
Issue summary: View changes

Moving this to the core queue.

jhodgdon’s picture

Status: Active » Closed (works as designed)

Our coding standards actually require that every function have a documentation block, and I think most people know that we need a blank line between them... I'm not sure we really need to put this into the standards? It just seems like something that isn't actually a problem and probably doesn't need to be spelled out?