Skip to content

Commit

Permalink
Merge pull request #1023 from nfephp-org/corrigindo-warnings
Browse files Browse the repository at this point in the history
Corrigindo warnings dos testes
  • Loading branch information
robmachado authored Mar 5, 2024
2 parents 6eef53e + 8cfdb53 commit e83fe7a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/Make.php
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ public function taginfNFe(stdClass $std): DOMElement
{
$possible = ['Id', 'versao', 'pk_nItem'];
$std = $this->equilizeParameters($std, $possible);
$chave = preg_replace('/[^0-9]/', '', $std->Id);
$chave = preg_replace('/[^0-9]/', '', (string)$std->Id);
$this->infNFe = $this->dom->createElement("infNFe");
$this->infNFe->setAttribute("Id", 'NFe' . $chave);
$this->infNFe->setAttribute(
Expand Down Expand Up @@ -619,7 +619,7 @@ public function tagide(stdClass $std): DOMElement
$this->dom->addChild(
$ide,
"natOp",
substr(trim($std->natOp), 0, 60),
substr(trim((string)$std->natOp), 0, 60),
true,
$identificador . "Descrição da Natureza da Operação"
);
Expand Down Expand Up @@ -1111,7 +1111,7 @@ public function tagenderEmit(stdClass $std): DOMElement
$this->dom->addChild(
$this->enderEmit,
"xCpl",
substr(trim($std->xCpl), 0, 60),
substr(trim((string)$std->xCpl), 0, 60),
false,
$identificador . "Complemento do Endereço do emitente"
);
Expand Down Expand Up @@ -2091,7 +2091,7 @@ public function tagCEST(stdClass $std): DOMElement
$this->dom->addChild(
$ctrltST,
"indEscala",
trim($std->indEscala),
trim((string)$std->indEscala),
false,
"$identificador [item $std->item] Indicador de Produção em escala relevante"
);
Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/txt/nfe_4.00_local_01.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
NOTAFISCAL|1|
A|4.00|NFe35180825028332000105550010000005021000005010||
B|35|00000501|VENDA MERC.SUB.TRIBUTARIA|55|1|502|2018-08-13T17:28:10-03:00|2018-08-14T09:00:00-03:00|1|1|3550308|1|1|8|1|1|0|3|0|0|3.2.1.1|||
C|GSMMY COMERCIO DE CHOCOLATES LTDA||140950881119||||3|
C|GSMMY COMERCIO DE CHOCOLATES LTDA|GSMMY|140950881119||||3|
C02|25028332000105|
C05|RUA CAETEZAL|296||AGUA FRIA|3550308|SAO PAULO|SP|02334130|||1122813500|
C05|RUA CAETEZAL|296||AGUA FRIA|3550308|SAO PAULO|SP|02334130||Brasil|1122813500|
E|SILVANA MARCONI - VL LEOPOLDINA|1|142304338112|||[email protected]|
E02|17812455000295|
E05|R SCHILLING|491||VILA LEOPOLDINA|3550308|SAO PAULO|SP|05302001|1058|BRASIL|1143053063|
Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/txt/nfe_errado.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
NOTAFISCAL|1|
A|4.00|NFe35180825028332000105550010000005021000005028||
B|35|00000502|VENDA�MERC.SUB.TRIBUTARIA|55|1|502|2018-08-13T17:28:10-03:00|2018-08-14T09:00:00-03:00|1|1|3550308|1|1|8|1|1|0|3|0|3.2.1.1|||
C|GSMMY & GSMMY COMERCIO DE CHOCOLATES LTDA||140950881119||||3|
C|GSMMY & GSMMY COMERCIO DE CHOCOLATES LTDA|GSMMY|140950881119||||3|
C02|25028332000105|
C05|RUA CAETEZAL|296||AGUA FRIA|3550308|SAO PAULO|SP|02334130|||1122813500|
C05|RUA CAETEZAL|296||AGUA FRIA|3550308|SAO PAULO|SP|02334130||Brasil|1122813500|
E|SILVANA MARCONI - VL LEOPOLDINA|1|142304338112|||[email protected]|
E02|17812455000295|
E05|R SCHILLING|491||VILA LEOPOLDINA|3550308|SAO PAULO|SP|05302001|1058|BRASIL|1143053063|
Expand Down

0 comments on commit e83fe7a

Please sign in to comment.