getKeysExistingInALanguageButNotTheOther() public méthode

Given a dot array of all keys in the format 'file.language.key', this method searches for keys that exist in one language but not the other and outputs an array consists of those keys.
public getKeysExistingInALanguageButNotTheOther ( $values ) : array
$values
Résultat array
 /**
  * Get an array of keys that have missing values with a hint
  * from another language translation file if possible.
  *
  * ex: [ ['key' => 'product.color.nl', 'hint' => 'en = "color"'] ]
  *
  * @param array $languages
  * @return array
  */
 private function getMissing(array $languages)
 {
     $files = $this->manager->files();
     // Array of content of all files indexed by fileName.languageKey
     $filesResults = [];
     // The final output of the method
     $missing = [];
     // Here we collect the file results
     foreach ($files as $fileName => $languageFiles) {
         foreach ($languageFiles as $languageKey => $filePath) {
             $filesResults[$fileName][$languageKey] = $this->manager->getFileContent($filePath);
         }
     }
     $values = Arr::dot($filesResults);
     $emptyValues = array_filter($values, function ($value) {
         return $value == '';
     });
     // Adding all keys that has values = ''
     foreach ($emptyValues as $dottedValue => $emptyValue) {
         list($fileName, $languageKey, $key) = explode('.', $dottedValue, 3);
         $missing[] = "{$fileName}.{$key}:{$languageKey}";
     }
     $missing = array_merge($missing, $this->manager->getKeysExistingInALanguageButNotTheOther($values));
     return $missing;
 }
 /**
  * Synchronize keys that exist in a language but not the other.
  *
  * @param $translationFiles
  * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  * @return void
  */
 private function syncKeysBetweenLanguages($translationFiles)
 {
     $this->info('Synchronizing language files...');
     $filesResults = [];
     // Here we collect the file results
     foreach ($translationFiles as $fileName => $languageFiles) {
         foreach ($languageFiles as $languageKey => $filePath) {
             $filesResults[$fileName][$languageKey] = $this->manager->getFileContent($filePath);
         }
     }
     $values = Arr::dot($filesResults);
     $missing = $this->manager->getKeysExistingInALanguageButNotTheOther($values);
     foreach ($missing as &$missingKey) {
         list($file, $key) = explode('.', $missingKey, 2);
         list($key, $language) = explode(':', $key, 2);
         $this->fillMissingKeys($file, [$key], $language);
     }
 }