public function setType($type = null)
    {
        if (! is_null($type) && ! $this->isValidType($type)) {
            throw new InvalidArgumentException("Given batch modification type is invalid.");
        }

        $this->type = $type;

        return $this;
    }
public function setType($type = null)
    {
        if (! is_null($type) && ! $this->isValidType($type)) {
            throw new InvalidArgumentException("Given batch modification type is invalid.");
        }

        $this->type = $type;

        return $this;
    }
public function setType ( $ type = null ) { if ( ! is_null ( $ type ) && ! $ this -> isValidType ( $ type ) ) { throw new InvalidArgumentException ( "Given batch modification type is invalid." ) ; } $ this -> type = $ type ; return $ this ; }
Sets the type of the modification.

@param int|null $type

@return $this
Sets the type of the modification .