Code Duplication    Length = 4-6 lines in 2 locations

includes/libs/rdbms/loadmonitor/LoadMonitor.php 2 locations

@@ 156-161 (lines=6) @@
153
			// Scale from 10% to 100% of nominal weight
154
			$weightScales[$i] = max( $newWeight, .10 );
155
156
			if ( !$conn ) {
157
				$lagTimes[$i] = false;
158
				$host = $this->parent->getServerName( $i );
159
				$this->replLogger->error( __METHOD__ . ": host $host is unreachable" );
160
				continue;
161
			}
162
163
			if ( $conn->getLBInfo( 'is static' ) ) {
164
				$lagTimes[$i] = 0;
@@ 167-170 (lines=4) @@
164
				$lagTimes[$i] = 0;
165
			} else {
166
				$lagTimes[$i] = $conn->getLag();
167
				if ( $lagTimes[$i] === false ) {
168
					$host = $this->parent->getServerName( $i );
169
					$this->replLogger->error( __METHOD__ . ": host $host is not replicating?" );
170
				}
171
			}
172
173
			if ( $close ) {