Skip to content
Snippets Groups Projects
Commit aa232f3b authored by Doug Green's avatar Doug Green
Browse files

better comment about my break from the string concatenation style suggestion

parent 13dfad84
No related branches found
No related tags found
No related merge requests found
......@@ -334,8 +334,16 @@ function do_coder_reviews($coder_args) {
// many thanks to http://ad.hominem.org/log/2005/05/quoted_strings.php
$lines = $orig_lines;
foreach (array('\'', '"') as $c) {
// NOTE: please forgive the break from style here
// I thought NOT using extra spaces made this more readable
/**
* warning: string concatenation should be formatted with a space
* separating the operators (dot .) and terms ('string')
*
* I broke with coding style because IMHO the extra spaces made this line
* less readable, pushing this complicated regex onto multiple lines.
*
* I also want to make the point that the coder module is making
* suggestions. You can bend or break them if there is good reason.
*/
$regex = '['.$c.']([^'.$c.'\\\\]*(?:\\\\.[^'.$c.'\\\\]*)*)['.$c.']';
$lines = preg_replace("/$regex/", "$c$c", $lines);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment