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.
2 parents eb40fea + ac4322a commit 4dc0f95Copy full SHA for 4dc0f95
lib/Phpfastcache/Drivers/Memcached/Driver.php
@@ -194,9 +194,9 @@ protected function driverClear(): bool
194
public function getStats(): DriverStatistic
195
{
196
$stats = current($this->instance->getStats());
197
- $stats['uptime'] = (isset($stats['uptime']) ? $stats['uptime'] : 0);
198
- $stats['version'] = (isset($stats['version']) ? $stats['version'] : $this->instance->getVersion());
199
- $stats['bytes'] = (isset($stats['bytes']) ? $stats['version'] : 0);
+ $stats['uptime'] = $stats['uptime'] ?? 0;
+ $stats['version'] = $stats['version'] ?? $this->instance->getVersion();
+ $stats['bytes'] = $stats['bytes'] ?? 0;
200
201
$date = (new \DateTime())->setTimestamp(\time() - $stats['uptime']);
202
0 commit comments