Class: UselessOverridingMethodSniff
Source Location: /PHP_CodeSniffer-3.0.2/src/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php
Detects unnecessary overridden methods that simply call their parent.
Author(s):
Copyright:
- 2007-2014 Manuel Pichler. All rights reserved.
Inherited Variables
Inherited Methods
Class Details
[line
28]
Detects unnecessary overridden 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.
class FooBar {
public function __construct($a, $b) {
parent::__construct($a, $b);
}
}
Method Detail
process [line 53]
void process(
File
$phpcsFile, int
$stackPtr)
Processes this test, when one of its tokens is encountered.
Parameters:
\PHP_CodeSniffer\Files\File
$phpcsFile
—
The file being scanned.
int
$stackPtr
—
The position of the current token in the stack passed in $tokens.
register [line 37]
Registers the tokens that this sniff wants to listen for.
Documentation generated on 2019年3月11日 14:05:05 -0400 by
phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.