public function attach($event, Closure $listener)
    {
        if (!is_callable($listener)) {
            throw new InvalidArgumentException(sprintf(
                'Second argument must be callable not "%s"', gettype($listener)
            ));
        }

        if (!is_string($event)) {
            throw new InvalidArgumentException(sprintf(
                'First argument must be string, got "%s"', gettype($event)
            ));
        }

        $this->listeners[$event] = $listener;
        return $this;
    }