private function collectPriorFiles()
 {
     $dir = $this->getDirectory();
     $it = new \RecursiveDirectoryIterator($dir);
     foreach (new \RecursiveIteratorIterator($it) as $file) {
         if (is_file($file) && SyncService::isPriorLanguage($file)) {
             $this->sourceFilesArray[] = $file;
         }
     }
 }
 public function eraseDumpFiles(&$errors)
 {
     $dir = ConfigResolver::get('main_directory');
     $it = new \RecursiveDirectoryIterator($dir);
     foreach (new \RecursiveIteratorIterator($it) as $file) {
         if (is_file($file) && !SyncService::isPriorLanguage($file)) {
             if (!SyncService::isPriorFile($file)) {
                 array_push($errors, new Error(ErrorCodes::$dump_file, SyncService::getLangByFilePath($file->getPathName()), $file->getPathName(), "dump file was deleted"));
                 if (ConfigResolver::get('auto_fix')) {
                     unlink($file);
                 }
             }
         }
     }
 }