Passed
Push — master ( 72f026...9d8c55 )
by Roberto
03:50 queued 02:42
created
src/Tools.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
             . "</infCons>"
287 287
             . "</ConsCad>";
288 288
         if (strtoupper($uf) == 'MT') {
289
-            $request = "<nfeDadosMsg>$request</nfeDadosMsg>" ;
289
+            $request = "<nfeDadosMsg>$request</nfeDadosMsg>";
290 290
         }
291 291
         $this->isValid($this->urlVersion, $request, 'consCad');
292 292
         $this->lastRequest = $request;
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
         }
362 362
         //monta a consulta
363 363
         $consulta = "<distDFeInt xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">"
364
-            . "<tpAmb>".$this->tpAmb."</tpAmb>"
364
+            . "<tpAmb>" . $this->tpAmb . "</tpAmb>"
365 365
             . "<cUFAutor>$cUF</cUFAutor>";
366 366
         if ($this->typePerson === 'J') {
367 367
             $consulta .= "<CNPJ>$cnpj</CNPJ>";
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
             . "<tpAutor>{$std->tpAutor}</tpAutor>"
437 437
             . "<verAplic>{$std->verAplic}</verAplic>"
438 438
             . "<autXML>";
439
-        $tagAdic .=  !empty($std->CNPJ)
439
+        $tagAdic .= !empty($std->CNPJ)
440 440
             ? "<CNPJ>{$std->CNPJ}</CNPJ>"
441 441
             : "<CPF>{$std->CPF}</CPF>";
442 442
         $tagAdic .= "</autXML>"
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
             $dt = new \DateTime('now', new \DateTimeZone($this->timezone));
727 727
             $dhEvento = $dt->format('Y-m-d\TH:i:sP');
728 728
             $sSeqEvento = str_pad($evt->nSeqEvento, 2, "0", STR_PAD_LEFT);
729
-            $eventId = "ID".$evt->tpEvento.$evt->chave.$sSeqEvento;
729
+            $eventId = "ID" . $evt->tpEvento . $evt->chave . $sSeqEvento;
730 730
             $cOrgao = UFList::getCodeByUF($uf);
731 731
             $request = "<evento xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">"
732 732
                 . "<infEvento Id=\"$eventId\">"
@@ -807,7 +807,7 @@  discard block
 block discarded – undo
807 807
             throw new RuntimeException("O autor [{$cOrgaoAutor}] não é da mesma UF que a NFe [{$ufchave}]");
808 808
         }
809 809
         // EPEC
810
-        $verProc= $dom->getElementsByTagName('verProc')->item(0)->nodeValue;
810
+        $verProc = $dom->getElementsByTagName('verProc')->item(0)->nodeValue;
811 811
         $dhEmi = $dom->getElementsByTagName('dhEmi')->item(0)->nodeValue;
812 812
         $tpNF = $dom->getElementsByTagName('tpNF')->item(0)->nodeValue;
813 813
         $emitIE = $emit->getElementsByTagName('IE')->item(0)->nodeValue;
@@ -912,7 +912,7 @@  discard block
 block discarded – undo
912 912
         $dt = new \DateTime(date("Y-m-d H:i:sP"), new \DateTimeZone($this->timezone));
913 913
         $dhEvento = $dt->format('Y-m-d\TH:i:sP');
914 914
         $sSeqEvento = str_pad($nSeqEvento, 2, "0", STR_PAD_LEFT);
915
-        $eventId = "ID".$tpEvento.$chave.$sSeqEvento;
915
+        $eventId = "ID" . $tpEvento . $chave . $sSeqEvento;
916 916
         $cOrgao = UFList::getCodeByUF($uf);
917 917
         $request = "<evento xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">"
918 918
             . "<infEvento Id=\"$eventId\">"
@@ -944,7 +944,7 @@  discard block
 block discarded – undo
944 944
             $this->canonical
945 945
         );
946 946
         $request = Strings::clearXmlString($request, true);
947
-        $lote = $dt->format('YmdHis').rand(0, 9);
947
+        $lote = $dt->format('YmdHis') . rand(0, 9);
948 948
         $request = "<envEvento xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">"
949 949
             . "<idLote>$lote</idLote>"
950 950
             . $request
@@ -986,7 +986,7 @@  discard block
 block discarded – undo
986 986
         $cnpj = $this->config->cnpj;
987 987
         //monta a consulta
988 988
         $request = "<distDFeInt xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">"
989
-            . "<tpAmb>".$this->tpAmb."</tpAmb>"
989
+            . "<tpAmb>" . $this->tpAmb . "</tpAmb>"
990 990
             . "<cUFAutor>$cUF</cUFAutor>";
991 991
         if ($this->typePerson === 'J') {
992 992
             $request .= "<CNPJ>$cnpj</CNPJ>";
@@ -1044,8 +1044,8 @@  discard block
 block discarded – undo
1044 1044
             . "<indOp>$indOp</indOp>"
1045 1045
             . "<raizCNPJ>$raizCNPJ</raizCNPJ>"
1046 1046
             . "<dadosCsc>"
1047
-            . "<idCsc>".$this->config->CSCid."</idCsc>"
1048
-            . "<codigoCsc>".$this->config->CSC."</codigoCsc>"
1047
+            . "<idCsc>" . $this->config->CSCid . "</idCsc>"
1048
+            . "<codigoCsc>" . $this->config->CSC . "</codigoCsc>"
1049 1049
             . "</dadosCsc>"
1050 1050
             . "</admCscNFCe>";
1051 1051
         }
@@ -1077,7 +1077,7 @@  discard block
 block discarded – undo
1077 1077
         $dom->loadXML($nfe);
1078 1078
         //verifica a validade no webservice da SEFAZ
1079 1079
         $tpAmb = $dom->getElementsByTagName('tpAmb')->item(0)->nodeValue;
1080
-        $infNFe  = $dom->getElementsByTagName('infNFe')->item(0);
1080
+        $infNFe = $dom->getElementsByTagName('infNFe')->item(0);
1081 1081
         $chNFe = preg_replace('/[^0-9]/', '', $infNFe->getAttribute("Id"));
1082 1082
         $protocol = $dom->getElementsByTagName('nProt')->item(0)->nodeValue;
1083 1083
         $digval = $dom->getElementsByTagName('DigestValue')->item(0)->nodeValue;
Please login to merge, or discard this patch.