function coder_postprocessor_array_rearrange in Coder 5.2
Same name and namespace in other branches
- 5 scripts/coder_format/coder_format.inc \coder_postprocessor_array_rearrange()
- 6.2 scripts/coder_format/coder_format.inc \coder_postprocessor_array_rearrange()
- 6 scripts/coder_format/coder_format.inc \coder_postprocessor_array_rearrange()
Related topics
File
- scripts/
coder_format/ coder_format.inc, line 1345
Code
function coder_postprocessor_array_rearrange() {
// @bug common.inc, comment.module:
// Not yet working properly 25/03/2007 sun.
return array(
'#title' => 'Break array elements into separate lines, indented one level.',
// ([\040\t]*) matches blanks and tabs.
// (.*?array\() matches anything and 'array('.
// ((.+ => .+, ){3,}) matches all array items, except the last one.
// (.+ => ([^\(\)]+)) matches the last array item, excluding.
// arrays or functions (starting with a left parenthesis) (not supported yet).
//'#search' => '/^([\040\t]*)(.*?array\()((.+ => .+, ){3,})(.+ => ([^\(\)]+))\)/m',
'#replace_callback' => 'coder_replace_array_rearrange',
);
}