public function setType($type)
    {
        if ($type === null || $type === 'array') {
            $this->type = $type;

            return $this;
        }

        if ($this->isObjectNameValid($type) !== true) {
            throw new InvalidArgumentException('Parameter type is not valid.');
        }

        $this->type = $type;

        return $this;
    }
public function setType($type)
    {
        if ($type === null || $type === 'array') {
            $this->type = $type;

            return $this;
        }

        if ($this->isObjectNameValid($type) !== true) {
            throw new InvalidArgumentException('Parameter type is not valid.');
        }

        $this->type = $type;

        return $this;
    }
public function setType ( $ type ) { if ( $ type === null || $ type === 'array' ) { $ this -> type = $ type ; return $ this ; } if ( $ this -> isObjectNameValid ( $ type ) !== true ) { throw new InvalidArgumentException ( 'Parameter type is not valid.' ) ; } $ this -> type = $ type ; return $ this ; }
Set the type of the parameter.

@param string $type The type of the parameter.
@return \Wingu\OctopusCore\CodeGenerator\PHP\ParameterGenerator
@throws \Wingu\OctopusCore\CodeGenerator\Exceptions\InvalidArgumentException If the type is not valid.
Set the type of the parameter .