src/Builder/FilterProcess.php
private function getSubtree(TreeExpression $expr)
    {
        foreach ($expr->getChildren() as $child) {
            if ($child->getType() == $this->operator)
                return $child;
        }

        $expr->addChild($subtree = new TreeExpression($this->operator));
        return $subtree;
    }
private function getSubtree(TreeExpression $expr)
    {
        foreach ($expr->getChildren() as $child) {
            if ($child->getType() == $this->operator)
                return $child;
        }

        $expr->addChild($subtree = new TreeExpression($this->operator));
        return $subtree;
    }
private function getSubtree ( TreeExpression $ expr ) { foreach ( $ expr -> getChildren ( ) as $ child ) { if ( $ child -> getType ( ) == $ this -> operator ) return $ child ; } $ expr -> addChild ( $ subtree = new TreeExpression ( $ this -> operator ) ) ; return $ subtree ; }
Retrieve or create the first subtree that matches with the operator
@param TreeExpression $expr
@return \DSQ\Expression\Expression|TreeExpression
Retrieve or create the first subtree that matches with the operator