Code Duplication    Length = 14-16 lines in 2 locations

includes/db/loadbalancer/LoadBalancer.php 2 locations

@@ 1366-1379 (lines=14) @@
1363
	 * @since 1.25
1364
	 * @return float|bool UNIX timestamp or false
1365
	 */
1366
	public function lastMasterChangeTimestamp() {
1367
		$lastTime = false;
1368
		$masterIndex = $this->getWriterIndex();
1369
		foreach ( $this->mConns as $conns2 ) {
1370
			if ( empty( $conns2[$masterIndex] ) ) {
1371
				continue;
1372
			}
1373
			/** @var DatabaseBase $conn */
1374
			foreach ( $conns2[$masterIndex] as $conn ) {
1375
				$lastTime = max( $lastTime, $conn->lastDoneWrites() );
1376
			}
1377
		}
1378
		return $lastTime;
1379
	}
1380
1381
	/**
1382
	 * Check if this load balancer object had any recent or still
@@ 1402-1417 (lines=16) @@
1399
	 * @return array
1400
	 * @since 1.27
1401
	 */
1402
	public function pendingMasterChangeCallers() {
1403
		$fnames = [];
1404
1405
		$masterIndex = $this->getWriterIndex();
1406
		foreach ( $this->mConns as $conns2 ) {
1407
			if ( empty( $conns2[$masterIndex] ) ) {
1408
				continue;
1409
			}
1410
			/** @var DatabaseBase $conn */
1411
			foreach ( $conns2[$masterIndex] as $conn ) {
1412
				$fnames = array_merge( $fnames, $conn->pendingWriteCallers() );
1413
			}
1414
		}
1415
1416
		return $fnames;
1417
	}
1418
1419
	/**
1420
	 * @note This method will trigger a DB connection if not yet done