/** * Get an array of reflections found in some code. * * @param Reflector $reflector * @param LocatedSource $locatedSource * @param IdentifierType $identifierType * @return \BetterReflection\Reflection\Reflection[] * @throws Exception\ParseToAstFailure */ public function findReflectionsOfType(Reflector $reflector, LocatedSource $locatedSource, IdentifierType $identifierType) { try { return $this->findReflectionsInTree->__invoke($reflector, $this->parser->parse($locatedSource->getSource()), $identifierType, $locatedSource); } catch (\Exception $exception) { throw Exception\ParseToAstFailure::fromLocatedSource($locatedSource, $exception); } catch (\Throwable $exception) { throw Exception\ParseToAstFailure::fromLocatedSource($locatedSource, $exception); } }
/** * Get an array of reflections found in some code. * * @param Reflector $reflector * @param LocatedSource $locatedSource * @param IdentifierType $identifierType * @return \BetterReflection\Reflection\Reflection[] */ public function findReflectionsOfType(Reflector $reflector, LocatedSource $locatedSource, IdentifierType $identifierType) { return $this->findReflectionsInTree->__invoke($reflector, $this->parser->parse($locatedSource->getSource()), $identifierType, $locatedSource); }