Code Duplication    Length = 10-10 lines in 2 locations

includes/OutputPage.php 1 location

@@ 2980-2989 (lines=10) @@
2977
	 * @param string|array $keys Key or array of key/value pairs
2978
	 * @param mixed $value [optional] Value of the configuration variable
2979
	 */
2980
	public function addJsConfigVars( $keys, $value = null ) {
2981
		if ( is_array( $keys ) ) {
2982
			foreach ( $keys as $key => $value ) {
2983
				$this->mJsConfigVars[$key] = $value;
2984
			}
2985
			return;
2986
		}
2987
2988
		$this->mJsConfigVars[$keys] = $value;
2989
	}
2990
2991
	/**
2992
	 * Get an array containing the variables to be set in mw.config in JavaScript.

includes/parser/ParserOutput.php 1 location

@@ 657-666 (lines=10) @@
654
	 * @param mixed $value [optional] Value of the configuration variable.
655
	 * @since 1.23
656
	 */
657
	public function addJsConfigVars( $keys, $value = null ) {
658
		if ( is_array( $keys ) ) {
659
			foreach ( $keys as $key => $value ) {
660
				$this->mJsConfigVars[$key] = $value;
661
			}
662
			return;
663
		}
664
665
		$this->mJsConfigVars[$keys] = $value;
666
	}
667
668
	/**
669
	 * Copy items from the OutputPage object into this one