/**
 * PHPStan baseline analyzer (N6).
 *
 * Mature PHP codebases adopt PHPStan incrementally — they raise the level
 * to e.g. 6, generate a baseline file containing every existing error,
 * and treat the baseline as a debt ledger. The Yii2 panel in this gap
 * analysis (tgm-panel) ships an 18 011-line phpstan-baseline.neon — that's
 * roughly 1 800 ignored errors. The team knows the debt is there but has
 * no per-path triage data.
 *
 * This tool parses phpstan-baseline.neon and surfaces:
 *   - by_path:    files ranked by error count
 *   - by_category: error types (no-return-type, undefined-property,
 *                  iterable-no-value-type, ...) ranked by frequency
 *   - quick_wins: files with 1-3 errors — easy refactor targets
 *   - aggregate counts (total_ignored, by-severity if hints present)
 *
 * The tool is universal — works on any PHP repo with PHPStan, not only
 * Yii2. Auto-loads on composer.json detection.
 *
 * NEON parsing: NEON is a YAML superset with PHP-specific bracket forms.
 * Rather than pull in a NEON parser dependency we hand-roll a minimal
 * reader — the baseline format is mechanical (parameters: → ignoreErrors:
 * → array of {message, count, path}). Edge cases like nested includes are
 * out of scope; the tool would surface a file_unparseable note rather
 * than crash.
 */
export interface PhpStanBaselineEntry {
    message: string;
    count: number;
    path: string;
    /** Best-effort category derived from the message text. */
    category: string;
}
export interface PhpStanBaselineAudit {
    repo: string;
    baseline_file: string | null;
    /** Total ignored errors (sum of count fields). */
    total_ignored: number;
    /** Files containing at least one ignored error. */
    total_files: number;
    by_path: Array<{
        path: string;
        count: number;
    }>;
    by_category: Record<string, number>;
    /** Files with 1-3 ignored errors — quickest to clear. */
    quick_wins: Array<{
        path: string;
        count: number;
        categories: string[];
    }>;
    /** Raw entries (full list, sorted by count descending). */
    entries: PhpStanBaselineEntry[];
    /** Diagnostic when the baseline couldn't be parsed cleanly. */
    parse_warnings: string[];
}
export declare function analyzePhpStanBaseline(repo: string, options?: {
    baseline_path?: string;
    max_paths?: number;
}): Promise<PhpStanBaselineAudit>;
//# sourceMappingURL=phpstan-baseline-tools.d.ts.map