Closed (duplicate)
Project:
Coder
Version:
7.x-1.x-dev
Component:
Coder Review
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Dec 2011 at 17:33 UTC
Updated:
2 Mar 2012 at 01:31 UTC
I get a "Use sentence case, not title case, for end-user strings." on this line:
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
Comments
Comment #1
douggreen commentedThe error is triggering on 'XMLHttpRequest' because it's a quoted string and has an odd case. Coder tries not to have false positives, but it will always be a bit imperfect. I don't know what else to do here. Please re-open if you have a code fix suggestion.
Comment #2
naught101 commented@Doug: Check that the string has at least one space in it. If not, assume it's not a sentence, and ignore it.
A slightly different case that I'm hitting is this:
Surely a title should be in title case (because it's a title)? I would suggest adding another check that the line doesn't match
^\s*\(\'\|\"\)title(\'\|\"\)Comment #3
naught101 commentedclosing in favor of #337393: False positive: sentence case