{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/CodeAnalysis\/PhpFileParser.php",
"offset": 660,
"limit": 105
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/CodeAnalysis\/PhpFileParser.php",
"content": " private function isBuiltInType(string $type): bool\n {\n $builtIn = [\n 'int', 'float', 'bool', 'string', 'array', 'object', 'callable',\n 'iterable', 'void', 'null', 'mixed', 'never', 'true', 'false',\n 'self', 'static', 'parent',\n ];\n\n return in_array(strtolower($type), $builtIn, true);\n }\n\n \/**\n * Extract a type name starting from a position.\n *\n * @param array<mixed> $tokens\n *\/\n private function extractTypeName(array $tokens, int $startIndex): ?string\n {\n $count = count($tokens);\n\n for ($i = $startIndex; $i < $count; $i++) {\n $token = $tokens[$i];\n\n if (!is_array($token)) {\n continue;\n }\n\n if ($token[0] === T_WHITESPACE) {\n continue;\n }\n\n if (in_array($token[0], [T_STRING, T_NAME_QUALIFIED, T_NAME_FULLY_QUALIFIED], true)) {\n return $token[1];\n }\n\n \/\/ Stop at unexpected token\n break;\n }\n\n return null;\n }\n\n \/**\n * Find next T_STRING token and return its value.\n *\n * @param array<mixed> $tokens\n *\/\n private function findNextString(array $tokens, int $startIndex): ?string\n {\n $count = count($tokens);\n\n for ($i = $startIndex + 1; $i < $count; $i++) {\n if (!is_array($tokens[$i])) {\n if ($tokens[$i] === '(') {\n return null; \/\/ Anonymous function\n }\n\n continue;\n }\n\n if ($tokens[$i][0] === T_STRING) {\n return $tokens[$i][1];\n }\n\n if ($tokens[$i][0] !== T_WHITESPACE) {\n break;\n }\n }\n\n return null;\n }\n\n \/**\n * @param array<mixed> $tokens\n *\/\n private function findPrevNonWhitespace(array $tokens, int $index): ?int\n {\n for ($i = $index - 1; $i >= 0; $i--) {\n if (!is_array($tokens[$i]) || $tokens[$i][0] !== T_WHITESPACE) {\n return $i;\n }\n }\n\n return null;\n }\n\n \/**\n * @param array<mixed> $tokens\n *\/\n private function findNextNonWhitespace(array $tokens, int $index): ?int\n {\n $count = count($tokens);\n\n for ($i = $index + 1; $i < $count; $i++) {\n if (!is_array($tokens[$i]) || $tokens[$i][0] !== T_WHITESPACE) {\n return $i;\n }\n }\n\n return null;\n }\n}\n",
"numLines": 103,
"startLine": 660,
"totalLines": 762
}
}
}