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:----Tr8yqngN68DNGc+EyHFKwGfRWZo+1aV0EHvLLv72JsxyYB6vhWdhUWGe2uEh8QACyY6meTmqLx7YvZM4jU7f0Cs4HGP4HZ6jcZzI6Kg0YASIF79Y1Xe/OklguHmMvz0Yct7QvFhsJuoqcoY0PvbzG+cdsaf13nNFbAjjGLLMtWyM6W8SdnOZDVzfy+6qH/W2A5jINXrckzrpFCKcZPbLcIGQDzoOc+XPtIpCG3/yk/Bj5ZkSkoWPPWWkBWeKHKyzz2rfu/WhxzRldGhLf29vRB6qhaRBQCQc7Gx71xGcZG/RZQHHwU+QzO0pVfEkaxzF2+gbwbmr4hNp/boMdTFj0D0KgX4welSXWh8iD43E6hcErwHi5xp87sFmQh/ylaDKpvzplwXHWwAhPxt1dEErOv3lWx2U2DV4r8CKYhwIEeOoId8auhY8T8+6pIvwwID02ntBOguOpQGYzd4IYIemfXd9yCsFMC8mo1ZzgVBeB2S8QNbJq0XqBGhWrzp61B1VnbFCcqZswt+6f4vdaYyIuu2CmY1HIILRKCEwJtTieAK+4QFE3133Ixgng2OHnB4dZKek1zrzrB7/H6yM9IKbCrdHQASd1JtylPVwRwKHa7Dg+ye3xSGPVIs2QRSemdHRtBFB+RlsyV24FKnDVKqQGm5Q+ppZLq5Ntry57L4/yKQ=----ATTACHMENT:----MzIxNzE2OTQ4MTYwMjMzNSA4NDkwMDU0MzM2NDg5NjUwIDU0Njg2ODE1MzExOTgxNTU=