src/Viserio/Component/Routing/MiddlewareNameResolver.php
public static function resolve(string $name, array $map, array $middlewareGroups, array $disabledMiddleware)
    {
        if (isset($disabledMiddleware[$name]) || \in_array($name, $disabledMiddleware, true)) {
            return [];
        }

        if (isset($middlewareGroups[$name])) {
            return self::parseMiddlewareGroup($name, $map, $middlewareGroups, $disabledMiddleware);
        }

        return $map[$name] ?? $name;
    }
public static function resolve(string $name, array $map, array $middlewareGroups, array $disabledMiddleware)
    {
        if (isset($disabledMiddleware[$name]) || \in_array($name, $disabledMiddleware, true)) {
            return [];
        }

        if (isset($middlewareGroups[$name])) {
            return self::parseMiddlewareGroup($name, $map, $middlewareGroups, $disabledMiddleware);
        }

        return $map[$name] ?? $name;
    }
Resolve the middleware name to a class name(s).

@param string $name
@param array  $map
@param array  $middlewareGroups
@param array  $disabledMiddleware

@return array|string