Passed
Push — master ( 615975...1d83b7 )
by Roberto
01:58 queued 11s
created
src/Common/FakePretty.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
         $html .= '<h2>body</h2>';
67 67
         $html .= str_replace(
68 68
             ['<', '>'],
69
-            ['&lt;','&gt;'],
69
+            ['&lt;', '&gt;'],
70 70
             str_replace(
71 71
                 '<?xml version="1.0"?>',
72 72
                 '<?xml version="1.0" encoding="UTF-8"?>',
Please login to merge, or discard this patch.
src/Complements.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $node2 = $procb2b->importNode($nodeb2b, true);
73 73
         $nfeProcB2B->appendChild($node2);
74 74
         $nfeb2bXML = $procb2b->saveXML();
75
-        $nfeb2bXMLString = str_replace(array("\n","\r","\s"), '', $nfeb2bXML);
75
+        $nfeb2bXMLString = str_replace(array("\n", "\r", "\s"), '', $nfeb2bXML);
76 76
         return (string) $nfeb2bXMLString;
77 77
     }
78 78
 
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
         $resLote = $ret->getElementsByTagName('idLote')->item(0)->nodeValue;
307 307
         //extrai a rag retEvento da resposta (retorno da SEFAZ)
308 308
         $retEv = $ret->getElementsByTagName('retEvento')->item(0);
309
-        $cStat  = $retEv->getElementsByTagName('cStat')->item(0)->nodeValue;
309
+        $cStat = $retEv->getElementsByTagName('cStat')->item(0)->nodeValue;
310 310
         $xMotivo = $retEv->getElementsByTagName('xMotivo')->item(0)->nodeValue;
311 311
         $tpEvento = $retEv->getElementsByTagName('tpEvento')->item(0)->nodeValue;
312 312
         $cStatValids = ['135', '136'];
Please login to merge, or discard this patch.
src/Common/Tools.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      * Canonical conversion options
98 98
      * @var array
99 99
      */
100
-    protected $canonical = [true,false,null,null];
100
+    protected $canonical = [true, false, null, null];
101 101
     /**
102 102
      * Model of NFe 55 or 65
103 103
      * @var int
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
         }
543 543
 
544 544
         $path = $this->pathwsfiles . $file;
545
-        if (! file_exists($path)) {
545
+        if (!file_exists($path)) {
546 546
             return '';
547 547
         }
548 548
         return file_get_contents($path);
Please login to merge, or discard this patch.
src/Common/ValidTXT.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@
 block discarded – undo
137 137
                     '?',
138 138
                     $field
139 139
                 );
140
-                 $newfield = preg_replace('/\xE0[\x80-\x9F][\x80-\xBF]' .
140
+                    $newfield = preg_replace('/\xE0[\x80-\x9F][\x80-\xBF]' .
141 141
                     '|\xED[\xA0-\xBF][\x80-\xBF]/S', '?', $newfield);
142 142
                 if ($field != $newfield) {
143 143
                     $errors[] = "ERRO: ($num) Existem caracteres não UTF-8, não permitidos, "
Please login to merge, or discard this patch.
src/Common/Config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
     {
49 49
         $filejsonschema = __DIR__ . "/../../storage/config.schema";
50 50
         $validator = new JsonValid();
51
-        $validator->check($data, (object)['$ref' => 'file://' . $filejsonschema]);
51
+        $validator->check($data, (object) ['$ref' => 'file://' . $filejsonschema]);
52 52
         if (!$validator->isValid()) {
53 53
             $msg = "";
54 54
             foreach ($validator->getErrors() as $error) {
Please login to merge, or discard this patch.
src/Factories/Parser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1231,7 +1231,7 @@  discard block
 block discarded – undo
1231 1231
         $this->stdPIS->CST = $std->CST;
1232 1232
         $this->stdPIS->vPIS = $std->vPIS;
1233 1233
         $this->stdPIS->qBCProd = $std->qBCProd;
1234
-        $this->stdPIS->vAliqProd  = $std->vAliqProd;
1234
+        $this->stdPIS->vAliqProd = $std->vAliqProd;
1235 1235
         $this->buildQEntity();
1236 1236
     }
1237 1237
 
@@ -1282,7 +1282,7 @@  discard block
 block discarded – undo
1282 1282
     protected function q10Entity($std)
1283 1283
     {
1284 1284
         $this->stdPIS->qBCProd = $std->qBCProd;
1285
-        $this->stdPIS->vAliqProd  = $std->vAliqProd;
1285
+        $this->stdPIS->vAliqProd = $std->vAliqProd;
1286 1286
         $this->buildQEntity();
1287 1287
     }
1288 1288
 
Please login to merge, or discard this patch.
src/Factories/QRCode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@
 block discarded – undo
159 159
         //emissão off-line
160 160
         $dt = new \DateTime($dhEmi);
161 161
         $dia = $dt->format('d');
162
-        $valor = number_format((float)$vNF, 2, '.', '');
162
+        $valor = number_format((float) $vNF, 2, '.', '');
163 163
         $digHex = self::str2Hex($digVal);
164 164
         $seq = "$chNFe|$ver|$tpAmb|$dia|$valor|$digHex|$cscId";
165 165
         $hash = strtoupper(sha1($seq . $csc));
Please login to merge, or discard this patch.
src/Tools.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         if (strlen($chave) != 44 || !is_numeric($chave)) {
155 155
             throw new InvalidArgumentException("Consulta chave: chave \"$chave\" invalida!");
156 156
         }
157
-        $uf = UFList::getUFByCode((int)substr($chave, 0, 2));
157
+        $uf = UFList::getUFByCode((int) substr($chave, 0, 2));
158 158
         if (empty($tpAmb)) {
159 159
             $tpAmb = $this->tpAmb;
160 160
         }
@@ -204,9 +204,9 @@  discard block
 block discarded – undo
204 204
         if (empty($ano)) {
205 205
             $strAno = (string) date('y');
206 206
         }
207
-        $strSerie = str_pad((string)$nSerie, 3, '0', STR_PAD_LEFT);
208
-        $strInicio = str_pad((string)$nIni, 9, '0', STR_PAD_LEFT);
209
-        $strFinal = str_pad((string)$nFin, 9, '0', STR_PAD_LEFT);
207
+        $strSerie = str_pad((string) $nSerie, 3, '0', STR_PAD_LEFT);
208
+        $strInicio = str_pad((string) $nIni, 9, '0', STR_PAD_LEFT);
209
+        $strFinal = str_pad((string) $nFin, 9, '0', STR_PAD_LEFT);
210 210
         $idInut = "ID"
211 211
             . $this->urlcUF
212 212
             . $strAno
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
             . "</infCons>"
310 310
             . "</ConsCad>";
311 311
         if (strtoupper($uf) == 'MT') {
312
-            $request = "<nfeDadosMsg>$request</nfeDadosMsg>" ;
312
+            $request = "<nfeDadosMsg>$request</nfeDadosMsg>";
313 313
         }
314 314
         $this->isValid($this->urlVersion, $request, 'consCad');
315 315
         $this->lastRequest = $request;
@@ -376,10 +376,10 @@  discard block
 block discarded – undo
376 376
         $this->servico($servico, $fonte, $this->tpAmb, true);
377 377
         $cUF = UFList::getCodeByUF($this->config->siglaUF);
378 378
         $cnpj = $this->config->cnpj;
379
-        $ultNSU = str_pad((string)$ultNSU, 15, '0', STR_PAD_LEFT);
379
+        $ultNSU = str_pad((string) $ultNSU, 15, '0', STR_PAD_LEFT);
380 380
         $tagNSU = "<distNSU><ultNSU>$ultNSU</ultNSU></distNSU>";
381 381
         if ($numNSU != 0) {
382
-            $numNSU = str_pad((string)$numNSU, 15, '0', STR_PAD_LEFT);
382
+            $numNSU = str_pad((string) $numNSU, 15, '0', STR_PAD_LEFT);
383 383
             $tagNSU = "<consNSU><NSU>$numNSU</NSU></consNSU>";
384 384
         }
385 385
         //monta a consulta
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
             . "<tpAutor>{$std->tpAutor}</tpAutor>"
460 460
             . "<verAplic>{$std->verAplic}</verAplic>"
461 461
             . "<autXML>";
462
-        $tagAdic .=  !empty($std->CNPJ)
462
+        $tagAdic .= !empty($std->CNPJ)
463 463
             ? "<CNPJ>{$std->CNPJ}</CNPJ>"
464 464
             : "<CPF>{$std->CPF}</CPF>";
465 465
         $tagAdic .= "</autXML>"
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
         $tipo = 1,
493 493
         $nSeqEvento = 1
494 494
     ) {
495
-        $uf = UFList::getUFByCode((int)substr($chNFe, 0, 2));
495
+        $uf = UFList::getUFByCode((int) substr($chNFe, 0, 2));
496 496
         //pedido de prorrogação primero prazo
497 497
         $tpEvento = 111500;
498 498
         if ($tipo == 2) {
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
         if (empty($chave) || empty($nProt)) {
533 533
             throw new InvalidArgumentException('A chave ou o numero do protocolo estão vazios!');
534 534
         }
535
-        $uf = UFList::getUFByCode((int)substr($chave, 0, 2));
535
+        $uf = UFList::getUFByCode((int) substr($chave, 0, 2));
536 536
         $tpEvento = self::EVT_CANCELA_PRORROGACAO_1; //111502;
537 537
         $origEvent = self::EVT_PRORROGACAO_1; //111500;
538 538
         if ($tipo == 2) {
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
             $tpEvento = self::EVT_CANCELA_PRORROGACAO_2; //111503;
541 541
             $origEvent = self::EVT_PRORROGACAO_2; //111501;
542 542
         }
543
-        $sSeqEvento = str_pad((string)$nSeqEvento, 2, "0", STR_PAD_LEFT);
543
+        $sSeqEvento = str_pad((string) $nSeqEvento, 2, "0", STR_PAD_LEFT);
544 544
         $idPedidoCancelado = "ID{$origEvent}{$chave}{$sSeqEvento}";
545 545
         $tagAdic = "<idPedidoCancelado>"
546 546
                 . "$idPedidoCancelado"
@@ -936,7 +936,7 @@  discard block
 block discarded – undo
936 936
         $cnpj = isset($this->config->cnpj) ? $this->config->cnpj : '';
937 937
         $dt = new \DateTime(date("Y-m-d H:i:sP"), new \DateTimeZone($this->timezone));
938 938
         $dhEvento = $dt->format('Y-m-d\TH:i:sP');
939
-        $sSeqEvento = str_pad((string)$nSeqEvento, 2, "0", STR_PAD_LEFT);
939
+        $sSeqEvento = str_pad((string) $nSeqEvento, 2, "0", STR_PAD_LEFT);
940 940
         $eventId = "ID" . $tpEvento . $chave . $sSeqEvento;
941 941
         $cOrgao = UFList::getCodeByUF($uf);
942 942
         $request = "<evento xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">"
@@ -1102,12 +1102,12 @@  discard block
 block discarded – undo
1102 1102
         $dom->loadXML($nfe);
1103 1103
         //verifica a validade no webservice da SEFAZ
1104 1104
         $tpAmb = $dom->getElementsByTagName('tpAmb')->item(0)->nodeValue;
1105
-        $infNFe  = $dom->getElementsByTagName('infNFe')->item(0);
1105
+        $infNFe = $dom->getElementsByTagName('infNFe')->item(0);
1106 1106
         $chNFe = preg_replace('/[^0-9]/', '', $infNFe->getAttribute("Id"));
1107 1107
         $protocol = $dom->getElementsByTagName('nProt')->item(0)->nodeValue;
1108 1108
         $digval = $dom->getElementsByTagName('DigestValue')->item(0)->nodeValue;
1109 1109
         //consulta a NFe
1110
-        $response = $this->sefazConsultaChave($chNFe, (int)$tpAmb);
1110
+        $response = $this->sefazConsultaChave($chNFe, (int) $tpAmb);
1111 1111
         $ret = new \DOMDocument('1.0', 'UTF-8');
1112 1112
         $ret->preserveWhiteSpace = false;
1113 1113
         $ret->formatOutput = false;
Please login to merge, or discard this patch.