Made BagOStuff::merge() take any callable
[lhc/web/wiklou.git] / includes / objectcache / EmptyBagOStuff.php
index 9595b83..0fc65d9 100644 (file)
@@ -33,7 +33,7 @@ class EmptyBagOStuff extends BagOStuff {
         * @param mixed $casToken [optional]
         * @return bool
         */
-       function get( $key, &$casToken = null ) {
+       public function get( $key, &$casToken = null ) {
                return false;
        }
 
@@ -43,7 +43,7 @@ class EmptyBagOStuff extends BagOStuff {
         * @param int $exp
         * @return bool
         */
-       function set( $key, $value, $exp = 0 ) {
+       public function set( $key, $value, $exp = 0 ) {
                return true;
        }
 
@@ -54,27 +54,26 @@ class EmptyBagOStuff extends BagOStuff {
         * @param int $exp
         * @return bool
         */
-       function cas( $casToken, $key, $value, $exp = 0 ) {
+       protected function cas( $casToken, $key, $value, $exp = 0 ) {
                return true;
        }
 
        /**
         * @param string $key
-        * @param int $time
         * @return bool
         */
-       function delete( $key, $time = 0 ) {
+       public function delete( $key ) {
                return true;
        }
 
        /**
         * @param string $key
-        * @param Closure $callback Callback method to be executed
+        * @param callable $callback Callback method to be executed
         * @param int $exptime Either an interval in seconds or a unix timestamp for expiry
         * @param int $attempts The amount of times to attempt a merge in case of failure
         * @return bool Success
         */
-       public function merge( $key, Closure $callback, $exptime = 0, $attempts = 10 ) {
+       public function merge( $key, $callback, $exptime = 0, $attempts = 10 ) {
                return true;
        }
 }