diff --git a/src/PublicSuffixList.php b/src/PublicSuffixList.php index e2fa1a9..360ecbf 100644 --- a/src/PublicSuffixList.php +++ b/src/PublicSuffixList.php @@ -224,16 +224,12 @@ protected function getCacheFileName($url) protected function readCachedPSL($url) { $cacheFile = $this->getCacheFileName($url); - if (file_exists($cacheFile)) { - $cachedTree = file_get_contents($cacheFile); - if (PHP_VERSION_ID < 70000) { - return unserialize($cachedTree); - } - return unserialize($cachedTree, ['allowed_classes' => false]); - } - return false; + return file_exists($cacheFile) + ? unserialize(file_get_contents($cacheFile), ['allowed_classes' => false]) + : false; } + /** * Cache the current Public Suffix List tree and associate with the specified source *