Code Duplication    Length = 10-10 lines in 2 locations

includes/parser/ParserOutput.php 1 location

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

includes/OutputPage.php 1 location

@@ 3131-3140 (lines=10) @@
3128
	 * @param string|array $keys Key or array of key/value pairs
3129
	 * @param mixed $value [optional] Value of the configuration variable
3130
	 */
3131
	public function addJsConfigVars( $keys, $value = null ) {
3132
		if ( is_array( $keys ) ) {
3133
			foreach ( $keys as $key => $value ) {
3134
				$this->mJsConfigVars[$key] = $value;
3135
			}
3136
			return;
3137
		}
3138
3139
		$this->mJsConfigVars[$keys] = $value;
3140
	}
3141
3142
	/**
3143
	 * Get an array containing the variables to be set in mw.config in JavaScript.