{
"event": "PreToolUse",
"tool_name": "Edit",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/UseCases\/Prompts\/PromptDTO.php",
"old_string": "<?php\n\nnamespace UseCases\\Prompts;\n\nfinal class PromptDTO",
"new_string": "<?php\n\ndeclare(strict_types=1);\n\nnamespace UseCases\\Prompts;\n\n\/\/ @responsibility: Datenübertragungsobjekt für Prompts\n\nfinal class PromptDTO"
}
}
{
"tool_response": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/UseCases\/Prompts\/PromptDTO.php",
"oldString": "<?php\n\nnamespace UseCases\\Prompts;\n\nfinal class PromptDTO",
"newString": "<?php\n\ndeclare(strict_types=1);\n\nnamespace UseCases\\Prompts;\n\n\/\/ @responsibility: Datenübertragungsobjekt für Prompts\n\nfinal class PromptDTO",
"originalFile": "<?php\n\nnamespace UseCases\\Prompts;\n\nfinal class PromptDTO\n{\n public function __construct(\n public readonly ?int $id,\n public readonly string $name,\n public readonly string $version,\n public readonly string $content,\n public readonly bool $isActive,\n public readonly int $criticCount = 0,\n public readonly ?string $createdAt = null,\n public readonly ?string $updatedAt = null,\n ) {\n }\n\n public static function fromArray(array $data): self\n {\n return new self(\n id: isset($data['id']) ? (int) $data['id'] : null,\n name: $data['name'] ?? '',\n version: $data['version'] ?? '1.0',\n content: $data['content'] ?? '',\n isActive: (bool) ($data['is_active'] ?? false),\n criticCount: (int) ($data['critic_count'] ?? 0),\n createdAt: $data['created_at'] ?? null,\n updatedAt: $data['updated_at'] ?? null,\n );\n }\n\n public function toArray(): array\n {\n return [\n 'id' => $this->id,\n 'name' => $this->name,\n 'version' => $this->version,\n 'content' => $this->content,\n 'is_active' => $this->isActive,\n 'critic_count' => $this->criticCount,\n 'created_at' => $this->createdAt,\n 'updated_at' => $this->updatedAt,\n ];\n }\n}\n",
"structuredPatch": [
{
"oldStart": 1,
"oldLines": 7,
"newStart": 1,
"newLines": 11,
"lines": [
" <?php",
" ",
"+declare(strict_types=1);",
"+",
" namespace UseCases\\Prompts;",
" ",
"+\/\/ @responsibility: Datenübertragungsobjekt für Prompts",
"+",
" final class PromptDTO",
" {",
" public function __construct("
]
}
],
"userModified": false,
"replaceAll": false
}
}