Class: Generic_Sniffs_Metrics_CyclomaticComplexitySniff
Source Location: /PHP_CodeSniffer-2.5.0/CodeSniffer/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php
Checks the cyclomatic complexity (McCabe) for functions.
Author(s):
Version:
Copyright:
Inherited Variables
Inherited Methods
Class Details
[line 32]
Checks the cyclomatic complexity (McCabe) for functions.
The cyclomatic complexity (also called McCabe code metrics) indicates the complexity within a function by counting the different paths the function includes.
Class Variables
$absoluteComplexity = 20
[line 47]
A complexity higer than this value will throw an error.
$complexity = 10
[line 40]
A complexity higher than this value will throw a warning.
Method Detail
process [line 71]
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 55]
Returns an array of tokens this test wants to listen for.
Documentation generated on 2019年3月11日 15:10:31 -0400 by
phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.