We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 640cb82 commit 81e9841Copy full SHA for 81e9841
lib/Phpfastcache/Drivers/Memcached/Driver.php
@@ -68,9 +68,9 @@ public function driverCheck(): bool
68
public function getStats(): DriverStatistic
69
{
70
$stats = current($this->instance->getStats());
71
- $stats['uptime'] = (isset($stats['uptime']) ? $stats['uptime'] : 0);
72
- $stats['version'] = (isset($stats['version']) ? $stats['version'] : $this->instance->getVersion());
73
- $stats['bytes'] = (isset($stats['bytes']) ? $stats['version'] : 0);
+ $stats['uptime'] = $stats['uptime'] ?? 0;
+ $stats['bytes'] = $stats['bytes'] ?? 0;
+ $stats['version'] = $stats['version'] ?? $this->instance->getVersion();
74
75
$date = (new DateTime())->setTimestamp(time() - $stats['uptime']);
76
0 commit comments