Protokoll #11854

ID11854
Zeitstempel2025-12-23 21:51:46.399772
Clientroot
IP145.224.96.190
Modellclaude-sonnet-4-20250514
Statuscompleted
Tokens6,558 (Input: 1,345, Output: 5,213)
Dauer99 ms
Request-Zeit2025-12-23 21:51:46.399772
Response-Zeit2025-12-23 21:51:46.498561

Request

{
    "event": "PreToolUse",
    "tool_name": "Edit",
    "tool_input": {
        "file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/View\/docs\/code-show.php",
        "old_string": "<?php if ($file['parse_error']): ?>\n<div class=\"alert alert--danger\" style=\"margin-bottom: 1.5rem;\">\n    <strong>Parse-Fehler:<\/strong> <?= htmlspecialchars($file['parse_error']) ?>\n<\/div>\n<?php endif; ?>\n\n<?php\n$totalDeps = count($uses) + ($extendsClass ? 1 : 0) + count($implements) + count($traits) + count($constructorDeps);\n?>",
        "new_string": "<?php if ($file['parse_error']): ?>\n<div class=\"alert alert--danger\" style=\"margin-bottom: 1.5rem;\">\n    <strong>Parse-Fehler:<\/strong> <?= htmlspecialchars($file['parse_error']) ?>\n<\/div>\n<?php endif; ?>\n\n<?php\n\/\/ Quality Data\n$qualityGrade = $file['quality_grade'] ?? null;\n$qualityIssues = json_decode($file['issues_json'] ?? '[]', true) ?: [];\n$gradeClass = match ($qualityGrade) {\n    'A' => 'badge--success',\n    'B' => 'badge--info',\n    'C' => 'badge--warning',\n    'D', 'F' => 'badge--danger',\n    default => 'badge--secondary',\n};\n?>\n<?php if ($qualityGrade): ?>\n<div style=\"margin-bottom: 1.5rem;\">\n    <h2>Code Quality <span class=\"badge <?= $gradeClass ?>\" style=\"font-size: 1.25rem;\"><?= $qualityGrade ?><\/span><\/h2>\n\n    <div style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1rem; margin-bottom: 1rem;\">\n        <div style=\"padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; text-align: center;\">\n            <div style=\"font-size: 1.5rem; font-weight: bold; color: var(--color-primary);\"><?= $file['complexity_score'] ?? 0 ?><\/div>\n            <div style=\"font-size: 0.75rem; color: var(--text-muted);\">Complexity Score<\/div>\n        <\/div>\n        <div style=\"padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; text-align: center;\">\n            <div style=\"font-size: 1.5rem; font-weight: bold; color: var(--color-info);\"><?= $file['loc_score'] ?? 0 ?><\/div>\n            <div style=\"font-size: 0.75rem; color: var(--text-muted);\">LOC Score<\/div>\n        <\/div>\n        <div style=\"padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; text-align: center;\">\n            <div style=\"font-size: 1.5rem; font-weight: bold; color: var(--color-success);\"><?= $file['dependency_score'] ?? 0 ?><\/div>\n            <div style=\"font-size: 0.75rem; color: var(--text-muted);\">Dependency Score<\/div>\n        <\/div>\n        <div style=\"padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; text-align: center;\">\n            <div style=\"font-size: 1.5rem; font-weight: bold; color: var(--color-warning);\"><?= $file['hardcoded_count'] ?? 0 ?><\/div>\n            <div style=\"font-size: 0.75rem; color: var(--text-muted);\">Hardcoded<\/div>\n        <\/div>\n    <\/div>\n\n    <?php if (!empty($qualityIssues)): ?>\n    <div style=\"background: var(--bg-secondary); border-radius: 8px; padding: 1rem;\">\n        <h3 style=\"margin-top: 0; font-size: 1rem;\">\n            Issues <span class=\"badge badge--danger\"><?= count($qualityIssues) ?><\/span>\n        <\/h3>\n        <table class=\"data-table\" style=\"margin: 0;\">\n            <thead>\n                <tr>\n                    <th style=\"width: 80px;\">Zeile<\/th>\n                    <th style=\"width: 120px;\">Typ<\/th>\n                    <th style=\"width: 100px;\">Severity<\/th>\n                    <th>Beschreibung<\/th>\n                <\/tr>\n            <\/thead>\n            <tbody>\n                <?php foreach ($qualityIssues as $issue): ?>\n                <tr>\n                    <td style=\"font-family: monospace;\"><?= $issue['line'] ?? '-' ?><\/td>\n                    <td>\n                        <span class=\"badge badge--<?= match($issue['type'] ?? '') {\n                            'hardcoded' => 'warning',\n                            'complexity' => 'info',\n                            'srp' => 'primary',\n                            'coupling' => 'danger',\n                            default => 'secondary'\n                        } ?>\">\n                            <?= htmlspecialchars($issue['type'] ?? 'unknown') ?>\n                        <\/span>\n                    <\/td>\n                    <td>\n                        <span class=\"badge badge--<?= match($issue['severity'] ?? '') {\n                            'error' => 'danger',\n                            'warning' => 'warning',\n                            'info' => 'info',\n                            default => 'secondary'\n                        } ?>\">\n                            <?= htmlspecialchars($issue['severity'] ?? 'info') ?>\n                        <\/span>\n                    <\/td>\n                    <td style=\"font-size: 0.875rem;\"><?= htmlspecialchars($issue['message'] ?? '') ?><\/td>\n                <\/tr>\n                <?php endforeach; ?>\n            <\/tbody>\n        <\/table>\n    <\/div>\n    <?php else: ?>\n    <div style=\"padding: 1rem; background: var(--bg-success); border-radius: 8px; color: var(--color-success);\">\n        Keine Issues gefunden - Code ist sauber!\n    <\/div>\n    <?php endif; ?>\n<\/div>\n<?php endif; ?>\n\n<?php\n$totalDeps = count($uses) + ($extendsClass ? 1 : 0) + count($implements) + count($traits) + count($constructorDeps);\n?>"
    }
}

Response

{
    "tool_response": {
        "filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/View\/docs\/code-show.php",
        "oldString": "<?php if ($file['parse_error']): ?>\n<div class=\"alert alert--danger\" style=\"margin-bottom: 1.5rem;\">\n    <strong>Parse-Fehler:<\/strong> <?= htmlspecialchars($file['parse_error']) ?>\n<\/div>\n<?php endif; ?>\n\n<?php\n$totalDeps = count($uses) + ($extendsClass ? 1 : 0) + count($implements) + count($traits) + count($constructorDeps);\n?>",
        "newString": "<?php if ($file['parse_error']): ?>\n<div class=\"alert alert--danger\" style=\"margin-bottom: 1.5rem;\">\n    <strong>Parse-Fehler:<\/strong> <?= htmlspecialchars($file['parse_error']) ?>\n<\/div>\n<?php endif; ?>\n\n<?php\n\/\/ Quality Data\n$qualityGrade = $file['quality_grade'] ?? null;\n$qualityIssues = json_decode($file['issues_json'] ?? '[]', true) ?: [];\n$gradeClass = match ($qualityGrade) {\n    'A' => 'badge--success',\n    'B' => 'badge--info',\n    'C' => 'badge--warning',\n    'D', 'F' => 'badge--danger',\n    default => 'badge--secondary',\n};\n?>\n<?php if ($qualityGrade): ?>\n<div style=\"margin-bottom: 1.5rem;\">\n    <h2>Code Quality <span class=\"badge <?= $gradeClass ?>\" style=\"font-size: 1.25rem;\"><?= $qualityGrade ?><\/span><\/h2>\n\n    <div style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1rem; margin-bottom: 1rem;\">\n        <div style=\"padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; text-align: center;\">\n            <div style=\"font-size: 1.5rem; font-weight: bold; color: var(--color-primary);\"><?= $file['complexity_score'] ?? 0 ?><\/div>\n            <div style=\"font-size: 0.75rem; color: var(--text-muted);\">Complexity Score<\/div>\n        <\/div>\n        <div style=\"padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; text-align: center;\">\n            <div style=\"font-size: 1.5rem; font-weight: bold; color: var(--color-info);\"><?= $file['loc_score'] ?? 0 ?><\/div>\n            <div style=\"font-size: 0.75rem; color: var(--text-muted);\">LOC Score<\/div>\n        <\/div>\n        <div style=\"padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; text-align: center;\">\n            <div style=\"font-size: 1.5rem; font-weight: bold; color: var(--color-success);\"><?= $file['dependency_score'] ?? 0 ?><\/div>\n            <div style=\"font-size: 0.75rem; color: var(--text-muted);\">Dependency Score<\/div>\n        <\/div>\n        <div style=\"padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; text-align: center;\">\n            <div style=\"font-size: 1.5rem; font-weight: bold; color: var(--color-warning);\"><?= $file['hardcoded_count'] ?? 0 ?><\/div>\n            <div style=\"font-size: 0.75rem; color: var(--text-muted);\">Hardcoded<\/div>\n        <\/div>\n    <\/div>\n\n    <?php if (!empty($qualityIssues)): ?>\n    <div style=\"background: var(--bg-secondary); border-radius: 8px; padding: 1rem;\">\n        <h3 style=\"margin-top: 0; font-size: 1rem;\">\n            Issues <span class=\"badge badge--danger\"><?= count($qualityIssues) ?><\/span>\n        <\/h3>\n        <table class=\"data-table\" style=\"margin: 0;\">\n            <thead>\n                <tr>\n                    <th style=\"width: 80px;\">Zeile<\/th>\n                    <th style=\"width: 120px;\">Typ<\/th>\n                    <th style=\"width: 100px;\">Severity<\/th>\n                    <th>Beschreibung<\/th>\n                <\/tr>\n            <\/thead>\n            <tbody>\n                <?php foreach ($qualityIssues as $issue): ?>\n                <tr>\n                    <td style=\"font-family: monospace;\"><?= $issue['line'] ?? '-' ?><\/td>\n                    <td>\n                        <span class=\"badge badge--<?= match($issue['type'] ?? '') {\n                            'hardcoded' => 'warning',\n                            'complexity' => 'info',\n                            'srp' => 'primary',\n                            'coupling' => 'danger',\n                            default => 'secondary'\n                        } ?>\">\n                            <?= htmlspecialchars($issue['type'] ?? 'unknown') ?>\n                        <\/span>\n                    <\/td>\n                    <td>\n                        <span class=\"badge badge--<?= match($issue['severity'] ?? '') {\n                            'error' => 'danger',\n                            'warning' => 'warning',\n                            'info' => 'info',\n                            default => 'secondary'\n                        } ?>\">\n                            <?= htmlspecialchars($issue['severity'] ?? 'info') ?>\n                        <\/span>\n                    <\/td>\n                    <td style=\"font-size: 0.875rem;\"><?= htmlspecialchars($issue['message'] ?? '') ?><\/td>\n                <\/tr>\n                <?php endforeach; ?>\n            <\/tbody>\n        <\/table>\n    <\/div>\n    <?php else: ?>\n    <div style=\"padding: 1rem; background: var(--bg-success); border-radius: 8px; color: var(--color-success);\">\n        Keine Issues gefunden - Code ist sauber!\n    <\/div>\n    <?php endif; ?>\n<\/div>\n<?php endif; ?>\n\n<?php\n$totalDeps = count($uses) + ($extendsClass ? 1 : 0) + count($implements) + count($traits) + count($constructorDeps);\n?>",
        "originalFile": "<?php\n\ndeclare(strict_types=1);\n\n\/\/ @responsibility: View für Code-Analyse-Detailansicht\n\nob_start();\n$shortPath = str_replace('\/var\/www\/dev.campus.systemische-tools.de\/', '', $file['file_path']);\n?>\n\n<nav class=\"breadcrumb\">\n    <a href=\"\/docs\/code\">Code-Analyse<\/a> &raquo;\n    <span><?= htmlspecialchars($file['file_name']) ?><\/span>\n<\/nav>\n\n<h1><?= htmlspecialchars($file['file_name']) ?><\/h1>\n\n<div class=\"file-meta\" style=\"margin-bottom: 1.5rem; padding: 1rem; background: var(--bg-secondary); border-radius: 8px;\">\n    <dl style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 0;\">\n        <div>\n            <dt style=\"font-size: 0.875rem; color: var(--text-muted);\">Pfad<\/dt>\n            <dd style=\"margin: 0; font-family: monospace; font-size: 0.875rem;\"><?= htmlspecialchars($shortPath) ?><\/dd>\n        <\/div>\n        <div>\n            <dt style=\"font-size: 0.875rem; color: var(--text-muted);\">Namespace<\/dt>\n            <dd style=\"margin: 0; font-family: monospace;\"><?= htmlspecialchars($file['namespace'] ?? '-') ?><\/dd>\n        <\/div>\n        <div>\n            <dt style=\"font-size: 0.875rem; color: var(--text-muted);\">Zeilen<\/dt>\n            <dd style=\"margin: 0;\"><?= number_format($file['line_count']) ?><\/dd>\n        <\/div>\n        <div>\n            <dt style=\"font-size: 0.875rem; color: var(--text-muted);\">Dateigröße<\/dt>\n            <dd style=\"margin: 0;\"><?= number_format($file['file_size']) ?> Bytes<\/dd>\n        <\/div>\n        <div>\n            <dt style=\"font-size: 0.875rem; color: var(--text-muted);\">Geändert<\/dt>\n            <dd style=\"margin: 0;\"><?= htmlspecialchars($file['modified_at']) ?><\/dd>\n        <\/div>\n        <div>\n            <dt style=\"font-size: 0.875rem; color: var(--text-muted);\">Gescannt<\/dt>\n            <dd style=\"margin: 0;\"><?= htmlspecialchars($file['scanned_at']) ?><\/dd>\n        <\/div>\n    <\/dl>\n<\/div>\n\n<?php if ($file['parse_error']): ?>\n<div class=\"alert alert--danger\" style=\"margin-bottom: 1.5rem;\">\n    <strong>Parse-Fehler:<\/strong> <?= htmlspecialchars($file['parse_error']) ?>\n<\/div>\n<?php endif; ?>\n\n<?php\n$totalDeps = count($uses) + ($extendsClass ? 1 : 0) + count($implements) + count($traits) + count($constructorDeps);\n?>\n<?php if ($totalDeps > 0): ?>\n<div style=\"margin-bottom: 1.5rem;\">\n    <h2>Dependencies <span class=\"badge badge--info\"><?= $totalDeps ?><\/span><\/h2>\n    <div style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem;\">\n        <?php if ($extendsClass): ?>\n        <div style=\"padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; border-left: 3px solid var(--color-warning);\">\n            <strong style=\"font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase;\">Extends<\/strong>\n            <div style=\"font-family: monospace; font-size: 0.875rem; margin-top: 0.25rem;\"><?= htmlspecialchars($extendsClass) ?><\/div>\n        <\/div>\n        <?php endif; ?>\n\n        <?php if (!empty($implements)): ?>\n        <div style=\"padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; border-left: 3px solid var(--color-info);\">\n            <strong style=\"font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase;\">Implements (<?= count($implements) ?>)<\/strong>\n            <div style=\"font-family: monospace; font-size: 0.875rem; margin-top: 0.25rem;\">\n                <?php foreach ($implements as $iface): ?>\n                <div><?= htmlspecialchars($iface) ?><\/div>\n                <?php endforeach; ?>\n            <\/div>\n        <\/div>\n        <?php endif; ?>\n\n        <?php if (!empty($traits)): ?>\n        <div style=\"padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; border-left: 3px solid var(--color-success);\">\n            <strong style=\"font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase;\">Traits (<?= count($traits) ?>)<\/strong>\n            <div style=\"font-family: monospace; font-size: 0.875rem; margin-top: 0.25rem;\">\n                <?php foreach ($traits as $trait): ?>\n                <div><?= htmlspecialchars($trait) ?><\/div>\n                <?php endforeach; ?>\n            <\/div>\n        <\/div>\n        <?php endif; ?>\n\n        <?php if (!empty($constructorDeps)): ?>\n        <div style=\"padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; border-left: 3px solid var(--color-primary);\">\n            <strong style=\"font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase;\">Constructor DI (<?= count($constructorDeps) ?>)<\/strong>\n            <div style=\"font-family: monospace; font-size: 0.875rem; margin-top: 0.25rem;\">\n                <?php foreach ($constructorDeps as $dep): ?>\n                <div><?= htmlspecialchars($dep) ?><\/div>\n                <?php endforeach; ?>\n            <\/div>\n        <\/div>\n        <?php endif; ?>\n    <\/div>\n\n    <?php if (!empty($uses)): ?>\n    <details style=\"margin-top: 1rem;\">\n        <summary style=\"cursor: pointer; padding: 0.5rem; background: var(--bg-secondary); border-radius: 6px;\">\n            <strong>Use-Statements (<?= count($uses) ?>)<\/strong>\n        <\/summary>\n        <div style=\"padding: 0.75rem; background: var(--bg-tertiary); border-radius: 0 0 6px 6px; font-family: monospace; font-size: 0.875rem;\">\n            <?php foreach ($uses as $use): ?>\n            <div style=\"padding: 0.125rem 0;\"><?= htmlspecialchars($use) ?><\/div>\n            <?php endforeach; ?>\n        <\/div>\n    <\/details>\n    <?php endif; ?>\n<\/div>\n<?php endif; ?>\n\n<div style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem;\">\n    <div>\n        <h2>Klassen <span class=\"badge badge--info\"><?= count($classes) ?><\/span><\/h2>\n        <?php if (empty($classes)): ?>\n        <p style=\"color: var(--text-muted);\">Keine Klassen gefunden.<\/p>\n        <?php else: ?>\n        <table class=\"data-table\">\n            <thead>\n                <tr>\n                    <th>Name<\/th>\n                    <th>Typ<\/th>\n                    <th style=\"text-align: right;\">Zeile<\/th>\n                <\/tr>\n            <\/thead>\n            <tbody>\n                <?php foreach ($classes as $class): ?>\n                <tr>\n                    <td><code><?= htmlspecialchars($class['name']) ?><\/code><\/td>\n                    <td>\n                        <span class=\"badge badge--<?= $class['type'] === 'interface' ? 'warning' : ($class['type'] === 'trait' ? 'info' : 'default') ?>\">\n                            <?= htmlspecialchars($class['type']) ?>\n                        <\/span>\n                    <\/td>\n                    <td style=\"text-align: right;\"><?= $class['line'] ?><\/td>\n                <\/tr>\n                <?php endforeach; ?>\n            <\/tbody>\n        <\/table>\n        <?php endif; ?>\n    <\/div>\n\n    <div>\n        <h2>Funktionen <span class=\"badge badge--success\"><?= count($functions) ?><\/span><\/h2>\n        <?php if (empty($functions)): ?>\n        <p style=\"color: var(--text-muted);\">Keine Funktionen gefunden.<\/p>\n        <?php else: ?>\n        <table class=\"data-table\">\n            <thead>\n                <tr>\n                    <th>Name<\/th>\n                    <th>Sichtbarkeit<\/th>\n                    <th style=\"text-align: right;\">Zeile<\/th>\n                <\/tr>\n            <\/thead>\n            <tbody>\n                <?php foreach ($functions as $func): ?>\n                <tr>\n                    <td><code><?= htmlspecialchars($func['name']) ?><\/code><\/td>\n                    <td>\n                        <?php if ($func['visibility']): ?>\n                        <span class=\"badge badge--<?= $func['visibility'] === 'private' ? 'danger' : ($func['visibility'] === 'protected' ? 'warning' : 'success') ?>\">\n                            <?= htmlspecialchars($func['visibility']) ?>\n                        <\/span>\n                        <?php else: ?>\n                        <span class=\"badge\">global<\/span>\n                        <?php endif; ?>\n                    <\/td>\n                    <td style=\"text-align: right;\"><?= $func['line'] ?><\/td>\n                <\/tr>\n                <?php endforeach; ?>\n            <\/tbody>\n        <\/table>\n        <?php endif; ?>\n    <\/div>\n<\/div>\n\n<?php if (!empty($dependents)): ?>\n<div style=\"margin-top: 1.5rem;\">\n    <h2>Verwendet von <span class=\"badge badge--warning\"><?= count($dependents) ?><\/span><\/h2>\n    <p style=\"font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1rem;\">\n        Diese Dateien haben eine Abhängigkeit zu dieser Klasse:\n    <\/p>\n    <table class=\"data-table\">\n        <thead>\n            <tr>\n                <th>Datei<\/th>\n                <th>Namespace<\/th>\n                <th>Typ<\/th>\n            <\/tr>\n        <\/thead>\n        <tbody>\n            <?php foreach ($dependents as $dep): ?>\n            <tr>\n                <td>\n                    <a href=\"\/docs\/code\/<?= $dep['id'] ?>\">\n                        <?= htmlspecialchars($dep['file_name']) ?>\n                    <\/a>\n                <\/td>\n                <td style=\"font-family: monospace; font-size: 0.875rem;\">\n                    <?= htmlspecialchars($dep['namespace'] ?? '-') ?>\n                <\/td>\n                <td>\n                    <span class=\"badge badge--<?= match($dep['dependency_type']) {\n                        'extends' => 'warning',\n                        'implements' => 'info',\n                        'constructor' => 'primary',\n                        'trait' => 'success',\n                        default => 'default'\n                    } ?>\">\n                        <?= htmlspecialchars($dep['dependency_type']) ?>\n                    <\/span>\n                <\/td>\n            <\/tr>\n            <?php endforeach; ?>\n        <\/tbody>\n    <\/table>\n<\/div>\n<?php endif; ?>\n\n<div style=\"margin-top: 2rem; display: flex; gap: 1rem;\">\n    <a href=\"\/docs\/code\" class=\"btn btn--secondary\">&larr; Zurück zur Übersicht<\/a>\n    <?php if (!empty($classes)): ?>\n    <a href=\"\/docs\/code\/<?= $file['id'... [TRUNCATED-8729b67253dd2f53]",
        "structuredPatch": [
            {
                "oldStart": 51,
                "oldLines": 6,
                "newStart": 51,
                "newLines": 94,
                "lines": [
                    " <?php endif; ?>",
                    " ",
                    " <?php",
                    "+\/\/ Quality Data",
                    "+$qualityGrade = $file['quality_grade'] ?? null;",
                    "+$qualityIssues = json_decode($file['issues_json'] ?? '[]', true) ?: [];",
                    "+$gradeClass = match ($qualityGrade) {",
                    "+    'A' => 'badge--success',",
                    "+    'B' => 'badge--info',",
                    "+    'C' => 'badge--warning',",
                    "+    'D', 'F' => 'badge--danger',",
                    "+    default => 'badge--secondary',",
                    "+};",
                    "+?>",
                    "+<?php if ($qualityGrade): ?>",
                    "+<div style=\"margin-bottom: 1.5rem;\">",
                    "+    <h2>Code Quality <span class=\"badge <?= $gradeClass ?>\" style=\"font-size: 1.25rem;\"><?= $qualityGrade ?><\/span><\/h2>",
                    "+",
                    "+    <div style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1rem; margin-bottom: 1rem;\">",
                    "+        <div style=\"padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; text-align: center;\">",
                    "+            <div style=\"font-size: 1.5rem; font-weight: bold; color: var(--color-primary);\"><?= $file['complexity_score'] ?? 0 ?><\/div>",
                    "+            <div style=\"font-size: 0.75rem; color: var(--text-muted);\">Complexity Score<\/div>",
                    "+        <\/div>",
                    "+        <div style=\"padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; text-align: center;\">",
                    "+            <div style=\"font-size: 1.5rem; font-weight: bold; color: var(--color-info);\"><?= $file['loc_score'] ?? 0 ?><\/div>",
                    "+            <div style=\"font-size: 0.75rem; color: var(--text-muted);\">LOC Score<\/div>",
                    "+        <\/div>",
                    "+        <div style=\"padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; text-align: center;\">",
                    "+            <div style=\"font-size: 1.5rem; font-weight: bold; color: var(--color-success);\"><?= $file['dependency_score'] ?? 0 ?><\/div>",
                    "+            <div style=\"font-size: 0.75rem; color: var(--text-muted);\">Dependency Score<\/div>",
                    "+        <\/div>",
                    "+        <div style=\"padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; text-align: center;\">",
                    "+            <div style=\"font-size: 1.5rem; font-weight: bold; color: var(--color-warning);\"><?= $file['hardcoded_count'] ?? 0 ?><\/div>",
                    "+            <div style=\"font-size: 0.75rem; color: var(--text-muted);\">Hardcoded<\/div>",
                    "+        <\/div>",
                    "+    <\/div>",
                    "+",
                    "+    <?php if (!empty($qualityIssues)): ?>",
                    "+    <div style=\"background: var(--bg-secondary); border-radius: 8px; padding: 1rem;\">",
                    "+        <h3 style=\"margin-top: 0; font-size: 1rem;\">",
                    "+            Issues <span class=\"badge badge--danger\"><?= count($qualityIssues) ?><\/span>",
                    "+        <\/h3>",
                    "+        <table class=\"data-table\" style=\"margin: 0;\">",
                    "+            <thead>",
                    "+                <tr>",
                    "+                    <th style=\"width: 80px;\">Zeile<\/th>",
                    "+                    <th style=\"width: 120px;\">Typ<\/th>",
                    "+                    <th style=\"width: 100px;\">Severity<\/th>",
                    "+                    <th>Beschreibung<\/th>",
                    "+                <\/tr>",
                    "+            <\/thead>",
                    "+            <tbody>",
                    "+                <?php foreach ($qualityIssues as $issue): ?>",
                    "+                <tr>",
                    "+                    <td style=\"font-family: monospace;\"><?= $issue['line'] ?? '-' ?><\/td>",
                    "+                    <td>",
                    "+                        <span class=\"badge badge--<?= match($issue['type'] ?? '') {",
                    "+                            'hardcoded' => 'warning',",
                    "+                            'complexity' => 'info',",
                    "+                            'srp' => 'primary',",
                    "+                            'coupling' => 'danger',",
                    "+                            default => 'secondary'",
                    "+                        } ?>\">",
                    "+                            <?= htmlspecialchars($issue['type'] ?? 'unknown') ?>",
                    "+                        <\/span>",
                    "+                    <\/td>",
                    "+                    <td>",
                    "+                        <span class=\"badge badge--<?= match($issue['severity'] ?? '') {",
                    "+                            'error' => 'danger',",
                    "+                            'warning' => 'warning',",
                    "+                            'info' => 'info',",
                    "+                            default => 'secondary'",
                    "+                        } ?>\">",
                    "+                            <?= htmlspecialchars($issue['severity'] ?? 'info') ?>",
                    "+                        <\/span>",
                    "+                    <\/td>",
                    "+                    <td style=\"font-size: 0.875rem;\"><?= htmlspecialchars($issue['message'] ?? '') ?><\/td>",
                    "+                <\/tr>",
                    "+                <?php endforeach; ?>",
                    "+            <\/tbody>",
                    "+        <\/table>",
                    "+    <\/div>",
                    "+    <?php else: ?>",
                    "+    <div style=\"padding: 1rem; background: var(--bg-success); border-radius: 8px; color: var(--color-success);\">",
                    "+        Keine Issues gefunden - Code ist sauber!",
                    "+    <\/div>",
                    "+    <?php endif; ?>",
                    "+<\/div>",
                    "+<?php endif; ?>",
                    "+",
                    "+<?php",
                    " $totalDeps = count($uses) + ($extendsClass ? 1 : 0) + count($implements) + count($traits) + count($constructorDeps);",
                    " ?>",
                    " <?php if ($totalDeps > 0): ?>"
                ]
            }
        ],
        "userModified": false,
        "replaceAll": false
    }
}
← Vorheriger Zur Liste Nächster →