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:----fu4SoMJFevtZ4TKIldnMEWTty/ILhx68onagckrVw75eodMemcHwLbmyzxCVFMrnVmz+ZTT51wNfN1kYRgo+Z48dAZ6Nu+cUfZZkogO2KHkwrOvsH0DaXDylJpHBDH6LH17wYbRk60+P/eprfEi+ZnB31trkZ/a+Nl6b2ZCPjzXJw1QcnAWu+GYC7VqdGeT6VO+FvQ43CKUCZZxn3TTQT/+gtLTAGNWY8imaCnhEx285bi4giJH86REDcx4IDkaBlt6L2esg26KvO46Q7vEp2+rNWfshwN63VOVK4rIUsI8NnUmbPF+I0/udByDal/Um1yrkUAmr3pXu6D1B3dIdSZcgG03sRMsYSTbpWfChMH1J+1EmQ2GN33eFMYqI/7jQ9IFgFbif34cu9G0lijr+bY//EtLsjrfapxVi6KqJBnhRdghxBBWjCuYphR5t6xYQN3dskuVN1eHrQcv/jR+DiIfPGiQ9OROyQMwvvEEL3mGoSDi7ij7VhxJX1G1PpGMo/QttxoyDJxSP128IepiPGGMV1povsi3XYwWDX06u8NDbVKWjCQmsQV6cNbvSh6ecs4Fg42/ybQC2eY67R/n0uxlTH5RJnbtpKUduPl+puWvsO1e9PDkwuGa+7v6cU6w/x7lu/5djjWyATzmDun9tTnhCeAvIqMsY0+fLdWLAAq8=----ATTACHMENT:----NTAzNzIzNDM1NzAyOTUzIDU3MTc5OTIyOTM4MTc4MzMgMjU3MzUyNzc5NTQwMzM5OQ==