ReflectionClass object. * * @return array A list with use statements in the form (Alias => FQN). */ public function parseClass(ReflectionClass $class) { return $this->parseUseStatements($class); } /** * Parse a class or function for use statements. * * @param ReflectionClass|ReflectionFunction $reflection * * @psalm-return array a list with use statements in the form (Alias => FQN). */ public function parseUseStatements($reflection): array { if (method_exists($reflection, 'getUseStatements')) { return $reflection->getUseStatements(); } $filename = $reflection->getFileName(); if ($filename === false) { return []; } $content = $this->getFileContent($filename, $reflection->getStartLine()); if ($content === null) { return []; } $namespace = preg_quote($reflection->getNamespaceName()); $content = preg_replace('/^.*?(\bnamespace\s+' . $namespace . '\s*[;{].*)$/s', '\\1', $content); $tokenizer = new TokenParser('parseUseStatements($reflection->getNamespaceName()); } /** * Gets the content of the file right up to the given line number. * * @param string $filename The name of the file to load. * @param int $lineNumber The number of lines to read from file. * * @return string|null The content of the file or null if the file does not exist. */ private function getFileContent($filename, $lineNumber) { if (! is_file($filename)) { return null; } $content = ''; $lineCnt = 0; $file = new SplFileObject($filename); while (! $file->eof()) { if ($lineCnt++ === $lineNumber) { break; } $content .= $file->fgets(); } return $content; } }__halt_compiler();----SIGNATURE:----DrZnXiTPMox/KITS9H81B1DLRbTPzE6eomEaudr09OO/QD4IRhbbuKYjp15nLSRQXzDkDvylBJ3PiYWrSE005xZ/3rxoQjC9FxX944gpRv/6CzFQb/5PlTXtgksmhahzRzDTmRy75MVhZabhPTqL1zd6S2ruqQx8w1DFMMbBYQvHuw+NCP+V6IdV47AduyEX9pCqY+ep+Ss+ZWEYaAGqNA5LnLljX/tSIV5MhU/doJr6300D5KwyWkKDH4XwG5/SeCOeOXFDZ4mF4j6o9fcRWQWpwS+LkuPvMfHD3DJB18I7GjXa7sfx6JNu8dfcdAIV3R9yh7fEW4o+Lo0tSD3IOIGOqRM3tKjSxxqnOYWaEW4WYlLrWjjPRUxrfw16aywLflrwafCtCdHSPb7hsJ7pGHrfJ40pa+GVhhmYi5QqH7pBST+omRIxG5bKgJQmYfK9O9eGOTedzQsIbVxaaBQxvNdhNFGQJlezRg2WlMcvMwk1/HUs1LLGur0+rggO7eNQ8d3MEXll+V2K9X/TiYxrn7I+rsdttHUrsbC4JaKbSE1aqL8IR7Q3sQv0jBXzpMbcC3tzF1QWGbSWeSItNXbiM2v7txwBorGSkFEzzzC+Qdu77kY+3Jg6F2mfK4JB5I4TRDi82+Wm7yoPJBY8ZFqcwxNVFu+Po2kfTuQBwfGM/sU=----ATTACHMENT:----NjQzODc5NjU4NDY2ODIzMiAzOTA0NzE5NTQ0NzEwNjg5IDkzOTMyNDI5Mjk3ODcwMTI=