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:----rw1LhgzqwAFI72cV447RrfoZZVGXzIPIEei2vw5agor0+l7Wp+cFJmwoC8K1VSxc2NxOZNV8CdYzMkRvWny9/0AFJSwy+jkZRja5LxqnBHJdnEt3Z1oJ6sEJ0GbP5AsLruMsCadYuVY35CUJCtRRyYr/tFuZfSfaxES/JjQaH1OT9rOGWT5MCBSK8QpVmBRdzzOalFG0B9DcadY8orF9otO4RhU1kyTDt6XryRdKNlgzUUjPPI3MBx1Da5kEvbINEpI1B/w8h+7bcROyAuQHL+QRx13W19Xz28gYc9YhaMn9rNIFzHBIYNy88p5r+Uz8sUKN8eoVGrco2BVfpxD9hgTWETBrhKMUhN7eimRh2lKxoVGJLKiUHhKvHFdMfhlacDUNA7GRwuLtXpp9n+U1t3AEU6T3/7p7IUDTdFm4WTybM/6uZ846RiAcsrZIyE/k43tR/c9MbGI9c0wsrYDv2lYb2tL6+yxvq26oh3LFMj8YgyOAl6DfACU3tQEP9Lu8/5rpXhRD7dn/CzFUYLAE9MadeowwFdZ/YYARRzNZmFiFFXC+QsGtF0vDtvVS0SwU0nZvTxRhJEsKwC89SytMuxzBPPlT5W2GZm03I6WkXU23L6tz5j/t15ul4P3MqyEUlZbkMS7vqR1aM7HZ9CcIvgW+ByuHCaBIpOGCw0hbsgI=----ATTACHMENT:----OTI1NDY1MDY1MDU0Mjg0MSAzODQ5NDI1NjYzMDYzOTIwIDc5ODAwMzA1NjExODM4ODk=