Code Duplication    Length = 10-10 lines in 2 locations

includes/parser/ParserOutput.php 1 location

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

includes/OutputPage.php 1 location

@@ 2962-2971 (lines=10) @@
2959
	 * @param string|array $keys Key or array of key/value pairs
2960
	 * @param mixed $value [optional] Value of the configuration variable
2961
	 */
2962
	public function addJsConfigVars( $keys, $value = null ) {
2963
		if ( is_array( $keys ) ) {
2964
			foreach ( $keys as $key => $value ) {
2965
				$this->mJsConfigVars[$key] = $value;
2966
			}
2967
			return;
2968
		}
2969
2970
		$this->mJsConfigVars[$keys] = $value;
2971
	}
2972
2973
	/**
2974
	 * Get an array containing the variables to be set in mw.config in JavaScript.