PDepend\Source\Language\PHP\PHPBuilder::findTrait PHP Method

findTrait() protected method

This method tries to find a trait instance matching for the given qualified name in all scopes already processed. It will return the best matching instance or null if no match exists.
Since: 0.9.5
protected findTrait ( string $qualifiedName ) : PDepend\Source\AST\ASTTrait
$qualifiedName string
return PDepend\Source\AST\ASTTrait
    protected function findTrait($qualifiedName)
    {
        $this->freeze();
        $trait = $this->findType($this->frozenTraits, $qualifiedName);
        if ($trait === null) {
            $trait = $this->findType($this->traits, $qualifiedName);
        }
        return $trait;
    }
PHPBuilder