PHP_CodeSniffer
[ class tree: PHP_CodeSniffer ] [ index: PHP_CodeSniffer ] [ all elements ]

Class: Generic_Sniffs_CodeAnalysis_UselessOverridingMethodSniff

Source Location: /PHP_CodeSniffer-1.3.4/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php

Class Overview


Detects unnecessary overriden methods that simply call their parent.


Author(s):

Version:

  • Release: 1.3.4

Copyright:

  • 2007-2008 Manuel Pichler. All rights reserved.

Methods


Inherited Variables

Inherited Methods


Class Details

[line 39]
Detects unnecessary overriden methods that simply call their parent.

This rule is based on the PMD rule catalog. The Useless Overriding Method sniff detects the use of methods that only call their parent classes's method with the same name and arguments. These methods are not required.

  1.  class FooBar {
  2.    public function __construct($a$b{
  3.      parent::__construct($a$b);
  4.    }
  5.  }



[ Top ]


Method Detail

process   [line 64]

void process( PHP_CodeSniffer_File $phpcsFile, int $stackPtr)

Processes this test, when one of its tokens is encountered.
  • Access: public

Parameters:

PHP_CodeSniffer_File   $phpcsFile     The file being scanned.
int   $stackPtr     The position of the current token in the stack passed in $tokens.

[ Top ]

register   [line 48]

array(integer) register( )

Registers the tokens that this sniff wants to listen for.
  • Access: public

[ Top ]


Documentation generated on Thu, 17 May 2012 05:01:18 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.