$range = max(.01, $max - $min) * 1.0001;

The preceding code from Tagadelic gets flagged with:

string concatenation should be formatted with a space separating the operators (dot .) and non-quote terms

CommentFileSizeAuthor
#1 coder_241886.patch1.38 KBstella

Comments

stella’s picture

Status: Active » Needs review
StatusFileSize
new1.38 KB

Coder already had code to handle false warnings of invalid string concatenation for decimal points, however it wasn't handling these two cases: $a = (.01); or $a = (1.) - i.e. where there is opening parentheses following by a dot, or a dot followed by a closing parentheses . The attached patch fixes this. However I think it's a bad practise to use of these, especially the latter. I would prefer 0.01 and 1.0 (or just 1). Perhaps we should add a check for this? I don't know if Drupal has such a coding standard.

Cheers,
Stella

stella’s picture

Status: Needs review » Fixed

Committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.