OphCoTherapyapplication_DecisionTreeNode::canAddChild PHP Method

canAddChild() public method

* Can only have children for question nodes, not outcomes
public canAddChild ( )
    public function canAddChild()
    {
        if ($this->outcome) {
            return false;
        }
        if ($this->response_type->datatype == 'bool') {
            if (count($this->children) >= 2) {
                return false;
            }
        }
        return true;
    }