src/Rule/Condition/RelationCondition.php
public function setType($type)
    {
        $this->type = $type;

        switch ($type) {
            case 'text':
            case 'string':
                $this->operatorOpts = ['equals', 'notequals', 'contains'];
                break;
            case 'integer':
                $this->operatorOpts = ['equals', 'notequals', 'greaterthan', 'lessthan'];
                break;
            case 'boolean':
                $this->operatorOpts = ['equals'];
                break;
        }

        return $this;
    }
public function setType($type)
    {
        $this->type = $type;

        switch ($type) {
            case 'text':
            case 'string':
                $this->operatorOpts = ['equals', 'notequals', 'contains'];
                break;
            case 'integer':
                $this->operatorOpts = ['equals', 'notequals', 'greaterthan', 'lessthan'];
                break;
            case 'boolean':
                $this->operatorOpts = ['equals'];
                break;
        }

        return $this;
    }
public function setType ( $ type ) { $ this -> type = $ type ; switch ( $ type ) { case 'text' : case 'string' : $ this -> operatorOpts = [ 'equals' , 'notequals' , 'contains' ] ; break ; case 'integer' : $ this -> operatorOpts = [ 'equals' , 'notequals' , 'greaterthan' , 'lessthan' ] ; break ; case 'boolean' : $ this -> operatorOpts = [ 'equals' ] ; break ; } return $ this ; }
Set the type and predefine the operatorOpts by type
Set the type and predefine the operatorOpts by type