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:----Xb+0EzC5Jgh8yiu9AtnpWkCm0ui5hD6WcKRqev6fOLpMibhJh+wkMrOFQnoxxB3pqwYBdar3FGCByaoFDBs7MRjQOFUjhg2jz44ok/JrriNE2BcG60ulThWcKpuvP+bzprH++9j0evGwJg33+DHRkesoOA9tC7BTb80KLVgGPAJt89fIMdmj2b94UGYIJK/JTPk+E6vVu9FuNyywPEZXByh/NGlzskNIuDRp6Ug7tm8bU1PHnR3MZkjakbOr/9QXgp7QudaX+7UQCbAJD5301Jj/plK4nuFdEiA5xL7GpHK+KCTQmkXQGPIb78sWwjzy8KjG+xGwgwpriw+pBraEaGlyrcHlKqEr/c7NqTWurxqV954t1r1ROY5l64HzgX4bOI13tb9NtTi2sCL4PkT0arlx4c1Wx3PJgoka8BxnzNnGf8H+kehVrforXlVdIG1SVt8FnLcmHsiB4GQipvxIb/ra0SwTsUfGADVUvhIhe+adk3rzoEzFsXCpAjhHQIxAWRLXSOLzIMZrGO+1qwQ13xRFP7n0DKE0Nap5bNVLCnL2eZci9RVhsRoSY+OgEj0iY4QBiEcd0qZigJrqXuT26BjFAx8EcBLLqmLG/NyXdaKukz9OHDE0yjSDmuQSR7IFWVcbyoiE7O+ZhAGE3K2ybr+B5ppcwnjIzak2a5Igo60=----ATTACHMENT:----ODg3NjU2ODM4ODM5ODg0OCA0MTI5NzU1MTgwOTIyMTcyIDMzNzg0MTY3MDM2MTQ3MTk=