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

douggreen’s picture

Status: Active » Closed (won't fix)

The 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.

naught101’s picture

Status: Closed (won't fix) » Active

@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:

// in a form API form:
  'title' => t('Create Date'),

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(\'\|\"\)

naught101’s picture

Status: Active » Closed (duplicate)