{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/Persistence\/FileBackupRepository.php",
"offset": 165,
"limit": 20
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/Persistence\/FileBackupRepository.php",
"content": "\n \/**\n * Restore a file from backup.\n *\n * @throws \\RuntimeException If restore fails\n * @throws \\SecurityException If path validation fails\n *\/\n public function restore(int $id): bool\n {\n $backup = $this->findById($id);\n\n if ($backup === null) {\n throw new \\RuntimeException('Backup not found');\n }\n\n $filePath = $backup['file_path'];\n $content = $backup['file_content'];\n\n \/\/ SECURITY: Validate the restore path before writing\n $this->validateRestorePath($filePath);",
"numLines": 20,
"startLine": 165,
"totalLines": 296
}
}
}