Code Duplication    Length = 3-4 lines in 2 locations

includes/SiteConfiguration.php 1 location

@@ 440-442 (lines=3) @@
437
		}
438
439
		foreach ( $default as $name => $def ) {
440
			if ( !isset( $ret[$name] ) || ( is_array( $default[$name] ) && !is_array( $ret[$name] ) ) ) {
441
				$ret[$name] = $default[$name];
442
			}
443
		}
444
445
		return $ret;

includes/registration/ExtensionRegistry.php 1 location

@@ 251-254 (lines=4) @@
248
249
			// Optimistic: If the global is not set, or is an empty array, replace it entirely.
250
			// Will be O(1) performance.
251
			if ( !isset( $GLOBALS[$key] ) || ( is_array( $GLOBALS[$key] ) && !$GLOBALS[$key] ) ) {
252
				$GLOBALS[$key] = $val;
253
				continue;
254
			}
255
256
			if ( !is_array( $GLOBALS[$key] ) || !is_array( $val ) ) {
257
				// config setting that has already been overridden, don't set it