Skip to content

Commit

Permalink
fix(CacheManager): invalid return declaration for getCache
Browse files Browse the repository at this point in the history
fixes "Type mixed can only be used as a standalone type" fatal error.
  • Loading branch information
CarlosEGuerraSilva committed Jul 23, 2024
1 parent 61207bc commit 3d3db29
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions App/Core/Server/CacheManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ public static function isCacheValid($key): bool
* Gets the cache data for the specified key.
*
* @param string $key The cache key.
* @return mixed|false The cache data if the cache is valid, false otherwise.
*/
public static function getCache($key): mixed|false {
public static function getCache($key) {
if (self::isCacheValid($key)) {
$cacheFile = Configuration::CACHE_FOLDER . md5($key) . Configuration::CACHE_FILE_EXTENSION;
$data = unserialize(file_get_contents($cacheFile));
Expand Down

0 comments on commit 3d3db29

Please sign in to comment.