Skip to content

Commit

Permalink
Merge pull request #8 from victor-felix/master
Browse files Browse the repository at this point in the history
Adicionando o nome do arquivo no path retornado.
  • Loading branch information
AyrtonRicardo authored Sep 12, 2017
2 parents e816e4a + 73dc123 commit 18a18e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/RemFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ public function __construct($savePath = null)

public function build(Header $header, array $transacoes)
{
$file = fopen($this->savePath . '/' . (new File())->buildName(), 'w');
$fileName = (new File())->buildName();
$file = fopen($this->savePath . '/' . $fileName, 'w');

$stringHeader = $header->getIdentificacaoRegistro()
. $header->getIdentificacaoArquivo()
Expand Down Expand Up @@ -105,6 +106,6 @@ public function build(Header $header, array $transacoes)

fclose($file);

return $this->savePath;
return $this->savePath . '/' . $fileName;
}
}

0 comments on commit 18a18e2

Please sign in to comment.