ReflectionDocBlock
ReflectionDocBlock copied to clipboard
How to implement DocBlockFactoryInterface?
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
Or I trying to do it wrongly?
nope, it's bug - master
not fully tested by static analyzers.
I recently changed this, it will be part of the new release. Which I expect in a few weeks.
fixed in https://github.com/phpDocumentor/ReflectionDocBlock/pull/343