{
"event": "PreToolUse",
"tool_name": "Write",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Controller\/CrawlerDiffController.php",
"content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Controller;\n\n\/\/ @responsibility: HTTP-Endpunkt fuer Diff-Vergleich zweier Crawls\n\nuse Framework\\Controller;\nuse Infrastructure\\Crawler\\CrawlerConnection;\nuse Infrastructure\\Crawler\\CrawlerCrawlRepository;\n\nclass CrawlerDiffController extends Controller\n{\n public function show(): void\n {\n $from = (int) ($_GET['from'] ?? 0);\n $to = (int) ($_GET['to'] ?? 0);\n $pdo = CrawlerConnection::pdo();\n $repo = new CrawlerCrawlRepository($pdo);\n $this->view('crawler.diff', [\n 'title' => 'Crawl-Diff',\n 'fromCrawl' => $from > 0 ? $repo->find($from) : null,\n 'toCrawl' => $to > 0 ? $repo->find($to) : null,\n 'fromId' => $from,\n 'toId' => $to,\n ]);\n }\n}\n"
}
}