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:----WI2G4RF7LxnRWKQ/ZBj1BIFrALaCCwJy2VJxUpnBFazgOqlRZ+U+B/BLNy9coCuSuOBQDsR30FhLGoGwuqydDppkq4yKv5CoFqWEGkv03oJ8fvx3ErNFzJa+AjCm3gcHjDZb1W5EMOw9pSmRNaTVIQ/Mblsir+lygYR28m5837tf7kDBPbbiId8eantByiMeO2WDQxqBBCe07DmqXq3fc0+zQmGoa7AzBtZi+6teEfZUcFNYlOUPVJBM5k7QbZcrp7jpdL/rTIypRPV4sek1lniM0cjJ/LXiiUQc+Nq8yOoALjo0N6jZ7IGWvMJblQprnNpRrotT9I+BZmv1R7SHU9uMKGOt0aDbwFIqwJyW2W6eajh4pTSt+mr6Yimc24CaFtgImvNCLxxK2hEe5A/J32OUOQ2R35+q2z0xTR29FmMYST3Y9pjiw7BEbjjG1s56C3OQBo5OP5sDKM9/X4QXMPbM/gbqDh2bnFTbDKrY2fekZ7h5vvrHfC5qIIx7J1LT+sL5U1I3Ygm2hRXR+NOH0Ugb5ybQzNDaUETnMJoR67bsD6wIoqMm1QpyiWVgOe/bxmmw/56T8IpH+x+EP2/E9v8q5zpam8+j361C9IUwkhc3Rgf5bZJIQAktUSyz11VnODtytyKcGKv4t8yBEU5f6jHBSBn3A5LG4MC1bRgzUj4=----ATTACHMENT:----ODk0MjE1NTM5NjQzMzc5MCAxMzA5NTEzMjExMTQ1NTUyIDg5OTc3MjE1NjQyNDEwNjM=