Skip to content

Commit

Permalink
Let's try to trick this broken memcached extension
Browse files Browse the repository at this point in the history
  • Loading branch information
arvenil committed Jun 12, 2015
1 parent 97d4b56 commit 4d474f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/NinjaMutex/Lock/MemcachedLock.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class MemcachedLock extends LockAbstract implements LockExpirationInterface
/**
* @param Memcached $memcached
*/
public function __construct(Memcached $memcached)
public function __construct($memcached)
{
parent::__construct();

Expand Down
7 changes: 3 additions & 4 deletions tests/NinjaMutex/Mock/MockMemcached.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@
*/
namespace NinjaMutex\Mock;

use Memcached;

/**
* Mock memcached to mimic mutex functionality
*
* @author Kamil Dziedzic <[email protected]>
*/
class MockMemcached extends Memcached implements PermanentServiceInterface
class MockMemcached implements PermanentServiceInterface
{
/**
* @var string[]
Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 4d474f9

Please sign in to comment.