function coder_add_space in Coder 6.2
Same name and namespace in other branches
- 5.2 scripts/coder_format/coder_format.inc \coder_add_space()
- 5 scripts/coder_format/coder_format.inc \coder_add_space()
- 6 scripts/coder_format/coder_format.inc \coder_add_space()
- 7.2 scripts/coder_format/coder_format.inc \coder_add_space()
- 7 scripts/coder_format/coder_format.inc \coder_add_space()
Write a space in certain conditions.
A conditional space is needed after a right parenthesis of an if statement that is not followed by curly braces.
Parameters
$result: Current result string that will be checked.
Return value
Resulting string with or without an additional space.
1 call to coder_add_space()
- 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 1029 - Coder format helper functions.
Code
function coder_add_space(&$result) {
if (substr($result, -1) == ')') {
$result .= ' ';
}
}