Skip to content
Snippets Groups Projects
Unverified Commit 8594ad75 authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo
Browse files

Use ::class instead of hardcoded strings with class names.

parent 5d2ea72f
No related branches found
No related tags found
No related merge requests found
......@@ -167,7 +167,7 @@ class Memcache
// store this object to all groups of memcache servers
foreach (self::getMemcacheServers() as $server) {
if (self::$extension === '\memcached') {
if (self::$extension === \Memcached::class) {
$server->set($key, $savedInfoSerialized, $expire);
} else {
$server->set($key, $savedInfoSerialized, 0, $expire);
......@@ -312,10 +312,10 @@ class Memcache
{
if (class_exists(\Memcached::class)) {
$memcache = new \Memcached();
self::$extension = strtolower(\Memcached::class);
self::$extension = \Memcached::class;
} elseif (class_exists(\Memcache::class)) {
$memcache = new \Memcache();
self::$extension = strtolower(\Memcache::class);
self::$extension = \Memcache::class;
} else {
throw new \Exception(
'Missing Memcached implementation. You must install either the Memcache or Memcached extension.'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment