I'm getting a lot of false warnings about t() like:
Line 582: Context has been added to t as the third parameter, locale has to be an element in the array. Example: array("context" => "frontpage", "locale" => "de"). (Drupal Docs)
drupal_set_message(t('Error completing Payment, please contact !helpemail to verify payment. Your Order Id is !orderid and the payment transaction id returned was !transid.', array('!helpemail' => variable_get('site_mail', 'site administrator'), '!orderid' => $order_id, '!transid' => $trans_id)), 'error');
Which are being triggered because the message is just slightly more complicated than the regular expression wants to deal with (I think).
Breaking it up into two lines like:
$error_message_fingerprint = t('Error completing Payment, please contact !helpemail to verify payment. Your Order Id is !orderid and the payment transaction id returned was !transid.', array('!helpemail' => variable_get('site_mail', 'site administrator'), '!orderid' => $order_id, '!transid' => $trans_id));
drupal_set_message($error_message_fingerprint, 'error');
Resolves the problem, but Coder is pointing folks in the wrong direction as it really has nothing to do with http://drupal.org/node/224333#locale_context
Comments
Comment #1
douggreen commentedThis is a good use case for a token rule. See #1745068: Coder Review Drupal 8.x Battleplan
Comment #2
douggreen commentedComment #3
klausiCoder 7.x is frozen now and will not receive updates. Coder 8.x-2.x can be used to check code for any Drupal version, Coder 8.x-2.x also supports the phpcbf command to automatically fix conding standard errors. Please check if this issue is still relevant and reopen against that version if necessary.