mirror of
https://github.com/getgrav/grav.git
synced 2025-12-05 23:39:58 +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)
|
public function doGet($key, $miss)
|
||||||
{
|
{
|
||||||
if (!array_key_exists($key, $this->cache)) {
|
return $this->cache[$key] ?? $miss;
|
||||||
return $miss;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->cache[$key];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function doSet($key, $value, $ttl)
|
public function doSet($key, $value, $ttl)
|
||||||
|
|||||||
Reference in New Issue
Block a user