jenkins-bot has submitted this change and it was merged.
Change subject: Remove unused local variable and update documentation
......................................................................
Remove unused local variable and update documentation
Change-Id: I5a737511f8c0234451fba766b529594e6244fb95
---
M includes/clientpool/RedisConnectionPool.php
1 file changed, 19 insertions(+), 21 deletions(-)
Approvals:
Parent5446: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/clientpool/RedisConnectionPool.php
b/includes/clientpool/RedisConnectionPool.php
index 987ad3f..f4a2fa6 100644
--- a/includes/clientpool/RedisConnectionPool.php
+++ b/includes/clientpool/RedisConnectionPool.php
@@ -52,15 +52,15 @@
protected $serializer;
/** @} */
- /** @var integer Current idle pool size */
+ /** @var int Current idle pool size */
protected $idlePoolSize = 0;
- /** @var Array (server name => ((connection info array),...) */
+ /** @var array (server name => ((connection info array),...) */
protected $connections = array();
- /** @var Array (server name => UNIX timestamp) */
+ /** @var array (server name => UNIX timestamp) */
protected $downServers = array();
- /** @var Array (pool ID => RedisConnectionPool) */
+ /** @var array (pool ID => RedisConnectionPool) */
protected static $instances = array();
/** integer; seconds to cache servers as "down". */
@@ -68,6 +68,7 @@
/**
* @param array $options
+ * @throws MWException
*/
protected function __construct( array $options ) {
if ( !class_exists( 'Redis' ) ) {
@@ -89,8 +90,8 @@
}
/**
- * @param $options Array
- * @return Array
+ * @param array $options
+ * @return array
*/
protected static function applyDefaultConfig( array $options ) {
if ( !isset( $options['connectTimeout'] ) ) {
@@ -107,7 +108,7 @@
}
/**
- * @param $options Array
+ * @param array $options
* $options include:
* - connectTimeout : The timeout for new connections, in seconds.
* Optional, default is 1 second.
@@ -227,9 +228,9 @@
/**
* Mark a connection to a server as free to return to the pool
*
- * @param $server string
- * @param $conn Redis
- * @return boolean
+ * @param string $server
+ * @param Redis $conn
+ * @return bool
*/
public function freeConnection( $server, Redis $conn ) {
$found = false;
@@ -249,15 +250,13 @@
/**
* Close any extra idle connections if there are more than the limit
- *
- * @return void
*/
protected function closeExcessIdleConections() {
if ( $this->idlePoolSize <= count( $this->connections ) ) {
return; // nothing to do (no more connections than
servers)
}
- foreach ( $this->connections as $server => &$serverConnections
) {
+ foreach ( $this->connections as &$serverConnections ) {
foreach ( $serverConnections as $key => &$connection ) {
if ( $connection['free'] ) {
unset( $serverConnections[$key] );
@@ -275,10 +274,9 @@
* not. The safest response for us is to explicitly destroy the
connection
* object and let it be reopened during the next request.
*
- * @param $server string
- * @param $cref RedisConnRef
- * @param $e RedisException
- * @return void
+ * @param string $server
+ * @param RedisConnRef $cref
+ * @param RedisException $e
*/
public function handleException( $server, RedisConnRef $cref,
RedisException $e ) {
wfDebugLog( 'redis', "Redis exception on server $server: " .
$e->getMessage() . "\n" );
@@ -338,9 +336,9 @@
protected $lastError; // string
/**
- * @param $pool RedisConnectionPool
- * @param $server string
- * @param $conn Redis
+ * @param RedisConnectionPool $pool
+ * @param string $server
+ * @param Redis $conn
*/
public function __construct( RedisConnectionPool $pool, $server, Redis
$conn ) {
$this->pool = $pool;
@@ -423,7 +421,7 @@
}
/**
- * @param RedisConnRef $conn
+ * @param Redis $conn
* @return bool
*/
public function isConnIdentical( Redis $conn ) {
--
To view, visit https://gerrit.wikimedia.org/r/96359
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5a737511f8c0234451fba766b529594e6244fb95
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits