Code Duplication    Length = 8-8 lines in 3 locations

includes/parser/CoreParserFunctions.php 3 locations

@@ 232-239 (lines=8) @@
229
		return self::urlFunction( 'getLocalURL', $s, $arg );
230
	}
231
232
	public static function localurle( $parser, $s = '', $arg = null ) {
233
		$temp = self::urlFunction( 'getLocalURL', $s, $arg );
234
		if ( !is_string( $temp ) ) {
235
			return $temp;
236
		} else {
237
			return htmlspecialchars( $temp );
238
		}
239
	}
240
241
	public static function fullurl( $parser, $s = '', $arg = null ) {
242
		return self::urlFunction( 'getFullURL', $s, $arg );
@@ 245-252 (lines=8) @@
242
		return self::urlFunction( 'getFullURL', $s, $arg );
243
	}
244
245
	public static function fullurle( $parser, $s = '', $arg = null ) {
246
		$temp = self::urlFunction( 'getFullURL', $s, $arg );
247
		if ( !is_string( $temp ) ) {
248
			return $temp;
249
		} else {
250
			return htmlspecialchars( $temp );
251
		}
252
	}
253
254
	public static function canonicalurl( $parser, $s = '', $arg = null ) {
255
		return self::urlFunction( 'getCanonicalURL', $s, $arg );
@@ 258-265 (lines=8) @@
255
		return self::urlFunction( 'getCanonicalURL', $s, $arg );
256
	}
257
258
	public static function canonicalurle( $parser, $s = '', $arg = null ) {
259
		$temp = self::urlFunction( 'getCanonicalURL', $s, $arg );
260
		if ( !is_string( $temp ) ) {
261
			return $temp;
262
		} else {
263
			return htmlspecialchars( $temp );
264
		}
265
	}
266
267
	public static function urlFunction( $func, $s = '', $arg = null ) {
268
		$title = Title::newFromText( $s );