mirror of
https://github.com/getgrav/grav.git
synced 2025-12-05 15:29:57 +01:00
Use Null Coalesce Operator (#2466)
This commit is contained in:
committed by
Andy Miller
parent
9342981d8c
commit
be8eb63944
@@ -27,11 +27,7 @@ class MemoryCache extends AbstractCache
|
||||
|
||||
public function doGet($key, $miss)
|
||||
{
|
||||
if (!array_key_exists($key, $this->cache)) {
|
||||
return $miss;
|
||||
}
|
||||
|
||||
return $this->cache[$key];
|
||||
return $this->cache[$key] ?? $miss;
|
||||
}
|
||||
|
||||
public function doSet($key, $value, $ttl)
|
||||
|
||||
Reference in New Issue
Block a user