{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/Persistence\/ContractRepository.php",
"offset": 175,
"limit": 40
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/Persistence\/ContractRepository.php",
"content": " {\n $contract = $this->findById($id);\n if ($contract === null) {\n return ['success' => false, 'error' => 'Contract not found'];\n }\n\n \/\/ Vereinfachte Validierung - prüft ob YAML gültig ist\n $startTime = microtime(true);\n\n try {\n $data = yaml_parse($contract['yaml_content']);\n $result = 'passed';\n $critical = 0;\n $major = 0;\n $minor = 0;\n $violations = [];\n\n \/\/ Basis-Prüfungen\n if (!isset($data['contract'])) {\n $major++;\n $violations[] = ['type' => 'major', 'message' => 'Missing contract root element'];\n }\n\n if (!isset($data['contract']['name'])) {\n $minor++;\n $violations[] = ['type' => 'minor', 'message' => 'Missing contract name'];\n }\n\n if ($critical > 0) {\n $result = 'failed';\n }\n } catch (\\Exception $e) {\n $result = 'failed';\n $critical = 1;\n $major = 0;\n $minor = 0;\n $violations = [['type' => 'critical', 'message' => 'Invalid YAML: ' . $e->getMessage()]];\n }\n\n $durationMs = (int) ((microtime(true) - $startTime) * 1000);",
"numLines": 40,
"startLine": 175,
"totalLines": 273
}
}
}