From ea1570b97cf8453ea601614b5139c3523c271d7a Mon Sep 17 00:00:00 2001 From: Yurii Kuvshynov <141632421+fogrye@users.noreply.github.com> Date: Sat, 13 Apr 2024 21:14:45 +0200 Subject: [PATCH] fix: static analysis --- src/Reflection/CachedDocBlockFactory.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Reflection/CachedDocBlockFactory.php b/src/Reflection/CachedDocBlockFactory.php index 70b5c6699c..978e1e344d 100644 --- a/src/Reflection/CachedDocBlockFactory.php +++ b/src/Reflection/CachedDocBlockFactory.php @@ -6,6 +6,7 @@ use phpDocumentor\Reflection\DocBlock; use phpDocumentor\Reflection\DocBlockFactory; +use phpDocumentor\Reflection\DocBlockFactoryInterface; use phpDocumentor\Reflection\Types\Context; use phpDocumentor\Reflection\Types\ContextFactory; use Psr\SimpleCache\CacheInterface; @@ -24,7 +25,7 @@ */ class CachedDocBlockFactory { - private DocBlockFactory $docBlockFactory; + private DocBlockFactoryInterface $docBlockFactory; /** @var array */ private array $docBlockArrayCache = []; /** @var array */ @@ -32,7 +33,7 @@ class CachedDocBlockFactory private ContextFactory $contextFactory; /** @param CacheInterface $cache The cache we fetch data from. Note this is a SAFE cache. It does not need to be purged. */ - public function __construct(private readonly CacheInterface $cache, DocBlockFactory|null $docBlockFactory = null) + public function __construct(private readonly CacheInterface $cache, DocBlockFactoryInterface|null $docBlockFactory = null) { $this->docBlockFactory = $docBlockFactory ?: DocBlockFactory::createInstance(); $this->contextFactory = new ContextFactory();