*/ private Iterator $fileSystemIterator; /** * @param Iterator $fileInfoIterator note: only SplFileInfo allowed in this iterator * * @throws InvalidFileInfo In case of iterator not contains only SplFileInfo. */ public function __construct( Iterator $fileInfoIterator, private Locator $astLocator, ) { foreach ($fileInfoIterator as $fileInfo) { if (! $fileInfo instanceof SplFileInfo) { throw InvalidFileInfo::fromNonSplFileInfo($fileInfo); } } $this->fileSystemIterator = $fileInfoIterator; } /** * @throws InvalidFileLocation */ private function getAggregatedSourceLocator(): AggregateSourceLocator { // @infection-ignore-all Coalesce: There's no difference, it's just optimization return $this->aggregateSourceLocator ?? $this->aggregateSourceLocator = new AggregateSourceLocator(array_values(array_filter(array_map( function (SplFileInfo $item): SingleFileSourceLocator|null { $realPath = $item->getRealPath(); assert(is_string($realPath) && $realPath !== ''); if (! ($item->isFile() && pathinfo($realPath, PATHINFO_EXTENSION) === 'php')) { return null; } return new SingleFileSourceLocator($realPath, $this->astLocator); }, iterator_to_array($this->fileSystemIterator), )))); } /** * {@inheritDoc} * * @throws InvalidFileLocation */ public function locateIdentifier(Reflector $reflector, Identifier $identifier): Reflection|null { return $this->getAggregatedSourceLocator()->locateIdentifier($reflector, $identifier); } /** * {@inheritDoc} * * @throws InvalidFileLocation */ public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType): array { return $this->getAggregatedSourceLocator()->locateIdentifiersByType($reflector, $identifierType); } } __halt_compiler();----SIGNATURE:----xqepSTPE+qoKjMlMNWuOBYAj3KE/Wbw82UNG6AFEy+Wto/eUWuvG0eWbtMA85XDQ5OsnrMef+IHs/b4tsdkd9GwBtBdhUBy1xqq20jbWG085hfvbV4Yjk5LwxhwQPq01DMh/lQC/zSgk6gIuAjzvHc/m9PBI3q2b2sECzvp+2/oauo+iPAEs/B/TVj6XFRt/sIqdtX0eJbTxdlbdjTkavzgRoeSQYXM+jMFoymTCgbQA0pkf6Cg+xC3N9OOO58q7LLHmW1nN/EOXuXPw/x+FI8PgOMwsDCfOhZu1sUDxzNQ4Tzx2uAehOaPnOi/qs9ulqLTTMnY3wJknbATOdlgXe55aCldOW37kxjZ0OGM2+P8eDXxiUOMqe9e3HIsX6QV8ZIuvPSaIrHIb7ledtXETVnCQyUNUzy/JWCwkatuU6oVIAjgV4yyaXK+03WvYKbd1dZYRPGm5mlOrIibZ1wrl1aIG6cHZKKcRc00QQVJDq3YRcVeiY9BxWEd1GZH6sl7R7Y2Zj0clIUS1BBcVQDZGCmytDxVGF4F/JcbPVvioNYbwa2xI1eykY4xJ5+jHq8bNf0T67PaahLSCb09yeQvZxGiEjnqrPsrR7LPhMiArqnhgNu6yhvMZLl58zSohma5ceLBL04Tqv0DfoQM3bEM1zd9n0+HKtrh/SJmz+NhV7wo=----ATTACHMENT:----NzkyODExNzk4MzIxMzQgOTg0MDYzMTMzNjE0NDUgNTY1MjYwODY2OTUwMjY4MA==