From 73dc123b9b6660812a77f2e452973588a9e9ddb6 Mon Sep 17 00:00:00 2001 From: Victor Felix Date: Tue, 12 Sep 2017 11:46:36 -0300 Subject: [PATCH] Adicionando o nome do arquivo no path retornado. --- src/RemFactory.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/RemFactory.php b/src/RemFactory.php index e18577b..bb2cd55 100644 --- a/src/RemFactory.php +++ b/src/RemFactory.php @@ -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() @@ -105,6 +106,6 @@ public function build(Header $header, array $transacoes) fclose($file); - return $this->savePath; + return $this->savePath . '/' . $fileName; } }