public function push($middleware)
    {
        if (! $middleware instanceof MiddlewareInterface &&
            ! is_callable($middleware)
        ) {
            throw new InvalidArgumentException(
                "Middleware stack accepts only MiddlewareInterface object or callable"
            );
        }

        array_push($this->middlewareStack, $middleware);
        return $this;
    }