{
"event": "PreToolUse",
"tool_name": "Edit",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Domain\/ValueObject\/MessageTiming.php",
"old_string": "namespace Domain\\ValueObject;\n\n\/\/ @responsibility: Immutable Value Object for message timing (performance tracking)\n\nuse InvalidArgumentException;",
"new_string": "namespace Domain\\ValueObject;\n\n\/\/ @responsibility: Immutable Value Object for message timing (performance tracking)\n\nuse Domain\\Constants;\nuse InvalidArgumentException;"
}
}
{
"tool_response": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Domain\/ValueObject\/MessageTiming.php",
"oldString": "namespace Domain\\ValueObject;\n\n\/\/ @responsibility: Immutable Value Object for message timing (performance tracking)\n\nuse InvalidArgumentException;",
"newString": "namespace Domain\\ValueObject;\n\n\/\/ @responsibility: Immutable Value Object for message timing (performance tracking)\n\nuse Domain\\Constants;\nuse InvalidArgumentException;",
"originalFile": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Domain\\ValueObject;\n\n\/\/ @responsibility: Immutable Value Object for message timing (performance tracking)\n\nuse InvalidArgumentException;\n\nfinal class MessageTiming\n{\n private ?float $startMicrotime;\n private ?float $endMicrotime;\n\n private function __construct(?float $startMicrotime, ?float $endMicrotime)\n {\n if ($startMicrotime !== null && $endMicrotime !== null && $endMicrotime < $startMicrotime) {\n throw new InvalidArgumentException('End time cannot be before start time');\n }\n\n $this->startMicrotime = $startMicrotime;\n $this->endMicrotime = $endMicrotime;\n }\n\n public static function create(?float $startMicrotime, ?float $endMicrotime): self\n {\n return new self($startMicrotime, $endMicrotime);\n }\n\n public static function none(): self\n {\n return new self(null, null);\n }\n\n public static function started(float $startMicrotime): self\n {\n return new self($startMicrotime, null);\n }\n\n public function startMicrotime(): ?float\n {\n return $this->startMicrotime;\n }\n\n public function endMicrotime(): ?float\n {\n return $this->endMicrotime;\n }\n\n public function durationMs(): ?float\n {\n if ($this->startMicrotime === null || $this->endMicrotime === null) {\n return null;\n }\n\n return ($this->endMicrotime - $this->startMicrotime) * 1000;\n }\n\n public function isComplete(): bool\n {\n return $this->startMicrotime !== null && $this->endMicrotime !== null;\n }\n\n public function withEnd(float $endMicrotime): self\n {\n return new self($this->startMicrotime, $endMicrotime);\n }\n\n public function equals(self $other): bool\n {\n return $this->startMicrotime === $other->startMicrotime\n && $this->endMicrotime === $other->endMicrotime;\n }\n}\n",
"structuredPatch": [
{
"oldStart": 6,
"oldLines": 6,
"newStart": 6,
"newLines": 7,
"lines": [
" ",
" \/\/ @responsibility: Immutable Value Object for message timing (performance tracking)",
" ",
"+use Domain\\Constants;",
" use InvalidArgumentException;",
" ",
" final class MessageTiming"
]
}
],
"userModified": false,
"replaceAll": false
}
}