function coder_add_space in Coder 5
Same name and namespace in other branches
- 5.2 scripts/coder_format/coder_format.inc \coder_add_space()
- 6.2 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
string $result: Current result string that will be checked.
Return value
string 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 691
Code
function coder_add_space(&$result) {
if (substr($result, -1) == ')') {
$result .= ' ';
}
}