diff --git a/src/BilingualFile.php b/src/BilingualFile.php index d90b4fc..4840d7e 100644 --- a/src/BilingualFile.php +++ b/src/BilingualFile.php @@ -45,7 +45,7 @@ class BilingualFile extends \BrunoFontes\Memsource\BaseApi $errorMsg = $this->getError($filecontent); throw new \Exception("Error downloading file: {$errorMsg}", 1); } - $this->_saveIntoFile($filenames[$i], $filecontent); + Helper::saveIntoFile($filenames[$i], $filecontent); } return $filenames; } @@ -66,17 +66,6 @@ class BilingualFile extends \BrunoFontes\Memsource\BaseApi return ['jobs' => $convertedArray]; } - private function _saveIntoFile(string $filename, string $filecontent): void - { - try { - $f = fopen($filename, 'w+'); - fwrite($f, $filecontent); - fclose($f); - } catch (\Exception $e) { - throw new \Exception("File could not be saved: {$e->error}", 1); - } - } - /** * Upload a bilingual file to Memsource *