Passed
Pull Request — master (#259)
by
unknown
03:03
created
src/Tools.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
             . ((strlen($this->config->cnpj)==14) ? 
380 380
                 "<CNPJ>".$this->config->cnpj."</CNPJ>" : 
381 381
                 "<CPF>".$this->config->cnpj."</CPF>"
382
-              )
382
+                )
383 383
             . $tagNSU."</distDFeInt>";
384 384
         //valida o xml da requisição
385 385
         $this->isValid($this->urlVersion, $consulta, 'distDFeInt');
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
             . ((strlen($this->config->cnpj)==14) ? 
727 727
                 "<CNPJ>".$this->config->cnpj."</CNPJ>" : 
728 728
                 "<CPF>".$this->config->cnpj."</CPF>"
729
-              )
729
+                )
730 730
             . $tagChave."</distDFeInt>";
731 731
         //valida o xml da requisição
732 732
         $this->isValid($this->urlVersion, $consulta, 'distDFeInt');
Please login to merge, or discard this patch.
Spacing   +12 added lines, -14 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         if ($compactar) {
82 82
             $gzdata = base64_encode(gzencode($cons, 9, FORCE_GZIP));
83 83
             $body = "<cteDadosMsgZip xmlns=\"$this->urlNamespace\">$gzdata</cteDadosMsgZip>";
84
-            $method = $this->urlMethod."Zip";
84
+            $method = $this->urlMethod . "Zip";
85 85
             $parameters = ['cteDadosMsgZip' => $gzdata];
86 86
             $body = "<cteDadosMsgZip xmlns=\"$this->urlNamespace\">$gzdata</cteDadosMsgZip>";
87 87
         }
@@ -374,13 +374,12 @@  discard block
 block discarded – undo
374 374
         }
375 375
         //monta a consulta
376 376
         $consulta = "<distDFeInt xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">"
377
-            . "<tpAmb>".$this->tpAmb."</tpAmb>"
377
+            . "<tpAmb>" . $this->tpAmb . "</tpAmb>"
378 378
             . "<cUFAutor>$cUF</cUFAutor>"
379
-            . ((strlen($this->config->cnpj)==14) ? 
380
-                "<CNPJ>".$this->config->cnpj."</CNPJ>" : 
381
-                "<CPF>".$this->config->cnpj."</CPF>"
379
+            . ((strlen($this->config->cnpj) == 14) ? 
380
+                "<CNPJ>" . $this->config->cnpj . "</CNPJ>" : "<CPF>" . $this->config->cnpj . "</CPF>"
382 381
               )
383
-            . $tagNSU."</distDFeInt>";
382
+            . $tagNSU . "</distDFeInt>";
384 383
         //valida o xml da requisição
385 384
         $this->isValid($this->urlVersion, $consulta, 'distDFeInt');
386 385
         $this->lastRequest = $consulta;
@@ -666,7 +665,7 @@  discard block
 block discarded – undo
666 665
         $dt = new \DateTime();
667 666
         $dhEvento = $dt->format('Y-m-d\TH:i:sP');
668 667
         $sSeqEvento = str_pad($nSeqEvento, 2, "0", STR_PAD_LEFT);
669
-        $eventId = "ID".$tpEvento.$chave.$sSeqEvento;
668
+        $eventId = "ID" . $tpEvento . $chave . $sSeqEvento;
670 669
         $cOrgao = UFList::getCodeByUF($uf);
671 670
 
672 671
         $request = "<eventoCTe xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">"
@@ -723,11 +722,10 @@  discard block
 block discarded – undo
723 722
         $cUF = UFList::getCodeByUF($this->config->siglaUF);
724 723
         $tagChave = "<consChNFe><chNFe>$chave</chNFe></consChNFe>";
725 724
         //monta a consulta
726
-            . ((strlen($this->config->cnpj)==14) ? 
727
-                "<CNPJ>".$this->config->cnpj."</CNPJ>" : 
728
-                "<CPF>".$this->config->cnpj."</CPF>"
725
+            . ((strlen($this->config->cnpj) == 14) ? 
726
+                "<CNPJ>" . $this->config->cnpj . "</CNPJ>" : "<CPF>" . $this->config->cnpj . "</CPF>"
729 727
               )
730
-            . $tagChave."</distDFeInt>";
728
+            . $tagChave . "</distDFeInt>";
731 729
         //valida o xml da requisição
732 730
         $this->isValid($this->urlVersion, $consulta, 'distDFeInt');
733 731
         $this->lastRequest = $consulta;
@@ -779,8 +777,8 @@  discard block
 block discarded – undo
779 777
             . "<indOp>$indOp</indOp>"
780 778
             . "<raizCNPJ>$raizCNPJ</raizCNPJ>"
781 779
             . "<dadosCsc>"
782
-            . "<idCsc>".$this->config->CSCid."</idCsc>"
783
-            . "<codigoCsc>".$this->config->CSC."</codigoCsc>"
780
+            . "<idCsc>" . $this->config->CSCid . "</idCsc>"
781
+            . "<codigoCsc>" . $this->config->CSC . "</codigoCsc>"
784 782
             . "</dadosCsc>"
785 783
             . "</admCscNFCe>";
786 784
         }
@@ -811,7 +809,7 @@  discard block
 block discarded – undo
811 809
         $dom->loadXML($cte);
812 810
         //verifica a validade no webservice da SEFAZ
813 811
         $tpAmb = $dom->getElementsByTagName('tpAmb')->item(0)->nodeValue;
814
-        $infCTe  = $dom->getElementsByTagName('infCte')->item(0);
812
+        $infCTe = $dom->getElementsByTagName('infCte')->item(0);
815 813
         $chCTe = preg_replace('/[^0-9]/', '', $infCTe->getAttribute("Id"));
816 814
         $protocol = $dom->getElementsByTagName('nProt')->item(0)->nodeValue;
817 815
         $digval = $dom->getElementsByTagName('DigestValue')->item(0)->nodeValue;
Please login to merge, or discard this patch.