getFirstChildOfType() public méthode

This method will search recursive for the first child node that is an instance of the given $targetType. The returned value will be null if no child exists for that.
public getFirstChildOfType ( string $targetType ) : PDepend\Source\AST\ASTNode
$targetType string
Résultat PDepend\Source\AST\ASTNode
 /**
  * Returns the first child of the given type or <b>null</b> when this node
  * has no child of the given type.
  *
  * @param string $type The searched child type.
  * @return \PHPMD\AbstractNode
  */
 public function getFirstChildOfType($type)
 {
     $node = $this->node->getFirstChildOfType('PDepend\\Source\\AST\\AST' . $type);
     if ($node === null) {
         return null;
     }
     return new ASTNode($node, $this->getFileName());
 }