Protokoll #23887

ID23887
Zeitstempel2025-12-27 15:29:23.654069
Clientroot
IP
Warning: Undefined array key "request_ip" in /var/www/dev.campus.systemische-tools.de/src/View/protokoll/show.php on line 13

Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/dev.campus.systemische-tools.de/src/View/protokoll/show.php on line 13
Modellclaude-sonnet-4-20250514
Statuscompleted
Tokens780 (Input: 0, Output: 0)
Dauer86 ms
Request-Zeit
Warning: Undefined array key "request_timestamp" in /var/www/dev.campus.systemische-tools.de/src/View/protokoll/show.php on line 18
Response-Zeit-

Warning: Undefined array key "error_message" in /var/www/dev.campus.systemische-tools.de/src/View/protokoll/show.php on line 22

Request

{
    "event": "PreToolUse",
    "tool_name": "Read",
    "tool_input": {
        "file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/CodeAnalysis\/CodeQualityChecker.php",
        "limit": 70
    }
}

Response

{
    "tool_response": {
        "type": "text",
        "file": {
            "filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/CodeAnalysis\/CodeQualityChecker.php",
            "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Infrastructure\\CodeAnalysis;\n\n\/\/ @responsibility: Code-Hygiene-Analyse (Score 0-100, normalisiert, gewichtet)\n\nfinal class CodeQualityChecker\n{\n    \/** @var array<string, string> Regex patterns for secret detection *\/\n    private const SECRET_PATTERNS = [\n        'password' => '\/[\"\\'](?:password|passwd|pwd)[\"\\']\\\\s*[=:]\\\\s*[\"\\'][^\"\\']{3,}[\"\\']\/i',\n        'api_key' => '\/[\"\\'](?:api[_-]?key|apikey|secret[_-]?key)[\"\\']\\\\s*[=:]\\\\s*[\"\\'][^\"\\']{8,}[\"\\']\/i',\n        'token' => '\/[\"\\'](?:token|auth[_-]?token|access[_-]?token)[\"\\']\\\\s*[=:]\\\\s*[\"\\'][^\"\\']{8,}[\"\\']\/i',\n        'url_with_creds' => '\/https?:\\\\\/\\\\\/[^\\\\s:\\\\\/]+:[^\\\\s@]+@\/i',\n    ];\n\n    \/** @var array<string, string> Regex patterns for magic number detection *\/\n    private const MAGIC_NUMBER_PATTERNS = [\n        'magic_number' => '\/(?<![\\\\w])(?:100|1000|60|24|365|3600|86400)(?![\\\\w])\/',\n    ];\n\n    \/** @var array<string, array{optimal: int, max: int}> Default hygiene thresholds *\/\n    private const HYGIENE_DEFAULTS = [\n        'loc' => ['optimal' => 200, 'max' => 500],\n        'methods' => ['optimal' => 10, 'max' => 20],\n        'classes' => ['optimal' => 1, 'max' => 3],\n        'dependencies' => ['optimal' => 5, 'max' => 15],\n        'secrets' => ['optimal' => 0, 'max' => 1],\n        'magic_numbers' => ['optimal' => 0, 'max' => 10],\n    ];\n\n    \/** @var array<string, array<string, array{optimal: int, max: int}>> File type specific modifiers *\/\n    private const FILE_TYPE_MODIFIERS = [\n        'Controller' => [\n            'loc' => ['optimal' => 300, 'max' => 500],\n            'methods' => ['optimal' => 15, 'max' => 25],\n        ],\n        'Entity' => [\n            'loc' => ['optimal' => 100, 'max' => 300],\n            'methods' => ['optimal' => 20, 'max' => 30],\n        ],\n        'Repository' => [\n            'loc' => ['optimal' => 250, 'max' => 400],\n            'dependencies' => ['optimal' => 3, 'max' => 8],\n        ],\n        'Service' => [\n            'loc' => ['optimal' => 150, 'max' => 350],\n        ],\n        'UseCase' => [\n            'loc' => ['optimal' => 150, 'max' => 350],\n        ],\n    ];\n\n    \/** @var array<string, float> Factor weights (must sum to 1.0) *\/\n    private const WEIGHTS = [\n        'dependencies' => 0.25,\n        'loc' => 0.20,\n        'methods' => 0.20,\n        'secrets' => 0.15,\n        'classes' => 0.10,\n        'magic_numbers' => 0.10,\n    ];\n\n    \/**\n     * Analysiert eine Datei und berechnet den Code Hygiene Score.\n     *\n     * @param array<string, mixed> $analysisData Daten aus code_analysis\n     * @return array{",
            "numLines": 70,
            "startLine": 1,
            "totalLines": 411
        }
    }
}
← Vorheriger Zur Liste Nächster →