Méthode |
Description |
|
collectLiteral ( PHPMD\Node\ASTNode $node ) : void |
Stores the given literal node in an internal list of found variables. |
|
collectVariable ( PHPMD\Node\ASTNode $node ) : void |
Stores the given variable node in an internal list of found variables. |
|
collectVariables ( PHPMD\Node\AbstractCallableNode $node ) : void |
This method collects all local variable instances from the given
method/function node and stores their image in the $_images
property. |
|
isChildOf ( PHPMD\AbstractNode $node, string $type ) : boolean |
Checks if the given node is a direct or indirect child of a node with
the given type. |
|
isNameAllowedInContext ( PHPMD\AbstractNode $node ) : boolean |
Checks if a short name is acceptable in the current context. For the
moment these contexts are the init section of a for-loop and short
variable names in catch-statements. |
|
isUnusedForeachVariableAllowed ( PHPMD\Node\ASTNode $variable ) : boolean |
Checks if an unused foreach variable (key or variable) is allowed. |
|
removeParameters ( PHPMD\Node\AbstractCallableNode $node ) : void |
This method removes all variables from the $_images property that
are also found in the formal parameters of the given method or/and
function node. |
|