Class: Generic_Sniffs_CodeAnalysis_UnconditionalIfStatementSniff
Source Location: /PHP_CodeSniffer-2.0.0/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php
Detects unconditional if- and elseif-statements.
Author(s):
Version:
Copyright:
- 2007-2014 Manuel Pichler. All rights reserved.
Inherited Variables
Inherited Methods
Class Details
[line 44]
Detects unconditional if- and elseif-statements.
This rule is based on the PMD rule catalog. The Unconditional If Statement sniff detects statement conditions that are only set to one of the constant values true or false
class Foo
{
public function close()
{
if (true)
{
// ...
}
}
}
Method Detail
process [line 72]
Processes this test, when one of its tokens is encountered.
Parameters:
int
$stackPtr
—
The position of the current token in the stack passed in $tokens.
register [line 53]
Registers the tokens that this sniff wants to listen for.
Documentation generated on 2019年3月11日 16:00:37 -0400 by
phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.