$nodeType * @return TNode[] */ public function findByType(\PHPStan\PhpDocParser\Ast\Node $node, string $nodeType) : array { $foundNodes = []; $phpDocNodeTraverser = new \RectorPrefix20220425\Symplify\Astral\PhpDocParser\PhpDocNodeTraverser(); $phpDocNodeTraverser->traverseWithCallable($node, '', function (\PHPStan\PhpDocParser\Ast\Node $node) use(&$foundNodes, $nodeType) { if (!\is_a($node, $nodeType, \true)) { return null; } $foundNodes[] = $node; return null; }); return $foundNodes; } }