Code Duplication    Length = 9-9 lines in 2 locations

view/SSViewer.php 2 locations

@@ 975-983 (lines=9) @@
972
	 * @param string $optionName
973
	 * @param mixed $optionVal
974
	 */
975
	public static function setOption($optionName, $optionVal) {
976
		if($optionName == 'rewriteHashlinks') {
977
			Deprecation::notice('4.0', 'Use the "SSViewer.rewrite_hash_links" config setting instead');
978
			Config::inst()->update('SSViewer', 'rewrite_hash_links', $optionVal);
979
		} else {
980
			Deprecation::notice('4.0', 'Use the "SSViewer.' . $optionName . '" config setting instead');
981
			Config::inst()->update('SSViewer', $optionName, $optionVal);
982
		}
983
	}
984
985
	/**
986
 	 * @deprecated 4.0 Use the "SSViewer.rewrite_hash_links" config setting instead
@@ 990-998 (lines=9) @@
987
 	 * @param string
988
 	 * @return mixed
989
	 */
990
	public static function getOption($optionName) {
991
		if($optionName == 'rewriteHashlinks') {
992
			Deprecation::notice('4.0', 'Use the "SSViewer.rewrite_hash_links" config setting instead');
993
			return Config::inst()->get('SSViewer', 'rewrite_hash_links');
994
		} else {
995
			Deprecation::notice('4.0', 'Use the "SSViewer.' . $optionName . '" config setting instead');
996
			return Config::inst()->get('SSViewer', $optionName);
997
		}
998
	}
999
1000
	/**
1001
	 * @config