Remove trailing whitespace

This commit is contained in:
Kijin Sung 2023-01-17 20:57:44 +09:00
parent 3b0030e82b
commit a9f72a5cd2
81 changed files with 2455 additions and 2455 deletions

View file

@ -11,18 +11,18 @@ class Memcached implements \Rhymix\Framework\Drivers\CacheInterface
* Set this flag to false to disable cache prefixes.
*/
public $prefix = true;
/**
* The singleton instance is stored here.
*/
protected static $_instance = null;
/**
* The Memcached connection is stored here.
*/
protected $_conn = null;
protected $_ext = null;
/**
* Direct invocation of the constructor is not permitted.
*/
@ -42,7 +42,7 @@ class Memcached implements \Rhymix\Framework\Drivers\CacheInterface
{
return;
}
foreach ($config as $url)
{
if (starts_with('/', $url))
@ -59,10 +59,10 @@ class Memcached implements \Rhymix\Framework\Drivers\CacheInterface
}
}
}
/**
* Create a new instance of the current cache driver, using the given settings.
*
*
* @param array $config
* @return void
*/
@ -74,24 +74,24 @@ class Memcached implements \Rhymix\Framework\Drivers\CacheInterface
}
return self::$_instance;
}
/**
* Check if the current cache driver is supported on this server.
*
*
* This method returns true on success and false on failure.
*
*
* @return bool
*/
public static function isSupported()
{
return class_exists('\\Memcached', false) || class_exists('\\Memcache', false);
}
/**
* Validate cache settings.
*
*
* This method returns true on success and false on failure.
*
*
* @param mixed $config
* @return bool
*/
@ -111,7 +111,7 @@ class Memcached implements \Rhymix\Framework\Drivers\CacheInterface
{
return false;
}
foreach ($config as $url)
{
if (starts_with('/', $url))
@ -127,7 +127,7 @@ class Memcached implements \Rhymix\Framework\Drivers\CacheInterface
}
}
}
for ($i = 0; $i < 5; $i++)
{
$key = 'rhymix:test:' . md5($i);
@ -136,12 +136,12 @@ class Memcached implements \Rhymix\Framework\Drivers\CacheInterface
}
return true;
}
/**
* Get the value of a key.
*
*
* This method returns null if the key was not found.
*
*
* @param string $key
* @return mixed
*/
@ -157,13 +157,13 @@ class Memcached implements \Rhymix\Framework\Drivers\CacheInterface
return $value;
}
}
/**
* Set the value to a key.
*
*
* This method returns true on success and false on failure.
* $ttl is measured in seconds. If it is zero, the key should not expire.
*
*
* @param string $key
* @param mixed $value
* @param int $ttl
@ -181,13 +181,13 @@ class Memcached implements \Rhymix\Framework\Drivers\CacheInterface
return $this->_conn->set($key, $value, MEMCACHE_COMPRESSED, $ttl);
}
}
/**
* Delete a key.
*
*
* This method returns true on success and false on failure.
* If the key does not exist, it should return false.
*
*
* @param string $key
* @return bool
*/
@ -195,12 +195,12 @@ class Memcached implements \Rhymix\Framework\Drivers\CacheInterface
{
return $this->_conn->delete($key);
}
/**
* Check if a key exists.
*
*
* This method returns true on success and false on failure.
*
*
* @param string $key
* @return bool
*/
@ -208,13 +208,13 @@ class Memcached implements \Rhymix\Framework\Drivers\CacheInterface
{
return $this->_conn->get($key) !== false;
}
/**
* Increase the value of a key by $amount.
*
*
* If the key does not exist, this method assumes that the current value is zero.
* This method returns the new value.
*
*
* @param string $key
* @param int $amount
* @return int
@ -229,13 +229,13 @@ class Memcached implements \Rhymix\Framework\Drivers\CacheInterface
}
return $result;
}
/**
* Decrease the value of a key by $amount.
*
*
* If the key does not exist, this method assumes that the current value is zero.
* This method returns the new value.
*
*
* @param string $key
* @param int $amount
* @return int
@ -250,12 +250,12 @@ class Memcached implements \Rhymix\Framework\Drivers\CacheInterface
}
return $result;
}
/**
* Clear all keys from the cache.
*
*
* This method returns true on success and false on failure.
*
*
* @return bool
*/
public function clear()