public function setType($type)
    {
        if (!self::isValidType($type)) {
            throw new \InvalidArgumentException("$type is not a valid event type");
        }

        $this->type = $type;

        return $this;
    }