| Total Complexity | 4 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class CachedFqcnFinder implements FqcnFinderInterface |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var FqcnFinderInterface |
||
| 17 | */ |
||
| 18 | protected $fqcnFinder; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var CacheInterface |
||
| 22 | */ |
||
| 23 | private $cache; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | private $cacheKey; |
||
| 29 | |||
| 30 | public function __construct(FqcnFinderInterface $fqcnFinder, CacheInterface $cache, string $cacheKey) |
||
| 31 | { |
||
| 32 | if (empty($cacheKey)) { |
||
| 33 | throw new InvalidArgumentException('Invalid cache key.'); |
||
| 34 | } |
||
| 35 | |||
| 36 | $this->fqcnFinder = $fqcnFinder; |
||
| 37 | $this->cache = $cache; |
||
| 38 | $this->cacheKey = $cacheKey; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @inheritDoc |
||
| 43 | */ |
||
| 44 | public function find(): array |
||
| 54 | } |
||
| 55 | } |
||
| 56 |