Code Duplication    Length = 3-4 lines in 2 locations

languages/classes/LanguageKu.php 1 location

@@ 217-219 (lines=3) @@
214
		return $ret;
215
		*/
216
217
		if ( !isset( $this->mTables[$toVariant] ) ) {
218
			throw new MWException( "Broken variant table: " . implode( ',', array_keys( $this->mTables ) ) );
219
		}
220
221
		return parent::translate( $text, $toVariant );
222
	}

languages/classes/LanguageSr.php 1 location

@@ 152-155 (lines=4) @@
149
150
		$m = array_shift( $matches );
151
		$this->loadTables();
152
		if ( !isset( $this->mTables[$toVariant] ) ) {
153
			throw new MWException( "Broken variant table: "
154
				. implode( ',', array_keys( $this->mTables ) ) );
155
		}
156
		$ret = $this->mTables[$toVariant]->replace( $m[0] );
157
		$mstart = $m[1] + strlen( $m[0] );
158
		foreach ( $matches as $m ) {