Passed
Push — master ( c81c33...3c7bec )
by Roberto
02:13 queued 11s
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 .= "<tpAutorizacao>{$std->tpAutorizacao}</tpAutorizacao>"
@@ -693,7 +693,7 @@  discard block
 block discarded – undo
693 693
             $dt = new \DateTime('now', new \DateTimeZone($this->timezone));
694 694
             $dhEvento = $dt->format('Y-m-d\TH:i:sP');
695 695
             $sSeqEvento = str_pad($evt->nSeqEvento, 2, "0", STR_PAD_LEFT);
696
-            $eventId = "ID".$evt->tpEvento.$evt->chave.$sSeqEvento;
696
+            $eventId = "ID" . $evt->tpEvento . $evt->chave . $sSeqEvento;
697 697
             $cOrgao = UFList::getCodeByUF($uf);
698 698
             $request = "<evento xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">"
699 699
                 . "<infEvento Id=\"$eventId\">"
@@ -840,7 +840,7 @@  discard block
 block discarded – undo
840 840
         $dt = new \DateTime(date("Y-m-d H:i:sP"), new \DateTimeZone($this->timezone));
841 841
         $dhEvento = $dt->format('Y-m-d\TH:i:sP');
842 842
         $sSeqEvento = str_pad($nSeqEvento, 2, "0", STR_PAD_LEFT);
843
-        $eventId = "ID".$tpEvento.$chave.$sSeqEvento;
843
+        $eventId = "ID" . $tpEvento . $chave . $sSeqEvento;
844 844
         $cOrgao = UFList::getCodeByUF($uf);
845 845
         $request = "<evento xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">"
846 846
             . "<infEvento Id=\"$eventId\">"
@@ -872,7 +872,7 @@  discard block
 block discarded – undo
872 872
             $this->canonical
873 873
         );
874 874
         $request = Strings::clearXmlString($request, true);
875
-        $lote = $dt->format('YmdHis').rand(0, 9);
875
+        $lote = $dt->format('YmdHis') . rand(0, 9);
876 876
         $request = "<envEvento xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">"
877 877
             . "<idLote>$lote</idLote>"
878 878
             . $request
@@ -908,7 +908,7 @@  discard block
 block discarded – undo
908 908
         $cnpj = $this->config->cnpj;
909 909
         //monta a consulta
910 910
         $request = "<distDFeInt xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">"
911
-            . "<tpAmb>".$this->tpAmb."</tpAmb>"
911
+            . "<tpAmb>" . $this->tpAmb . "</tpAmb>"
912 912
             . "<cUFAutor>$cUF</cUFAutor>";
913 913
         if ($this->typePerson === 'J') {
914 914
             $request .= "<CNPJ>$cnpj</CNPJ>";
@@ -966,8 +966,8 @@  discard block
 block discarded – undo
966 966
             . "<indOp>$indOp</indOp>"
967 967
             . "<raizCNPJ>$raizCNPJ</raizCNPJ>"
968 968
             . "<dadosCsc>"
969
-            . "<idCsc>".$this->config->CSCid."</idCsc>"
970
-            . "<codigoCsc>".$this->config->CSC."</codigoCsc>"
969
+            . "<idCsc>" . $this->config->CSCid . "</idCsc>"
970
+            . "<codigoCsc>" . $this->config->CSC . "</codigoCsc>"
971 971
             . "</dadosCsc>"
972 972
             . "</admCscNFCe>";
973 973
         }
@@ -999,7 +999,7 @@  discard block
 block discarded – undo
999 999
         $dom->loadXML($nfe);
1000 1000
         //verifica a validade no webservice da SEFAZ
1001 1001
         $tpAmb = $dom->getElementsByTagName('tpAmb')->item(0)->nodeValue;
1002
-        $infNFe  = $dom->getElementsByTagName('infNFe')->item(0);
1002
+        $infNFe = $dom->getElementsByTagName('infNFe')->item(0);
1003 1003
         $chNFe = preg_replace('/[^0-9]/', '', $infNFe->getAttribute("Id"));
1004 1004
         $protocol = $dom->getElementsByTagName('nProt')->item(0)->nodeValue;
1005 1005
         $digval = $dom->getElementsByTagName('DigestValue')->item(0)->nodeValue;
Please login to merge, or discard this patch.