doc-architect/doc-architect-core/src/main/java/com/docarchitect/core/scanner/impl/php/LaravelApiScanner.java [414:460]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private String applyPrefix(String prefix, String path) {
        if (prefix == null || prefix.isEmpty()) {
            return normalizePath(path);
        }

        String normalizedPrefix = prefix.startsWith("/") ? prefix : "/" + prefix;
        String normalizedPath = path.startsWith("/") ? path : "/" + path;

        // Avoid double slashes
        if (normalizedPrefix.endsWith("/") && normalizedPath.startsWith("/")) {
            normalizedPath = normalizedPath.substring(1);
        }

        return normalizePath(normalizedPrefix + normalizedPath);
    }

    /**
     * Normalizes a path to ensure it starts with / and has no trailing slash.
     */
    private String normalizePath(String path) {
        if (path == null || path.isEmpty()) {
            return "/";
        }

        String normalized = path.startsWith("/") ? path : "/" + path;

        // Remove trailing slash unless it's the root path
        if (normalized.length() > 1 && normalized.endsWith("/")) {
            normalized = normalized.substring(0, normalized.length() - 1);
        }

        // Replace multiple slashes with single slash
        normalized = normalized.replaceAll("/+", "/");

        return normalized;
    }

    /**
     * Extracts path parameters from a route path.
     */
    private List<String> extractPathParameters(String path) {
        List<String> params = new ArrayList<>();
        Matcher matcher = PATH_PARAM_PATTERN.matcher(path);
        while (matcher.find()) {
            params.add(matcher.group(1));
        }
        return params;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



doc-architect/doc-architect-core/src/main/java/com/docarchitect/core/scanner/impl/php/SymfonyApiScanner.java [496:542]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private String applyPrefix(String prefix, String path) {
        if (prefix == null || prefix.isEmpty()) {
            return normalizePath(path);
        }

        String normalizedPrefix = prefix.startsWith("/") ? prefix : "/" + prefix;
        String normalizedPath = path.startsWith("/") ? path : "/" + path;

        // Avoid double slashes
        if (normalizedPrefix.endsWith("/") && normalizedPath.startsWith("/")) {
            normalizedPath = normalizedPath.substring(1);
        }

        return normalizePath(normalizedPrefix + normalizedPath);
    }

    /**
     * Normalizes a path to ensure it starts with / and has no trailing slash.
     */
    private String normalizePath(String path) {
        if (path == null || path.isEmpty()) {
            return "/";
        }

        String normalized = path.startsWith("/") ? path : "/" + path;

        // Remove trailing slash unless it's the root path
        if (normalized.length() > 1 && normalized.endsWith("/")) {
            normalized = normalized.substring(0, normalized.length() - 1);
        }

        // Replace multiple slashes with single slash
        normalized = normalized.replaceAll("/+", "/");

        return normalized;
    }

    /**
     * Extracts path parameters from a route path.
     */
    private List<String> extractPathParameters(String path) {
        List<String> params = new ArrayList<>();
        Matcher matcher = PATH_PARAM_PATTERN.matcher(path);
        while (matcher.find()) {
            params.add(matcher.group(1));
        }
        return params;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



