Code Duplication    Length = 10-10 lines in 2 locations

includes/parser/ParserOutput.php 1 location

@@ 643-652 (lines=10) @@
640
	 * @param mixed $value [optional] Value of the configuration variable.
641
	 * @since 1.23
642
	 */
643
	public function addJsConfigVars( $keys, $value = null ) {
644
		if ( is_array( $keys ) ) {
645
			foreach ( $keys as $key => $value ) {
646
				$this->mJsConfigVars[$key] = $value;
647
			}
648
			return;
649
		}
650
651
		$this->mJsConfigVars[$keys] = $value;
652
	}
653
654
	/**
655
	 * Copy items from the OutputPage object into this one

includes/OutputPage.php 1 location

@@ 3122-3131 (lines=10) @@
3119
	 * @param string|array $keys Key or array of key/value pairs
3120
	 * @param mixed $value [optional] Value of the configuration variable
3121
	 */
3122
	public function addJsConfigVars( $keys, $value = null ) {
3123
		if ( is_array( $keys ) ) {
3124
			foreach ( $keys as $key => $value ) {
3125
				$this->mJsConfigVars[$key] = $value;
3126
			}
3127
			return;
3128
		}
3129
3130
		$this->mJsConfigVars[$keys] = $value;
3131
	}
3132
3133
	/**
3134
	 * Get an array containing the variables to be set in mw.config in JavaScript.