public function setType($type = 'string')
    {
        if (!\in_array($type, $this->validTypes, true)) {
            throw new InvalidQueryParameterTypeException($type, $this->validTypes);
        }

        $this->type = $type;
    }
public function setType($type = 'string')
    {
        if (!\in_array($type, $this->validTypes, true)) {
            throw new InvalidQueryParameterTypeException($type, $this->validTypes);
        }

        $this->type = $type;
    }
public function setType ( $ type = 'string' ) { if ( ! \ in_array ( $ type , $ this -> validTypes , true ) ) { throw new InvalidQueryParameterTypeException ( $ type , $ this -> validTypes ) ; } $ this -> type = $ type ; }
Set the type

@param string $type

@throws \Exception
Set the type