{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Controller\/Api\/TaskController.php",
"offset": 149,
"limit": 40
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Controller\/Api\/TaskController.php",
"content": " }\n\n public function update(string $id): void\n {\n try {\n $input = $this->getJsonInput();\n $task = $this->getTasksUseCase->findById((int) $id);\n\n if ($task === null) {\n $this->json(['success' => false, 'error' => 'Task not found'], 404);\n\n return;\n }\n\n if (isset($input['title']) || isset($input['description'])) {\n $task->updateDetails(\n $input['title'] ?? $task->getTitle(),\n $input['description'] ?? $task->getDescription()\n );\n }\n if (isset($input['type'])) {\n $task->changeType(\\Domain\\ValueObject\\TaskType::from($input['type']));\n }\n if (isset($input['due_date'])) {\n $task->setDueDateTo(new \\DateTimeImmutable($input['due_date']));\n }\n\n $this->taskRepository->update($task);\n\n $this->json([\n 'success' => true,\n 'data' => $task->toArray(),\n ]);\n } catch (\\InvalidArgumentException $e) {\n $this->json(['success' => false, 'error' => $e->getMessage()], 400);\n } catch (\\Exception $e) {\n $this->jsonError($e->getMessage());\n }\n }\n",
"numLines": 40,
"startLine": 149,
"totalLines": 375
}
}
}