{
"event": "PreToolUse",
"tool_name": "Write",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Domain\/Traits\/TimestampsTrait.php",
"content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Domain\\Traits;\n\n\/\/ @responsibility: Wiederverwendbare Timestamp-Getter für Entities\n\ntrait TimestampsTrait\n{\n private \\DateTimeImmutable $createdAt;\n private \\DateTimeImmutable $updatedAt;\n private ?\\DateTimeImmutable $completedAt = null;\n\n public function getCreatedAt(): \\DateTimeImmutable\n {\n return $this->createdAt;\n }\n\n public function getUpdatedAt(): \\DateTimeImmutable\n {\n return $this->updatedAt;\n }\n\n public function getCompletedAt(): ?\\DateTimeImmutable\n {\n return $this->completedAt;\n }\n\n private function touch(): void\n {\n $this->updatedAt = new \\DateTimeImmutable();\n }\n\n private function toDateTime(\\DateTimeImmutable|string $value): \\DateTimeImmutable\n {\n return $value instanceof \\DateTimeImmutable ? $value : new \\DateTimeImmutable($value);\n }\n}\n"
}
}
{
"tool_response": {
"type": "create",
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Domain\/Traits\/TimestampsTrait.php",
"content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Domain\\Traits;\n\n\/\/ @responsibility: Wiederverwendbare Timestamp-Getter für Entities\n\ntrait TimestampsTrait\n{\n private \\DateTimeImmutable $createdAt;\n private \\DateTimeImmutable $updatedAt;\n private ?\\DateTimeImmutable $completedAt = null;\n\n public function getCreatedAt(): \\DateTimeImmutable\n {\n return $this->createdAt;\n }\n\n public function getUpdatedAt(): \\DateTimeImmutable\n {\n return $this->updatedAt;\n }\n\n public function getCompletedAt(): ?\\DateTimeImmutable\n {\n return $this->completedAt;\n }\n\n private function touch(): void\n {\n $this->updatedAt = new \\DateTimeImmutable();\n }\n\n private function toDateTime(\\DateTimeImmutable|string $value): \\DateTimeImmutable\n {\n return $value instanceof \\DateTimeImmutable ? $value : new \\DateTimeImmutable($value);\n }\n}\n",
"structuredPatch": [],
"originalFile": null
}
}