private static function stopStorage(ServerRequestInterface $request)
    {
        $storage = self::getAttribute($request, Middleware::STORAGE_KEY);
        self::setAttribute($request, Middleware::STORAGE_KEY, null);

        return (array) $storage;
    }