Merge "Fix class name handling in DeprecationHelper"
[lhc/web/wiklou.git] / includes / libs / objectcache / MemcachedPeclBagOStuff.php
index 489f001..db94503 100644 (file)
@@ -138,8 +138,11 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
                return $params;
        }
 
+       /**
+        * @suppress PhanTypeNonVarPassByRef
+        */
        protected function doGet( $key, $flags = 0, &$casToken = null ) {
-               $this->debugLog( "get($key)" );
+               $this->debug( "get($key)" );
                if ( defined( Memcached::class . '::GET_EXTENDED' ) ) { // v3.0.0
                        $flags = Memcached::GET_EXTENDED;
                        $res = $this->client->get( $this->validateKeyEncoding( $key ), null, $flags );
@@ -158,7 +161,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
        }
 
        public function set( $key, $value, $exptime = 0, $flags = 0 ) {
-               $this->debugLog( "set($key)" );
+               $this->debug( "set($key)" );
                $result = parent::set( $key, $value, $exptime, $flags = 0 );
                if ( $result === false && $this->client->getResultCode() === Memcached::RES_NOTSTORED ) {
                        // "Not stored" is always used as the mcrouter response with AllAsyncRoute
@@ -168,12 +171,12 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
        }
 
        protected function cas( $casToken, $key, $value, $exptime = 0, $flags = 0 ) {
-               $this->debugLog( "cas($key)" );
+               $this->debug( "cas($key)" );
                return $this->checkResult( $key, parent::cas( $casToken, $key, $value, $exptime, $flags ) );
        }
 
        public function delete( $key, $flags = 0 ) {
-               $this->debugLog( "delete($key)" );
+               $this->debug( "delete($key)" );
                $result = parent::delete( $key );
                if ( $result === false && $this->client->getResultCode() === Memcached::RES_NOTFOUND ) {
                        // "Not found" is counted as success in our interface
@@ -183,18 +186,18 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
        }
 
        public function add( $key, $value, $exptime = 0, $flags = 0 ) {
-               $this->debugLog( "add($key)" );
+               $this->debug( "add($key)" );
                return $this->checkResult( $key, parent::add( $key, $value, $exptime ) );
        }
 
        public function incr( $key, $value = 1 ) {
-               $this->debugLog( "incr($key)" );
+               $this->debug( "incr($key)" );
                $result = $this->client->increment( $key, $value );
                return $this->checkResult( $key, $result );
        }
 
        public function decr( $key, $value = 1 ) {
-               $this->debugLog( "decr($key)" );
+               $this->debug( "decr($key)" );
                $result = $this->client->decrement( $key, $value );
                return $this->checkResult( $key, $result );
        }
@@ -220,7 +223,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
                        case Memcached::RES_DATA_EXISTS:
                        case Memcached::RES_NOTSTORED:
                        case Memcached::RES_NOTFOUND:
-                               $this->debugLog( "result: " . $this->client->getResultMessage() );
+                               $this->debug( "result: " . $this->client->getResultMessage() );
                                break;
                        default:
                                $msg = $this->client->getResultMessage();
@@ -240,7 +243,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
        }
 
        public function getMulti( array $keys, $flags = 0 ) {
-               $this->debugLog( 'getMulti(' . implode( ', ', $keys ) . ')' );
+               $this->debug( 'getMulti(' . implode( ', ', $keys ) . ')' );
                foreach ( $keys as $key ) {
                        $this->validateKeyEncoding( $key );
                }
@@ -249,7 +252,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
        }
 
        public function setMulti( array $data, $exptime = 0, $flags = 0 ) {
-               $this->debugLog( 'setMulti(' . implode( ', ', array_keys( $data ) ) . ')' );
+               $this->debug( 'setMulti(' . implode( ', ', array_keys( $data ) ) . ')' );
                foreach ( array_keys( $data ) as $key ) {
                        $this->validateKeyEncoding( $key );
                }
@@ -258,7 +261,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
        }
 
        public function changeTTL( $key, $expiry = 0, $flags = 0 ) {
-               $this->debugLog( "touch($key)" );
+               $this->debug( "touch($key)" );
                $result = $this->client->touch( $key, $expiry );
                return $this->checkResult( $key, $result );
        }