{
"event": "PreToolUse",
"tool_name": "Edit",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Controller\/CrawlerController.php",
"old_string": " if ($crawl === null) {\n $this->notFound('Crawl nicht gefunden');\n\n return;\n }",
"new_string": " if ($crawl === null) {\n $this->notFound('Crawl nicht gefunden');\n }",
"replace_all": true
}
}
{
"tool_response": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Controller\/CrawlerController.php",
"oldString": " if ($crawl === null) {\n $this->notFound('Crawl nicht gefunden');\n\n return;\n }",
"newString": " if ($crawl === null) {\n $this->notFound('Crawl nicht gefunden');\n }",
"originalFile": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Controller;\n\n\/\/ @responsibility: HTTP-Endpunkte fuer Crawl-Uebersicht\n\nuse Framework\\Controller;\nuse Infrastructure\\Crawler\\CrawlerCrawlRepository;\nuse Infrastructure\\Crawler\\CrawlerErrorRepository;\nuse Infrastructure\\Crawler\\CrawlerPageRepository;\nuse Infrastructure\\Crawler\\CrawlerStatsRepository;\n\nclass CrawlerController extends Controller\n{\n public function __construct(\n private readonly CrawlerCrawlRepository $crawls,\n private readonly CrawlerPageRepository $pages,\n private readonly CrawlerStatsRepository $stats,\n private readonly CrawlerErrorRepository $errorsRepo,\n ) {\n }\n\n public function index(): void\n {\n $this->view('crawler.index', [\n 'title' => 'Crawler',\n 'crawls' => $this->crawls->listRecent(50),\n ]);\n }\n\n public function show(int $id): void\n {\n $crawl = $this->crawls->find($id);\n if ($crawl === null) {\n $this->notFound('Crawl nicht gefunden');\n\n return;\n }\n $this->view('crawler.show', [\n 'title' => 'Crawl #' . $id,\n 'crawl' => $crawl,\n 'pages' => $this->pages->listByCrawl($id, 200, 0),\n 'stats' => $this->stats->forCrawl($id),\n ]);\n }\n\n public function errors(int $id): void\n {\n $crawl = $this->crawls->find($id);\n if ($crawl === null) {\n $this->notFound('Crawl nicht gefunden');\n\n return;\n }\n $this->view('crawler.errors', [\n 'title' => 'Fehler #' . $id,\n 'crawl' => $crawl,\n 'errors' => $this->errorsRepo->listByCrawl($id),\n ]);\n }\n}\n",
"structuredPatch": [
{
"oldStart": 35,
"oldLines": 8,
"newStart": 35,
"newLines": 6,
"lines": [
" $crawl = $this->crawls->find($id);",
" if ($crawl === null) {",
" $this->notFound('Crawl nicht gefunden');",
"-",
"- return;",
" }",
" $this->view('crawler.show', [",
" 'title' => 'Crawl #' . $id,"
]
},
{
"oldStart": 51,
"oldLines": 8,
"newStart": 49,
"newLines": 6,
"lines": [
" $crawl = $this->crawls->find($id);",
" if ($crawl === null) {",
" $this->notFound('Crawl nicht gefunden');",
"-",
"- return;",
" }",
" $this->view('crawler.errors', [",
" 'title' => 'Fehler #' . $id,"
]
}
],
"userModified": false,
"replaceAll": true
}
}