Backup #888

ID888
Dateipfad/var/www/dev.campus.systemische-tools.de/src/View/docs/code-show.php
Version2
Typ modified
Größe8.2 KB
Hashf8ca893e27e2de616f6d677cf452177f32360275f39b0191123754c7eaaf6ab3
Datum2025-12-23 15:28:13
Geändert vonclaude-code-hook
GrundClaude Code Pre-Hook Backup vor Edit-Operation
Datei existiert Ja

Dateiinhalt

<?php

declare(strict_types=1);

// @responsibility: View für Code-Analyse-Detailansicht

ob_start();
$shortPath = str_replace('/var/www/dev.campus.systemische-tools.de/', '', $file['file_path']);
?>

<nav class="breadcrumb">
    <a href="/docs/code">Code-Analyse</a> &raquo;
    <span><?= htmlspecialchars($file['file_name']) ?></span>
</nav>

<h1><?= htmlspecialchars($file['file_name']) ?></h1>

<div class="file-meta" style="margin-bottom: 1.5rem; padding: 1rem; background: var(--bg-secondary); border-radius: 8px;">
    <dl style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 0;">
        <div>
            <dt style="font-size: 0.875rem; color: var(--text-muted);">Pfad</dt>
            <dd style="margin: 0; font-family: monospace; font-size: 0.875rem;"><?= htmlspecialchars($shortPath) ?></dd>
        </div>
        <div>
            <dt style="font-size: 0.875rem; color: var(--text-muted);">Namespace</dt>
            <dd style="margin: 0; font-family: monospace;"><?= htmlspecialchars($file['namespace'] ?? '-') ?></dd>
        </div>
        <div>
            <dt style="font-size: 0.875rem; color: var(--text-muted);">Zeilen</dt>
            <dd style="margin: 0;"><?= number_format($file['line_count']) ?></dd>
        </div>
        <div>
            <dt style="font-size: 0.875rem; color: var(--text-muted);">Dateigröße</dt>
            <dd style="margin: 0;"><?= number_format($file['file_size']) ?> Bytes</dd>
        </div>
        <div>
            <dt style="font-size: 0.875rem; color: var(--text-muted);">Geändert</dt>
            <dd style="margin: 0;"><?= htmlspecialchars($file['modified_at']) ?></dd>
        </div>
        <div>
            <dt style="font-size: 0.875rem; color: var(--text-muted);">Gescannt</dt>
            <dd style="margin: 0;"><?= htmlspecialchars($file['scanned_at']) ?></dd>
        </div>
    </dl>
</div>

<?php if ($file['parse_error']): ?>
<div class="alert alert--danger" style="margin-bottom: 1.5rem;">
    <strong>Parse-Fehler:</strong> <?= htmlspecialchars($file['parse_error']) ?>
</div>
<?php endif; ?>

<?php
$totalDeps = count($uses) + ($extendsClass ? 1 : 0) + count($implements) + count($traits) + count($constructorDeps);
?>
<?php if ($totalDeps > 0): ?>
<div style="margin-bottom: 1.5rem;">
    <h2>Dependencies <span class="badge badge--info"><?= $totalDeps ?></span></h2>
    <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem;">
        <?php if ($extendsClass): ?>
        <div style="padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; border-left: 3px solid var(--color-warning);">
            <strong style="font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase;">Extends</strong>
            <div style="font-family: monospace; font-size: 0.875rem; margin-top: 0.25rem;"><?= htmlspecialchars($extendsClass) ?></div>
        </div>
        <?php endif; ?>

        <?php if (!empty($implements)): ?>
        <div style="padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; border-left: 3px solid var(--color-info);">
            <strong style="font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase;">Implements (<?= count($implements) ?>)</strong>
            <div style="font-family: monospace; font-size: 0.875rem; margin-top: 0.25rem;">
                <?php foreach ($implements as $iface): ?>
                <div><?= htmlspecialchars($iface) ?></div>
                <?php endforeach; ?>
            </div>
        </div>
        <?php endif; ?>

        <?php if (!empty($traits)): ?>
        <div style="padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; border-left: 3px solid var(--color-success);">
            <strong style="font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase;">Traits (<?= count($traits) ?>)</strong>
            <div style="font-family: monospace; font-size: 0.875rem; margin-top: 0.25rem;">
                <?php foreach ($traits as $trait): ?>
                <div><?= htmlspecialchars($trait) ?></div>
                <?php endforeach; ?>
            </div>
        </div>
        <?php endif; ?>

        <?php if (!empty($constructorDeps)): ?>
        <div style="padding: 0.75rem; background: var(--bg-secondary); border-radius: 6px; border-left: 3px solid var(--color-primary);">
            <strong style="font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase;">Constructor DI (<?= count($constructorDeps) ?>)</strong>
            <div style="font-family: monospace; font-size: 0.875rem; margin-top: 0.25rem;">
                <?php foreach ($constructorDeps as $dep): ?>
                <div><?= htmlspecialchars($dep) ?></div>
                <?php endforeach; ?>
            </div>
        </div>
        <?php endif; ?>
    </div>

    <?php if (!empty($uses)): ?>
    <details style="margin-top: 1rem;">
        <summary style="cursor: pointer; padding: 0.5rem; background: var(--bg-secondary); border-radius: 6px;">
            <strong>Use-Statements (<?= count($uses) ?>)</strong>
        </summary>
        <div style="padding: 0.75rem; background: var(--bg-tertiary); border-radius: 0 0 6px 6px; font-family: monospace; font-size: 0.875rem;">
            <?php foreach ($uses as $use): ?>
            <div style="padding: 0.125rem 0;"><?= htmlspecialchars($use) ?></div>
            <?php endforeach; ?>
        </div>
    </details>
    <?php endif; ?>
</div>
<?php endif; ?>

<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem;">
    <div>
        <h2>Klassen <span class="badge badge--info"><?= count($classes) ?></span></h2>
        <?php if (empty($classes)): ?>
        <p style="color: var(--text-muted);">Keine Klassen gefunden.</p>
        <?php else: ?>
        <table class="data-table">
            <thead>
                <tr>
                    <th>Name</th>
                    <th>Typ</th>
                    <th style="text-align: right;">Zeile</th>
                </tr>
            </thead>
            <tbody>
                <?php foreach ($classes as $class): ?>
                <tr>
                    <td><code><?= htmlspecialchars($class['name']) ?></code></td>
                    <td>
                        <span class="badge badge--<?= $class['type'] === 'interface' ? 'warning' : ($class['type'] === 'trait' ? 'info' : 'default') ?>">
                            <?= htmlspecialchars($class['type']) ?>
                        </span>
                    </td>
                    <td style="text-align: right;"><?= $class['line'] ?></td>
                </tr>
                <?php endforeach; ?>
            </tbody>
        </table>
        <?php endif; ?>
    </div>

    <div>
        <h2>Funktionen <span class="badge badge--success"><?= count($functions) ?></span></h2>
        <?php if (empty($functions)): ?>
        <p style="color: var(--text-muted);">Keine Funktionen gefunden.</p>
        <?php else: ?>
        <table class="data-table">
            <thead>
                <tr>
                    <th>Name</th>
                    <th>Sichtbarkeit</th>
                    <th style="text-align: right;">Zeile</th>
                </tr>
            </thead>
            <tbody>
                <?php foreach ($functions as $func): ?>
                <tr>
                    <td><code><?= htmlspecialchars($func['name']) ?></code></td>
                    <td>
                        <?php if ($func['visibility']): ?>
                        <span class="badge badge--<?= $func['visibility'] === 'private' ? 'danger' : ($func['visibility'] === 'protected' ? 'warning' : 'success') ?>">
                            <?= htmlspecialchars($func['visibility']) ?>
                        </span>
                        <?php else: ?>
                        <span class="badge">global</span>
                        <?php endif; ?>
                    </td>
                    <td style="text-align: right;"><?= $func['line'] ?></td>
                </tr>
                <?php endforeach; ?>
            </tbody>
        </table>
        <?php endif; ?>
    </div>
</div>

<div style="margin-top: 2rem;">
    <a href="/docs/code" class="btn btn--secondary">&larr; Zurück zur Übersicht</a>
</div>

<?php $content = ob_get_clean(); ?>
<?php require VIEW_PATH . '/layout.php'; ?>

Vollständig herunterladen

Aktionen

Herunterladen

Andere Versionen dieser Datei

ID Version Typ Größe Datum
1348 18 modified 7.9 KB 2025-12-25 16:28
1347 17 modified 7.9 KB 2025-12-25 16:28
1346 16 modified 7.9 KB 2025-12-25 16:28
1345 15 modified 7.8 KB 2025-12-25 16:28
1341 14 modified 7.9 KB 2025-12-25 16:26
1340 13 modified 8.2 KB 2025-12-25 16:26
1322 12 modified 8.0 KB 2025-12-25 16:17
1321 11 modified 7.7 KB 2025-12-25 16:17
1320 10 modified 7.5 KB 2025-12-25 16:17
954 9 modified 7.5 KB 2025-12-23 22:15
953 8 modified 7.6 KB 2025-12-23 22:08
948 7 modified 7.4 KB 2025-12-23 22:06
945 6 modified 6.2 KB 2025-12-23 22:00
941 5 modified 14.2 KB 2025-12-23 21:55
940 4 modified 9.9 KB 2025-12-23 21:51
890 3 modified 9.8 KB 2025-12-23 15:36
888 2 modified 8.2 KB 2025-12-23 15:28
883 1 modified 4.9 KB 2025-12-23 15:21

← Zurück zur Übersicht