Code Duplication    Length = 8-8 lines in 2 locations

includes/libs/rdbms/lbfactory/LBFactoryMulti.php 1 location

@@ 278-285 (lines=8) @@
275
		);
276
	}
277
278
	public function getExternalLB( $cluster ) {
279
		if ( !isset( $this->extLBs[$cluster] ) ) {
280
			$this->extLBs[$cluster] = $this->newExternalLB( $cluster );
281
			$this->getChronologyProtector()->initLB( $this->extLBs[$cluster] );
282
		}
283
284
		return $this->extLBs[$cluster];
285
	}
286
287
	public function getAllMainLBs() {
288
		$lbs = [];

includes/libs/rdbms/lbfactory/LBFactorySimple.php 1 location

@@ 102-109 (lines=8) @@
99
		return $this->newLoadBalancer( $this->externalClusters[$cluster] );
100
	}
101
102
	public function getExternalLB( $cluster ) {
103
		if ( !isset( $this->extLBs[$cluster] ) ) {
104
			$this->extLBs[$cluster] = $this->newExternalLB( $cluster );
105
			$this->getChronologyProtector()->initLB( $this->extLBs[$cluster] );
106
		}
107
108
		return $this->extLBs[$cluster];
109
	}
110
111
	public function getAllMainLBs() {
112
		return [ 'DEFAULT' => $this->getMainLB() ];