diff --git a/src/NinjaMutex/Lock/MemcachedLock.php b/src/NinjaMutex/Lock/MemcachedLock.php index 0d14669..21c1ca1 100644 --- a/src/NinjaMutex/Lock/MemcachedLock.php +++ b/src/NinjaMutex/Lock/MemcachedLock.php @@ -39,7 +39,7 @@ class MemcachedLock extends LockAbstract implements LockExpirationInterface /** * @param Memcached $memcached */ - public function __construct(Memcached $memcached) + public function __construct($memcached) { parent::__construct(); diff --git a/tests/NinjaMutex/Mock/MockMemcached.php b/tests/NinjaMutex/Mock/MockMemcached.php index 1b02115..b6c02d7 100644 --- a/tests/NinjaMutex/Mock/MockMemcached.php +++ b/tests/NinjaMutex/Mock/MockMemcached.php @@ -9,14 +9,13 @@ */ namespace NinjaMutex\Mock; -use Memcached; /** * Mock memcached to mimic mutex functionality * * @author Kamil Dziedzic */ -class MockMemcached extends Memcached implements PermanentServiceInterface +class MockMemcached implements PermanentServiceInterface { /** * @var string[] @@ -40,7 +39,7 @@ public function __construct() * @param null $udf_flags * @return bool */ - public function add($key, $value, $expiration = null, $udf_flags = null) + public function add($key, $value, $expiration = null, &$udf_flags = null) { if (!$this->available) { return false; @@ -62,7 +61,7 @@ public function add($key, $value, $expiration = null, $udf_flags = null) * @param null $udf_flags * @return bool|mixed|string */ - public function get($key, $cache_cb = null, $cas_token = null, $udf_flags = null) + public function get($key, $cache_cb = null, &$cas_token = null, &$udf_flags = null) { if (!$this->available) { return false;