Code Duplication    Length = 8-8 lines in 2 locations

includes/media/Bitmap.php 1 location

@@ 62-69 (lines=8) @@
59
		return $scaler;
60
	}
61
62
	public function makeParamString( $params ) {
63
		$res = parent::makeParamString( $params );
64
		if ( isset( $params['interlace'] ) && $params['interlace'] ) {
65
			return "interlaced-{$res}";
66
		} else {
67
			return $res;
68
		}
69
	}
70
71
	public function parseParamString( $str ) {
72
		$remainder = preg_replace( '/^interlaced-/', '', $str );

includes/media/Jpeg.php 1 location

@@ 61-68 (lines=8) @@
58
		return $value === 'low';
59
	}
60
61
	public function makeParamString( $params ) {
62
		// Prepend quality as "qValue-". This has to match parseParamString() below
63
		$res = parent::makeParamString( $params );
64
		if ( $res && isset( $params['quality'] ) ) {
65
			$res = "q{$params['quality']}-$res";
66
		}
67
		return $res;
68
	}
69
70
	public function parseParamString( $str ) {
71
		// $str contains "qlow-200px" or "200px" strings because thumb.php would strip the filename