Skip to content

How to implement DocBlockFactoryInterface? #337

Closed
@chornobils

Description

@chornobils

hi, I want to implement interface \phpDocumentor\Reflection\DocBlockFactoryInterface , but createInstace() return type does not allow me to do it:

/**
     * Factory method for easy instantiation.
     *
     * @param array<string, class-string<Tag>> $additionalTags
     */
    public static function createInstance(array $additionalTags = []) : DocBlockFactory;

I could set return type to DocBlockFactory, but this become meaningless, because I want to return my new DocBlockFactoryInterface instance. Or I trying to do it wrongly?

version 5.2.2

Thanks

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions