Skip to content

Commit

Permalink
fix: static analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
fogrye committed Apr 13, 2024
1 parent 6d33ecf commit ea1570b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Reflection/CachedDocBlockFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -24,15 +25,15 @@
*/
class CachedDocBlockFactory
{
private DocBlockFactory $docBlockFactory;
private DocBlockFactoryInterface $docBlockFactory;
/** @var array<string, DocBlock> */
private array $docBlockArrayCache = [];
/** @var array<string, Context> */
private array $contextArrayCache = [];
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();
Expand Down

0 comments on commit ea1570b

Please sign in to comment.