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

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