Protokoll #7459

ID7459
Zeitstempel2025-12-23 08:06:28.932798
Clientroot
IP145.224.96.190
Modellclaude-sonnet-4-20250514
Statuscompleted
Tokens966 (Input: 185, Output: 781)
Dauer296 ms
Request-Zeit2025-12-23 08:06:28.932798
Response-Zeit2025-12-23 08:06:29.228812

Request

{
    "event": "PreToolUse",
    "tool_name": "Edit",
    "tool_input": {
        "file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/Validation\/ValidationResult.php",
        "old_string": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Infrastructure\\Validation;\n\n\/**\n * Value Object for validation results.\n *\n * Provides a type-safe way to return validation outcomes with optional\n * error messages and additional data. Immutable by design.\n *\n * @package Infrastructure\\Validation\n *\/\nfinal readonly class ValidationResult",
        "new_string": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Infrastructure\\Validation;\n\n\/\/ @responsibility: Value Object für Validierungsergebnisse (immutable)\n\nfinal readonly class ValidationResult"
    }
}

Response

{
    "tool_response": {
        "filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/Validation\/ValidationResult.php",
        "oldString": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Infrastructure\\Validation;\n\n\/**\n * Value Object for validation results.\n *\n * Provides a type-safe way to return validation outcomes with optional\n * error messages and additional data. Immutable by design.\n *\n * @package Infrastructure\\Validation\n *\/\nfinal readonly class ValidationResult",
        "newString": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Infrastructure\\Validation;\n\n\/\/ @responsibility: Value Object für Validierungsergebnisse (immutable)\n\nfinal readonly class ValidationResult",
        "originalFile": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Infrastructure\\Validation;\n\n\/**\n * Value Object for validation results.\n *\n * Provides a type-safe way to return validation outcomes with optional\n * error messages and additional data. Immutable by design.\n *\n * @package Infrastructure\\Validation\n *\/\nfinal readonly class ValidationResult\n{\n    \/**\n     * @param bool        $valid Whether validation passed\n     * @param string|null $error Error message if validation failed\n     * @param mixed       $data  Additional data (e.g., validated value)\n     *\/\n    private function __construct(\n        public bool $valid,\n        public ?string $error,\n        public mixed $data = null\n    ) {\n    }\n\n    \/**\n     * Create a successful validation result.\n     *\n     * @param mixed $data Optional data to include (e.g., validated\/normalized value)\n     *\/\n    public static function ok(mixed $data = null): self\n    {\n        return new self(true, null, $data);\n    }\n\n    \/**\n     * Create a failed validation result.\n     *\n     * @param string $message Error message describing the validation failure\n     *\/\n    public static function error(string $message): self\n    {\n        return new self(false, $message);\n    }\n\n    \/**\n     * Check if validation passed.\n     *\/\n    public function isValid(): bool\n    {\n        return $this->valid;\n    }\n\n    \/**\n     * Check if validation failed.\n     *\/\n    public function isError(): bool\n    {\n        return !$this->valid;\n    }\n\n    \/**\n     * Get error message or null if valid.\n     *\/\n    public function getError(): ?string\n    {\n        return $this->error;\n    }\n\n    \/**\n     * Get associated data.\n     *\/\n    public function getData(): mixed\n    {\n        return $this->data;\n    }\n}\n",
        "structuredPatch": [
            {
                "oldStart": 4,
                "oldLines": 14,
                "newStart": 4,
                "newLines": 8,
                "lines": [
                    " ",
                    " namespace Infrastructure\\Validation;",
                    " ",
                    "-\/**",
                    "- * Value Object for validation results.",
                    "- *",
                    "- * Provides a type-safe way to return validation outcomes with optional",
                    "- * error messages and additional data. Immutable by design.",
                    "- *",
                    "- * @package Infrastructure\\Validation",
                    "- *\/",
                    "+\/\/ @responsibility: Value Object für Validierungsergebnisse (immutable)",
                    "+",
                    " final readonly class ValidationResult",
                    " {",
                    "     \/**"
                ]
            }
        ],
        "userModified": false,
        "replaceAll": false
    }
}
← Vorheriger Zur Liste Nächster →