Merge "objectcache: fix some makeKey/makeGlobalKey IDEA warnings"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 20 Nov 2017 20:51:26 +0000 (20:51 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 20 Nov 2017 20:51:26 +0000 (20:51 +0000)
includes/libs/objectcache/BagOStuff.php
includes/libs/objectcache/CachedBagOStuff.php
includes/libs/objectcache/MultiWriteBagOStuff.php
includes/libs/objectcache/WANObjectCache.php

index d6cb340..8420f11 100644 (file)
@@ -747,10 +747,11 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface {
         * Make a global cache key.
         *
         * @since 1.27
-        * @param string $keys,... Key component (starting with a key collection name)
+        * @param string $class Key class
+        * @param string $component [optional] Key component (starting with a key collection name)
         * @return string Colon-delimited list of $keyspace followed by escaped components of $args
         */
-       public function makeGlobalKey() {
+       public function makeGlobalKey( $class, $component = null ) {
                return $this->makeKeyInternal( 'global', func_get_args() );
        }
 
@@ -758,10 +759,11 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface {
         * Make a cache key, scoped to this instance's keyspace.
         *
         * @since 1.27
-        * @param string $keys,... Key component (starting with a key collection name)
+        * @param string $class Key class
+        * @param string $component [optional] Key component (starting with a key collection name)
         * @return string Colon-delimited list of $keyspace followed by escaped components of $args
         */
-       public function makeKey() {
+       public function makeKey( $class, $component = null ) {
                return $this->makeKeyInternal( $this->keyspace, func_get_args() );
        }
 
index c85a82e..ae434c1 100644 (file)
@@ -86,11 +86,11 @@ class CachedBagOStuff extends HashBagOStuff {
                return $this->backend->deleteObjectsExpiringBefore( $date, $progressCallback );
        }
 
-       public function makeKey() {
+       public function makeKey( $class, $component = null ) {
                return call_user_func_array( [ $this->backend, __FUNCTION__ ], func_get_args() );
        }
 
-       public function makeGlobalKey() {
+       public function makeGlobalKey( $class, $component = null ) {
                return call_user_func_array( [ $this->backend, __FUNCTION__ ], func_get_args() );
        }
 
index 200ab79..643f318 100644 (file)
@@ -233,11 +233,11 @@ class MultiWriteBagOStuff extends BagOStuff {
                return $ret;
        }
 
-       public function makeKey() {
+       public function makeKey( $class, $component = null ) {
                return call_user_func_array( [ $this->caches[0], __FUNCTION__ ], func_get_args() );
        }
 
-       public function makeGlobalKey() {
+       public function makeGlobalKey( $class, $component = null ) {
                return call_user_func_array( [ $this->caches[0], __FUNCTION__ ], func_get_args() );
        }
 }
index f2048fe..51c4669 100644 (file)
@@ -1388,21 +1388,23 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
 
        /**
         * @see BagOStuff::makeKey()
-        * @param string $keys,... Key component (starting with a key collection name)
+        * @param string $class Key class
+        * @param string $component [optional] Key component (starting with a key collection name)
         * @return string Colon-delimited list of $keyspace followed by escaped components of $args
         * @since 1.27
         */
-       public function makeKey() {
+       public function makeKey( $class, $component = null ) {
                return call_user_func_array( [ $this->cache, __FUNCTION__ ], func_get_args() );
        }
 
        /**
         * @see BagOStuff::makeGlobalKey()
-        * @param string $keys,... Key component (starting with a key collection name)
+        * @param string $class Key class
+        * @param string $component [optional] Key component (starting with a key collection name)
         * @return string Colon-delimited list of $keyspace followed by escaped components of $args
         * @since 1.27
         */
-       public function makeGlobalKey() {
+       public function makeGlobalKey( $class, $component = null ) {
                return call_user_func_array( [ $this->cache, __FUNCTION__ ], func_get_args() );
        }