Remove inline if clauses

This commit is contained in:
2021-02-06 20:08:37 +01:00
parent 217e1fc86b
commit 8aa9d94acf
4 changed files with 69 additions and 23 deletions

View File

@ -48,7 +48,9 @@ final class MD_STD_CACHE {
*/
public static function serve_page_through_redis_cache(string $redisKey, int $expiry = 3600):string {
if (PHP_SAPI === 'cli') return '';
if (PHP_SAPI === 'cli') {
return '';
}
$redis = new Redis();
$redis->connect(self::$redis_host, self::$redis_port, 1, null, 0, 0, ['auth' => [MD_CONF::$redis_pw]]);