Code Duplication    Length = 8-10 lines in 2 locations

includes/libs/redis/RedisConnectionPool.php 2 locations

@@ 247-254 (lines=8) @@
244
245
				return false;
246
			}
247
			if ( $this->password !== null ) {
248
				if ( !$conn->auth( $this->password ) ) {
249
					$logger->error(
250
						'Authentication error connecting to "{redis_server}"',
251
						[ 'redis_server' => $server ]
252
					);
253
				}
254
			}
255
		} catch ( RedisException $e ) {
256
			$this->downServers[$server] = time() + self::SERVER_DOWN_TTL;
257
			$logger->error(
@@ 381-390 (lines=10) @@
378
	 * @return bool Success
379
	 */
380
	public function reauthenticateConnection( $server, Redis $conn ) {
381
		if ( $this->password !== null ) {
382
			if ( !$conn->auth( $this->password ) ) {
383
				$this->logger->error(
384
					'Authentication error connecting to "{redis_server}"',
385
					[ 'redis_server' => $server ]
386
				);
387
388
				return false;
389
			}
390
		}
391
392
		return true;
393
	}