For reference: Drupal SimpleTest coding standards

Here's an example of a false positive:

phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme

/**
 * Functional tests for the Translation module.
 */
class TranslationTestCase extends DrupalWebTestCase {
  public static function getInfo() {
    return array(
      'name' => 'Translation functionality',
      'description' => 'Create a basic page with translation, modify the page outdating translation, and update translation.',
      'group' => 'Translation',
    );
  }

There are three inherited methods involved; getInfo, setUp, and tearDown.

Full disclosure; there is an open discussion, albiet not a very recent one, on this particular exception. It's possible that the resolution of this is to standardize on documenting implementations of these functions, which would make the false positive an accurate positive.

Comments

klausi’s picture

From http://drupal.org/node/1354#classes

Make sure to have a docblock on each member variable and method. Short documentation forms should be used for the overridden/extended methods (don't repeat what is documented on the base method, just link to it by saying "Overrides BaseClassName::method()." or "Implements BaseInterfaceName::method().", and then document any specifics to this implementation, leaving out param/return docs).

fluxsauce’s picture

Additional context - we're using drupalcs for #1518116: [meta] Make Core pass Coder Review; the disparity between Drupal SimpleTest coding standards and Doxygen and comment formatting conventions has been noted and is why I opened this.

Not sure what the best course of action is; I agree that the SimpleTest standard should be changed, in particular I feel that this proposal addresses it.

klausi’s picture

Status: Active » Postponed
klausi’s picture

Status: Postponed » Closed (won't fix)

Drupal Code Sniffer has been merged into Coder 7.x-2.x. Please move this issue to the Coder queue and reopen it if the problem still exists.

klausi’s picture

Issue summary: View changes

Steps to replicate