Passed
Push — master ( cffe7c...eb7d9f )
by Roberto
04:16 queued 02:06
created
src/Tools.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
             . "</infCons>"
283 283
             . "</ConsCad>";
284 284
         if (strtoupper($uf) == 'MT') {
285
-            $request = "<nfeDadosMsg>$request</nfeDadosMsg>" ;
285
+            $request = "<nfeDadosMsg>$request</nfeDadosMsg>";
286 286
         }
287 287
         $this->isValid($this->urlVersion, $request, 'consCad');
288 288
         $this->lastRequest = $request;
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
         }
358 358
         //monta a consulta
359 359
         $consulta = "<distDFeInt xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">"
360
-            . "<tpAmb>".$this->tpAmb."</tpAmb>"
360
+            . "<tpAmb>" . $this->tpAmb . "</tpAmb>"
361 361
             . "<cUFAutor>$cUF</cUFAutor>";
362 362
         if ($this->typePerson === 'J') {
363 363
             $consulta .= "<CNPJ>$cnpj</CNPJ>";
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
             . "<tpAutor>{$std->tpAutor}</tpAutor>"
430 430
             . "<verAplic>{$std->verAplic}</verAplic>"
431 431
             . "<autXML>";
432
-        $tagAdic .=  !empty($std->CNPJ)
432
+        $tagAdic .= !empty($std->CNPJ)
433 433
             ? "<CNPJ>{$std->CNPJ}</CNPJ>"
434 434
             : "<CPF>{$std->CPF}</CPF>";
435 435
         $tagAdic .= "</autXML>"
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
             $dt = new \DateTime('now', new \DateTimeZone($this->timezone));
704 704
             $dhEvento = $dt->format('Y-m-d\TH:i:sP');
705 705
             $sSeqEvento = str_pad($evt->nSeqEvento, 2, "0", STR_PAD_LEFT);
706
-            $eventId = "ID".$evt->tpEvento.$evt->chave.$sSeqEvento;
706
+            $eventId = "ID" . $evt->tpEvento . $evt->chave . $sSeqEvento;
707 707
             $cOrgao = UFList::getCodeByUF($uf);
708 708
             $request = "<evento xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">"
709 709
                 . "<infEvento Id=\"$eventId\">"
@@ -859,7 +859,7 @@  discard block
 block discarded – undo
859 859
         $dt = new \DateTime(date("Y-m-d H:i:sP"), new \DateTimeZone($this->timezone));
860 860
         $dhEvento = $dt->format('Y-m-d\TH:i:sP');
861 861
         $sSeqEvento = str_pad($nSeqEvento, 2, "0", STR_PAD_LEFT);
862
-        $eventId = "ID".$tpEvento.$chave.$sSeqEvento;
862
+        $eventId = "ID" . $tpEvento . $chave . $sSeqEvento;
863 863
         $cOrgao = UFList::getCodeByUF($uf);
864 864
         $request = "<evento xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">"
865 865
             . "<infEvento Id=\"$eventId\">"
@@ -891,7 +891,7 @@  discard block
 block discarded – undo
891 891
             $this->canonical
892 892
         );
893 893
         $request = Strings::clearXmlString($request, true);
894
-        $lote = $dt->format('YmdHis').rand(0, 9);
894
+        $lote = $dt->format('YmdHis') . rand(0, 9);
895 895
         $request = "<envEvento xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">"
896 896
             . "<idLote>$lote</idLote>"
897 897
             . $request
@@ -932,7 +932,7 @@  discard block
 block discarded – undo
932 932
         $cnpj = $this->config->cnpj;
933 933
         //monta a consulta
934 934
         $request = "<distDFeInt xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">"
935
-            . "<tpAmb>".$this->tpAmb."</tpAmb>"
935
+            . "<tpAmb>" . $this->tpAmb . "</tpAmb>"
936 936
             . "<cUFAutor>$cUF</cUFAutor>";
937 937
         if ($this->typePerson === 'J') {
938 938
             $request .= "<CNPJ>$cnpj</CNPJ>";
@@ -990,8 +990,8 @@  discard block
 block discarded – undo
990 990
             . "<indOp>$indOp</indOp>"
991 991
             . "<raizCNPJ>$raizCNPJ</raizCNPJ>"
992 992
             . "<dadosCsc>"
993
-            . "<idCsc>".$this->config->CSCid."</idCsc>"
994
-            . "<codigoCsc>".$this->config->CSC."</codigoCsc>"
993
+            . "<idCsc>" . $this->config->CSCid . "</idCsc>"
994
+            . "<codigoCsc>" . $this->config->CSC . "</codigoCsc>"
995 995
             . "</dadosCsc>"
996 996
             . "</admCscNFCe>";
997 997
         }
@@ -1023,7 +1023,7 @@  discard block
 block discarded – undo
1023 1023
         $dom->loadXML($nfe);
1024 1024
         //verifica a validade no webservice da SEFAZ
1025 1025
         $tpAmb = $dom->getElementsByTagName('tpAmb')->item(0)->nodeValue;
1026
-        $infNFe  = $dom->getElementsByTagName('infNFe')->item(0);
1026
+        $infNFe = $dom->getElementsByTagName('infNFe')->item(0);
1027 1027
         $chNFe = preg_replace('/[^0-9]/', '', $infNFe->getAttribute("Id"));
1028 1028
         $protocol = $dom->getElementsByTagName('nProt')->item(0)->nodeValue;
1029 1029
         $digval = $dom->getElementsByTagName('DigestValue')->item(0)->nodeValue;
Please login to merge, or discard this patch.