public static function createInstance(array $additionalTags = []): self
    {
        $fqsenResolver = new FqsenResolver();
        $tagFactory = new StandardTagFactory($fqsenResolver);
        $descriptionFactory = new DescriptionFactory($tagFactory);

        $tagFactory->addService($descriptionFactory);
        $tagFactory->addService(new TypeResolver($fqsenResolver));

        $docBlockFactory = new self($descriptionFactory, $tagFactory);
        foreach ($additionalTags as $tagName => $tagHandler) {
            $docBlockFactory->registerTagHandler($tagName, $tagHandler);
        }

        return $docBlockFactory;
    }
public static function createInstance(array $additionalTags = []): self
    {
        $fqsenResolver = new FqsenResolver();
        $tagFactory = new StandardTagFactory($fqsenResolver);
        $descriptionFactory = new DescriptionFactory($tagFactory);

        $tagFactory->addService($descriptionFactory);
        $tagFactory->addService(new TypeResolver($fqsenResolver));

        $docBlockFactory = new self($descriptionFactory, $tagFactory);
        foreach ($additionalTags as $tagName => $tagHandler) {
            $docBlockFactory->registerTagHandler($tagName, $tagHandler);
        }

        return $docBlockFactory;
    }
public static function createInstance ( array $ additionalTags = [ ] ) : self { $ fqsenResolver = new FqsenResolver ( ) ; $ tagFactory = new StandardTagFactory ( $ fqsenResolver ) ; $ descriptionFactory = new DescriptionFactory ( $ tagFactory ) ; $ tagFactory -> addService ( $ descriptionFactory ) ; $ tagFactory -> addService ( new TypeResolver ( $ fqsenResolver ) ) ; $ docBlockFactory = new self ( $ descriptionFactory , $ tagFactory ) ; foreach ( $ additionalTags as $ tagName => $ tagHandler ) { $ docBlockFactory -> registerTagHandler ( $ tagName , $ tagHandler ) ; } return $ docBlockFactory ; }
Factory method for easy instantiation.

@param string[] $additionalTags
Factory method for easy instantiation .