/** * @param string $key * * @throws CachedValueNotFound * * @return mixed */ public function getCachedValue(string $key) { if (false === array_key_exists($key, $this->cache)) { throw CachedValueNotFound::create($key); } return $this->cache[$key]; }