You are here

class MethodDeclarationSniff in Coder 8.3

Same name and namespace in other branches
  1. 8.2 coder_sniffer/Drupal/Sniffs/Methods/MethodDeclarationSniff.php \Drupal\Sniffs\Methods\MethodDeclarationSniff
  2. 8.3.x coder_sniffer/Drupal/Sniffs/Methods/MethodDeclarationSniff.php \Drupal\Sniffs\Methods\MethodDeclarationSniff

Checks that the method declaration is correct.

Extending \PHP_CodeSniffer\Standards\PSR2\Sniffs\Methods\MethodDeclarationSniff to also support traits.

@category PHP @package PHP_CodeSniffer @link http://pear.php.net/package/PHP_CodeSniffer

Hierarchy

  • class \Drupal\Sniffs\Methods\MethodDeclarationSniff extends \PHP_CodeSniffer\Standards\PSR2\Sniffs\Methods\MethodDeclarationSniff

Expanded class hierarchy of MethodDeclarationSniff

File

coder_sniffer/Drupal/Sniffs/Methods/MethodDeclarationSniff.php, line 26

Namespace

Drupal\Sniffs\Methods
View source
class MethodDeclarationSniff extends PSR2MethodDeclarationSniff {

  /**
   * Constructor.
   */
  public function __construct() {
    AbstractScopeSniff::__construct([
      T_CLASS,
      T_INTERFACE,
      T_TRAIT,
    ], [
      T_FUNCTION,
    ]);
  }

}

Members