Code Duplication    Length = 5-5 lines in 2 locations

includes/parser/LinkHolderArray.php 2 locations

@@ 131-135 (lines=5) @@
128
129
		# Renumber internal links
130
		foreach ( $other->internals as $ns => $nsLinks ) {
131
			foreach ( $nsLinks as $key => $entry ) {
132
				$newKey = $idOffset + $key;
133
				$this->internals[$ns][$newKey] = $entry;
134
				$maxId = $newKey > $maxId ? $newKey : $maxId;
135
			}
136
		}
137
		$texts = preg_replace_callback( '/(<!--LINK \d+:)(\d+)(-->)/',
138
			[ $this, 'mergeForeignCallback' ], $texts );
@@ 141-145 (lines=5) @@
138
			[ $this, 'mergeForeignCallback' ], $texts );
139
140
		# Renumber interwiki links
141
		foreach ( $other->interwikis as $key => $entry ) {
142
			$newKey = $idOffset + $key;
143
			$this->interwikis[$newKey] = $entry;
144
			$maxId = $newKey > $maxId ? $newKey : $maxId;
145
		}
146
		$texts = preg_replace_callback( '/(<!--IWLINK )(\d+)(-->)/',
147
			[ $this, 'mergeForeignCallback' ], $texts );
148