protected function calculateRequestDiff($locale, $domain, array $catalogs) {
		$domain = array_flip((array) $domain);
		$locale = array_flip((array) $locale);
		
		$diffLocale = array_diff_key($locale, $catalogs);
		$diffDomain = empty($diffLocale) ? [] : $domain;
		
		foreach ($catalogs as $localeId => $catalog) {
			$diff = array_diff_key($domain, $catalog);
			
			if (! empty($diff)) {
				$diffDomain           += $diff;
				$diffLocale[$localeId] = true;
			}
		}
		
		if (empty($diffLocale)) {
			return;
		}
		
		return [
			$this->normalizeRequestDiff($diffLocale),
			$this->normalizeRequestDiff($diffDomain)
		];
	}
protected function calculateRequestDiff($locale, $domain, array $catalogs) {
		$domain = array_flip((array) $domain);
		$locale = array_flip((array) $locale);
		
		$diffLocale = array_diff_key($locale, $catalogs);
		$diffDomain = empty($diffLocale) ? [] : $domain;
		
		foreach ($catalogs as $localeId => $catalog) {
			$diff = array_diff_key($domain, $catalog);
			
			if (! empty($diff)) {
				$diffDomain           += $diff;
				$diffLocale[$localeId] = true;
			}
		}
		
		if (empty($diffLocale)) {
			return;
		}
		
		return [
			$this->normalizeRequestDiff($diffLocale),
			$this->normalizeRequestDiff($diffDomain)
		];
	}
protected function calculateRequestDiff ( $ locale , $ domain , array $ catalogs ) { $ domain = array_flip ( ( array ) $ domain ) ; $ locale = array_flip ( ( array ) $ locale ) ; $ diffLocale = array_diff_key ( $ locale , $ catalogs ) ; $ diffDomain = empty ( $ diffLocale ) ? [ ] : $ domain ; foreach ( $ catalogs as $ localeId => $ catalog ) { $ diff = array_diff_key ( $ domain , $ catalog ) ; if ( ! empty ( $ diff ) ) { $ diffDomain += $ diff ; $ diffLocale [ $ localeId ] = true ; } } if ( empty ( $ diffLocale ) ) { return ; } return [ $ this -> normalizeRequestDiff ( $ diffLocale ) , $ this -> normalizeRequestDiff ( $ diffDomain ) ] ; }
Calculate difference between the requested data and the obtained

@param  array | string $locale
@param  array | string $domain
@param  array          $catalogs
@return array | null   [locale, domain] Need to request | Need no request
Calculate difference between the requested data and the obtained