{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/View\/docs\/code-show.php"
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Controller\/CodeAnalysisController.php",
"content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Controller;\n\n\/\/ @responsibility: HTTP-Endpunkte für Code-Analyse\n\nuse Framework\\Controller;\nuse UseCases\\CodeAnalysis\\GetCodeAnalysisUseCase;\n\nclass CodeAnalysisController extends Controller\n{\n public function __construct(\n private GetCodeAnalysisUseCase $useCase\n ) {\n }\n\n public function index(): void\n {\n $filters = array_filter([\n 'directory' => $this->getString('directory'),\n 'namespace' => $this->getString('namespace'),\n 'extension' => $this->getString('extension'),\n 'search' => $this->getString('search'),\n 'has_classes' => $this->getString('has_classes'),\n ], fn ($v) => $v !== '');\n\n $this->view('docs.code', [\n 'title' => 'Code-Analyse',\n 'stats' => $this->useCase->getStatistics(),\n 'files' => $this->useCase->execute($filters, 200, 0),\n 'filterOptions' => $this->useCase->getFilterOptions(),\n 'currentFilters' => $filters,\n ]);\n }\n\n public function show(string $id): void\n {\n $file = $this->useCase->findById((int) $id);\n\n if ($file === null) {\n $this->notFound('Datei nicht gefunden');\n }\n\n $classes = json_decode($file['classes'] ?? '[]', true);\n $functions = json_decode($file['functions'] ?? '[]', true);\n\n $this->view('docs.code-show', [\n 'title' => $file['file_name'],\n 'file' => $file,\n 'classes' => $classes,\n 'functions' => $functions,\n ]);\n }\n\n public function scan(): void\n {\n $this->requireCsrf();\n\n $result = $this->useCase->runScan('web');\n\n $this->json([\n 'success' => true,\n 'scan_id' => $result['scan_id'],\n 'files_scanned' => $result['files_scanned'],\n 'files_with_errors' => $result['files_with_errors'],\n 'total_classes' => $result['total_classes'],\n 'total_functions' => $result['total_functions'],\n 'duration_ms' => $result['duration_ms'],\n ]);\n }\n}\n",
"numLines": 74,
"startLine": 1,
"totalLines": 74
}
}
}