{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/CodeAnalysis\/UseStatementExtractorTrait.php",
"offset": 115,
"limit": 35
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/Persistence\/TaxonomyRepository.php",
"content": "\n if ($parentId !== null) {\n $parent = $this->find($parentId);\n if ($parent !== null) {\n $depth = (int) $parent['depth'] + 1;\n $path = $parent['path'] . '\/' . $name;\n }\n }\n\n $stmt = $this->db->prepare(\n 'INSERT INTO taxonomy_terms (name, parent_id, depth, path, created_at)\n VALUES (:name, :parent, :depth, :path, NOW())'\n );\n $stmt->execute([\n 'name' => $name,\n 'parent' => $parentId,\n 'depth' => $depth,\n 'path' => $path,\n ]);\n\n return (int) $this->db->lastInsertId();\n }\n\n \/**\n * {@inheritDoc}\n *\/\n public function update(int $id, string $name, ?int $parentId = null): bool\n {\n $depth = 0;\n $path = $name;\n\n if ($parentId !== null) {\n $parent = $this->find($parentId);\n if ($parent !== null) {\n $depth = (int) $parent['depth'] + 1;\n $path = $parent['path'] . '\/' . $name;\n }\n }\n\n $stmt = $this->db->prepare(",
"numLines": 40,
"startLine": 78,
"totalLines": 163
}
}
}