You are here

function coder_br in Coder 5

Same name and namespace in other branches
  1. 5.2 scripts/coder_format/coder_format.inc \coder_br()
  2. 6.2 scripts/coder_format/coder_format.inc \coder_br()
  3. 6 scripts/coder_format/coder_format.inc \coder_br()
  4. 7.2 scripts/coder_format/coder_format.inc \coder_br()
  5. 7 scripts/coder_format/coder_format.inc \coder_br()

Generate a line feed including current line indent.

Parameters

bool $add_indent: Whether to add current line indent after line feed.

Return value

string The resulting string.

1 call to coder_br()
coder_format_string in scripts/coder_format/coder_format.inc
Format the source code according to Drupal coding style guidelines.

File

scripts/coder_format/coder_format.inc, line 669

Code

function coder_br($add_indent = true) {
  global $_coder_indent;
  $output = "\n";
  if ($add_indent && $_coder_indent >= 0) {
    $output .= str_repeat('  ', $_coder_indent);
  }
  return $output;
}