Code Duplication    Length = 13-17 lines in 2 locations

includes/cache/localisation/LocalisationCache.php 2 locations

@@ 924-940 (lines=17) @@
921
				foreach ( $coreData as $key => $item ) {
922
					$this->mergeItem( $key, $csData[$key], $item );
923
				}
924
			} else {
925
				# Load the secondary localisation from the source file to
926
				# avoid infinite cycles on cyclic fallbacks
927
				$fbData = $this->readSourceFilesAndRegisterDeps( $csCode, $deps );
928
				if ( $fbData !== false ) {
929
					# Only merge the keys that make sense to merge
930
					foreach ( self::$allKeys as $key ) {
931
						if ( !isset( $fbData[$key] ) ) {
932
							continue;
933
						}
934
935
						if ( is_null( $coreData[$key] ) || $this->isMergeableKey( $key ) ) {
936
							$this->mergeItem( $key, $csData[$key], $fbData[$key] );
937
						}
938
					}
939
				}
940
			}
941
942
			# Allow extensions an opportunity to adjust the data for this
943
			# fallback
@@ 947-959 (lines=13) @@
944
			Hooks::run( 'LocalisationCacheRecacheFallback', [ $this, $csCode, &$csData ] );
945
946
			# Merge the data for this fallback into the final array
947
			if ( $csCode === $code ) {
948
				$allData = $csData;
949
			} else {
950
				foreach ( self::$allKeys as $key ) {
951
					if ( !isset( $csData[$key] ) ) {
952
						continue;
953
					}
954
955
					if ( is_null( $allData[$key] ) || $this->isMergeableKey( $key ) ) {
956
						$this->mergeItem( $key, $allData[$key], $csData[$key] );
957
					}
958
				}
959
			}
960
		}
961
962
		# Add cache dependencies for any referenced globals