Passed
Push — master ( 3b9395...084643 )
by
unknown
02:57
created
src/CTe/Dacte.php 1 patch
Spacing   +10 added lines, -12 removed lines patch added patch discarded remove patch
@@ -945,7 +945,7 @@  discard block
 block discarded – undo
945 945
             $n = count($resp['message']);
946 946
             $alttot = $n * 15;
947 947
             $x = 10;
948
-            $y = $this->hPrint/2 - $alttot/2;
948
+            $y = $this->hPrint / 2 - $alttot / 2;
949 949
             $h = 15;
950 950
             $w = $maxW - (2 * $x);
951 951
             $this->pdf->settextcolor(90, 90, 90);
@@ -989,10 +989,10 @@  discard block
 block discarded – undo
989 989
             $resp['message'][] = 'CTe NÃO PROTOCOLADO';
990 990
         } elseif ($this->getTagValue($this->ide, "tpAmb") == '2' && $this->preVisualizar == '0') {
991 991
             $resp['status'] = false;
992
-            $resp['message'][] =  "CTe EMITIDO EM HOMOLOGAÇÃO";
992
+            $resp['message'][] = "CTe EMITIDO EM HOMOLOGAÇÃO";
993 993
         } elseif ($this->preVisualizar == '1') {
994 994
             $resp['status'] = false;
995
-            $resp['message'][] =  "PRÉ-VISUALIZAÇÃO";
995
+            $resp['message'][] = "PRÉ-VISUALIZAÇÃO";
996 996
         }
997 997
         $retEvento = $this->cteProc->getElementsByTagName('retEventoCTe')->item(0);
998 998
         $cStat = $this->getTagValue($this->cteProc, "cStat");
@@ -1013,7 +1013,7 @@  discard block
 block discarded – undo
1013 1013
         } elseif (!empty($retEvento)) {
1014 1014
             $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0);
1015 1015
             $cStat = $this->getTagValue($infEvento, "cStat");
1016
-            $tpEvento= $this->getTagValue($infEvento, "tpEvento");
1016
+            $tpEvento = $this->getTagValue($infEvento, "tpEvento");
1017 1017
             $dhEvento = date("d/m/Y H:i:s", $this->toTimestamp($this->getTagValue($infEvento, "dhRegEvento")));
1018 1018
             $nProt = $this->getTagValue($infEvento, "nProt");
1019 1019
             if ($tpEvento == '110111' && ($cStat == '101' || $cStat == '151' || $cStat == '135' || $cStat == '155')) {
@@ -1269,8 +1269,7 @@  discard block
 block discarded – undo
1269 1269
             $texto = $this->getTagValue($this->enderExped, "xLgr") . ', ';
1270 1270
             $texto .= $this->getTagValue($this->enderExped, "nro");
1271 1271
             $texto .= $this->getTagValue($this->enderExped, "xCpl") != "" ?
1272
-                ' - ' . $this->getTagValue($this->enderExped, "xCpl") :
1273
-                '';
1272
+                ' - ' . $this->getTagValue($this->enderExped, "xCpl") : '';
1274 1273
         } else {
1275 1274
             $texto = '';
1276 1275
         }
@@ -1366,8 +1365,7 @@  discard block
 block discarded – undo
1366 1365
             $texto = $this->getTagValue($this->enderReceb, "xLgr") . ', ';
1367 1366
             $texto .= $this->getTagValue($this->enderReceb, "nro");
1368 1367
             $texto .= ($this->getTagValue($this->enderReceb, "xCpl") != "") ?
1369
-                ' - ' . $this->getTagValue($this->enderReceb, "xCpl") :
1370
-                '';
1368
+                ' - ' . $this->getTagValue($this->enderReceb, "xCpl") : '';
1371 1369
         } else {
1372 1370
             $texto = '';
1373 1371
         }
@@ -1571,7 +1569,7 @@  discard block
 block discarded – undo
1571 1569
         $qCarga = 0;
1572 1570
         foreach ($this->infQ as $infQ) {
1573 1571
             if (in_array($this->getTagValue($infQ, "cUnid"), array('01', '02'))) {
1574
-                $qCarga += (float)$this->getTagValue($infQ, "qCarga");
1572
+                $qCarga += (float) $this->getTagValue($infQ, "qCarga");
1575 1573
             }
1576 1574
         }
1577 1575
         $texto = 'PESO BRUTO (KG)';
@@ -1622,7 +1620,7 @@  discard block
 block discarded – undo
1622 1620
         $qCarga = 0;
1623 1621
         foreach ($this->infQ as $infQ) {
1624 1622
             if ($this->getTagValue($infQ, "cUnid") == '00') {
1625
-                $qCarga += (float)$this->getTagValue($infQ, "qCarga");
1623
+                $qCarga += (float) $this->getTagValue($infQ, "qCarga");
1626 1624
             }
1627 1625
         }
1628 1626
         $texto = !empty($qCarga) ? number_format($qCarga, 3, ",", ".") : '';
@@ -1639,7 +1637,7 @@  discard block
 block discarded – undo
1639 1637
         $qCarga = 0;
1640 1638
         foreach ($this->infQ as $infQ) {
1641 1639
             if ($this->getTagValue($infQ, "cUnid") == '03') {
1642
-                $qCarga += (float)$this->getTagValue($infQ, "qCarga");
1640
+                $qCarga += (float) $this->getTagValue($infQ, "qCarga");
1643 1641
             }
1644 1642
         }
1645 1643
         $texto = !empty($qCarga) ? number_format($qCarga, 3, ",", ".") : '';
@@ -3569,7 +3567,7 @@  discard block
 block discarded – undo
3569 3567
         $y = $y + 5;
3570 3568
         $this->pdf->line($x, $y + 3, $w * 0.255, $y + 3); // LINHA HORIZONTAL ACIMA DO RG ABAIXO DO NOME
3571 3569
         $texto = 'RG';
3572
-        $aFont = ['font' => $this->fontePadrao,'size' => 6,'style' => ''];
3570
+        $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3573 3571
         $this->pdf->textBox($x, $y + 3, $w * 0.33, $h, $texto, $aFont, 'T', 'L', 0, '');
3574 3572
         $x += $w * 0.85;
3575 3573
         $this->pdf->line($x, $y + 11.5, $x, $y - 5); // LINHA VERTICAL PROXIMO AO CT-E
Please login to merge, or discard this patch.
src/CTe/DacteOS.php 1 patch
Spacing   +20 added lines, -21 removed lines patch added patch discarded remove patch
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
             $y += 19;
268 268
             $x = $xInic;
269 269
             $r = $this->seguro($x, $y);
270
-            $y = $y-12;
270
+            $y = $y - 12;
271 271
             switch ($this->modal) {
272 272
                 case '1':
273 273
                     $y += 24.9;
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
             'font' => $this->fontePadrao,
438 438
             'size' => 7,
439 439
             'style' => '');
440
-        $fone = $this->getTagValue($this->enderEmit, "fone")!=""? $this->formatFone($this->enderEmit):'';
440
+        $fone = $this->getTagValue($this->enderEmit, "fone") != "" ? $this->formatFone($this->enderEmit) : '';
441 441
         $lgr = $this->getTagValue($this->enderEmit, "xLgr");
442 442
         $nro = $this->getTagValue($this->enderEmit, "nro");
443 443
         $cpl = $this->getTagValue($this->enderEmit, "xCpl");
@@ -710,7 +710,7 @@  discard block
 block discarded – undo
710 710
         $this->pdf->textBox($x, $y + 12, $wa, $h, $texto, $aFont, 'T', 'C', 0, '');
711 711
 
712 712
         if ($this->qrCodMDFe !== null) {
713
-            $this->qrCodeDacteOs($y-25);
713
+            $this->qrCodeDacteOs($y - 25);
714 714
             $w = 38;
715 715
             $x += 79;
716 716
             $this->pdf->textBox($x, $y - 34, $w + 0.5, $h + 41.5);
@@ -792,7 +792,7 @@  discard block
 block discarded – undo
792 792
             $n = count($resp['message']);
793 793
             $alttot = $n * 15;
794 794
             $x = 10;
795
-            $y = $this->hPrint/2 - $alttot/2;
795
+            $y = $this->hPrint / 2 - $alttot / 2;
796 796
             $h = 15;
797 797
             $w = $maxW - (2 * $x);
798 798
             $this->pdf->settextcolor(90, 90, 90);
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
             $resp['message'][] = 'CTe NÃO PROTOCOLADO';
837 837
         } elseif ($this->getTagValue($this->ide, "tpAmb") == '2') {
838 838
             $resp['status'] = false;
839
-            $resp['message'][] =  "CTe EMITIDO EM HOMOLOGAÇÃO";
839
+            $resp['message'][] = "CTe EMITIDO EM HOMOLOGAÇÃO";
840 840
         }
841 841
         $retEvento = $this->cteProc->getElementsByTagName('retEventoCTe')->item(0);
842 842
         $cStat = $this->getTagValue($this->cteProc, "cStat");
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
         } elseif (!empty($retEvento)) {
858 858
             $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0);
859 859
             $cStat = $this->getTagValue($infEvento, "cStat");
860
-            $tpEvento= $this->getTagValue($infEvento, "tpEvento");
860
+            $tpEvento = $this->getTagValue($infEvento, "tpEvento");
861 861
             $dhEvento = date("d/m/Y H:i:s", $this->toTimestamp($this->getTagValue($infEvento, "dhRegEvento")));
862 862
             $nProt = $this->getTagValue($infEvento, "nProt");
863 863
             if ($tpEvento == '110111' && ($cStat == '101' || $cStat == '151' || $cStat == '135' || $cStat == '155')) {
@@ -887,13 +887,13 @@  discard block
 block discarded – undo
887 887
      */
888 888
     protected function rodape($x, $y)
889 889
     {
890
-        $texto = "Impresso em  " . date('d/m/Y   H:i:s') . ' ' .  $this->creditos;
890
+        $texto = "Impresso em  " . date('d/m/Y   H:i:s') . ' ' . $this->creditos;
891 891
         $w = $this->wPrint - 4;
892 892
         $aFont = array(
893 893
             'font' => $this->fontePadrao,
894 894
             'size' => 6,
895 895
             'style' => '');
896
-        $this->pdf->textBox($x-1, $y+2, $w, 4, $texto, $aFont, 'T', 'L', 0, '');
896
+        $this->pdf->textBox($x - 1, $y + 2, $w, 4, $texto, $aFont, 'T', 'L', 0, '');
897 897
         $texto = $this->powered ? "Powered by NFePHP®" : '';
898 898
         $this->pdf->textBox($x, $y, $w, 0, $texto, $aFont, 'T', 'R', false, '');
899 899
     }
@@ -982,7 +982,7 @@  discard block
 block discarded – undo
982 982
         $texto = 'FONE';
983 983
         $aFont = $this->formatPadrao;
984 984
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
985
-        $texto = $this->getTagValue($this->toma, "fone")!=""? $this->formatFone($this->toma):'';
985
+        $texto = $this->getTagValue($this->toma, "fone") != "" ? $this->formatFone($this->toma) : '';
986 986
         $aFont = $this->formatNegrito;
987 987
         $this->pdf->textBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
988 988
     }
@@ -1122,7 +1122,7 @@  discard block
 block discarded – undo
1122 1122
         $aFont = $this->formatPadrao;
1123 1123
         $this->pdf->textBox($x, $y, $w * 0.14, $h, $texto, $aFont, 'T', 'L', 0, '');
1124 1124
 
1125
-        $wCol02=0.18;
1125
+        $wCol02 = 0.18;
1126 1126
         $x += $w * $wCol02;
1127 1127
         $this->pdf->line($x, $y, $x, $y + 9.5);
1128 1128
         $texto = 'ALÍQ ICMS';
@@ -1198,7 +1198,7 @@  discard block
 block discarded – undo
1198 1198
         $x += $w * $wCol02;
1199 1199
 
1200 1200
         $texto = !empty($this->ICMS->getElementsByTagName("pRedBC")->item(0)->nodeValue) ?
1201
-            number_format($this->getTagValue($this->ICMS, "pRedBC"), 2, ",", ".").'%' :'';
1201
+            number_format($this->getTagValue($this->ICMS, "pRedBC"), 2, ",", ".") . '%' : '';
1202 1202
         $aFont = $this->formatNegrito;
1203 1203
         $this->pdf->textBox($x, $y, $w * $wCol02, $h, $texto, $aFont, 'T', 'L', 0, '');
1204 1204
 
@@ -1426,14 +1426,14 @@  discard block
 block discarded – undo
1426 1426
             $texto .= $xObs;
1427 1427
         }
1428 1428
         $textoObs = explode("Motorista:", $texto);
1429
-        $textoObs[1] = isset($textoObs[1]) ? "Motorista: ".$textoObs[1]: '';
1429
+        $textoObs[1] = isset($textoObs[1]) ? "Motorista: " . $textoObs[1] : '';
1430 1430
         $texto .= $this->getTagValue($this->imp, "infAdFisco", "\r\n");
1431 1431
         $aFont = array(
1432 1432
             'font' => $this->fontePadrao,
1433 1433
             'size' => 7.5,
1434 1434
             'style' => '');
1435 1435
         $this->pdf->textBox($x, $y, $w, $h, $textoObs[0], $aFont, 'T', 'L', 0, '', false);
1436
-        $this->pdf->textBox($x, $y+11.5, $w, $h, $textoObs[1], $aFont, 'T', 'L', 0, '', false);
1436
+        $this->pdf->textBox($x, $y + 11.5, $w, $h, $textoObs[1], $aFont, 'T', 'L', 0, '', false);
1437 1437
     }
1438 1438
 
1439 1439
     /**
@@ -1471,7 +1471,7 @@  discard block
 block discarded – undo
1471 1471
         $aFont = $this->formatPadrao;
1472 1472
         $this->pdf->textBox($x, $y, $w * 0.33, $h, $texto, $aFont, 'T', 'L', 0, '');
1473 1473
 
1474
-        $wCol02=0.33;
1474
+        $wCol02 = 0.33;
1475 1475
         $x += $w * $wCol02;
1476 1476
         $this->pdf->line($x, $y, $x, $y + 9.5);
1477 1477
         $texto = 'NÚMERO DA APÓLICE';
@@ -1530,7 +1530,7 @@  discard block
 block discarded – undo
1530 1530
         $aFont = $this->formatPadrao;
1531 1531
         $this->pdf->textBox($x, $y, $w * 0.14, $h, $texto, $aFont, 'T', 'L', 0, '');
1532 1532
 
1533
-        $wCol02=0.18;
1533
+        $wCol02 = 0.18;
1534 1534
         $x += $w * $wCol02;
1535 1535
         $this->pdf->line($x, $y, $x, $y + 9.5);
1536 1536
         $texto = 'PLACA DO VEÍCULO';
@@ -1572,8 +1572,7 @@  discard block
 block discarded – undo
1572 1572
         $x += $w * $wCol02;
1573 1573
 
1574 1574
         $texto = !empty($this->getTagValue($this->veic->item(0), "CPF")) ?
1575
-            $this->getTagValue($this->veic->item(0), "CPF") :
1576
-            (!empty($this->getTagValue($this->veic->item(0), "CNPJ")) ?
1575
+            $this->getTagValue($this->veic->item(0), "CPF") : (!empty($this->getTagValue($this->veic->item(0), "CNPJ")) ?
1577 1576
             $this->getTagValue($this->veic->item(0), "CNPJ") : '');
1578 1577
         $aFont = $this->formatNegrito;
1579 1578
         $this->pdf->textBox($x, $y, $w * $wCol02, $h, $texto, $aFont, 'T', 'L', 0, '');
@@ -2042,7 +2041,7 @@  discard block
 block discarded – undo
2042 2041
      */
2043 2042
     protected function canhoto($x = 0, $y = 0)
2044 2043
     {
2045
-        $this->pdf->dashedHLine($x, $y+2, $this->wPrint, 0.1, 80);
2044
+        $this->pdf->dashedHLine($x, $y + 2, $this->wPrint, 0.1, 80);
2046 2045
         $y = $y + 2;
2047 2046
         $oldX = $x;
2048 2047
         $oldY = $y;
@@ -2081,7 +2080,7 @@  discard block
 block discarded – undo
2081 2080
 
2082 2081
         $this->pdf->line($x, $y, $x, $y + 16.5);
2083 2082
 
2084
-        $texto = 'TÉRMINO DA PRESTAÇÃO - DATA/HORA' . "\r\n" . "\r\n" . "\r\n". "\r\n";
2083
+        $texto = 'TÉRMINO DA PRESTAÇÃO - DATA/HORA' . "\r\n" . "\r\n" . "\r\n" . "\r\n";
2085 2084
         $texto .= ' INÍCIO DA PRESTAÇÃO - DATA/HORA';
2086 2085
         $aFont = array(
2087 2086
             'font' => $this->fontePadrao,
@@ -2091,14 +2090,14 @@  discard block
 block discarded – undo
2091 2090
         $x = $oldX;
2092 2091
         $y = $y + 5;
2093 2092
 
2094
-        $this->pdf->line($x, $y+3, $w * 0.255, $y+3); // LINHA HORIZONTAL ACIMA DO RG ABAIXO DO NOME
2093
+        $this->pdf->line($x, $y + 3, $w * 0.255, $y + 3); // LINHA HORIZONTAL ACIMA DO RG ABAIXO DO NOME
2095 2094
 
2096 2095
         $texto = 'RG';
2097 2096
         $aFont = array(
2098 2097
             'font' => $this->fontePadrao,
2099 2098
             'size' => 6,
2100 2099
             'style' => '');
2101
-        $this->pdf->textBox($x, $y+3, $w * 0.33, $h, $texto, $aFont, 'T', 'L', 0, '');
2100
+        $this->pdf->textBox($x, $y + 3, $w * 0.33, $h, $texto, $aFont, 'T', 'L', 0, '');
2102 2101
         $x += $w * 0.85;
2103 2102
 
2104 2103
         $this->pdf->line($x, $y + 11.5, $x, $y - 5); // LINHA VERTICAL PROXIMO AO CT-E
Please login to merge, or discard this patch.
src/MDFe/Damdfe.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     protected $yDados = 0;
27 27
     protected $xml; // string XML NFe
28 28
     protected $errMsg = ''; // mesagens de erro
29
-    protected $errStatus = false;// status de erro TRUE um erro ocorreu false sem erros
29
+    protected $errStatus = false; // status de erro TRUE um erro ocorreu false sem erros
30 30
     protected $formatoChave = "#### #### #### #### #### #### #### #### #### #### ####";
31 31
     protected $margemInterna = 2;
32 32
     protected $id;
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
         } elseif ($this->getTagValue($this->ide, "tpAmb") == '2') {
395 395
             $resp['status'] = false;
396 396
             $resp['valida'] = false;
397
-            $resp['message'][] =  "MDFe EMITIDA EM HOMOLOGAÇÃO";
397
+            $resp['message'][] = "MDFe EMITIDA EM HOMOLOGAÇÃO";
398 398
         }
399 399
         $retEvento = $this->mdfeProc->getElementsByTagName('retEventoMDFe')->item(0);
400 400
         $cStat = $this->getTagValue($this->mdfeProc, "cStat");
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
         } elseif (!empty($retEvento)) {
421 421
             $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0);
422 422
             $cStat = $this->getTagValue($infEvento, "cStat");
423
-            $tpEvento= $this->getTagValue($infEvento, "tpEvento");
423
+            $tpEvento = $this->getTagValue($infEvento, "tpEvento");
424 424
             $dhEvento = date("d/m/Y H:i:s", $this->toTimestamp($this->getTagValue($infEvento, "dhRegEvento")));
425 425
             $nProt = $this->getTagValue($infEvento, "nProt");
426 426
             if ($tpEvento == '110111' && ($cStat == '101' || $cStat == '151' || $cStat == '135' || $cStat == '155')) {
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
             $n = count($resp['message']);
556 556
             $alttot = $n * 15;
557 557
             $x = 10;
558
-            $y = $this->hPrint/2 - $alttot/2;
558
+            $y = $this->hPrint / 2 - $alttot / 2;
559 559
             $h = 15;
560 560
             $w = $maxW - (2 * $x);
561 561
             $this->pdf->settextcolor(90, 90, 90);
@@ -1229,7 +1229,7 @@  discard block
 block discarded – undo
1229 1229
         $aFont = array('font' => $this->fontePadrao, 'size' => 8, 'style' => '');
1230 1230
         $this->pdf->textBox($x, $y, $x2, 8, $texto, $aFont, 'T', 'L', 0, '', false);
1231 1231
         //$y = $this->hPrint - 4;
1232
-        $y = $this->hPrint+8;
1232
+        $y = $this->hPrint + 8;
1233 1233
         $texto = "Impresso em  " . date('d/m/Y H:i:s') . ' ' . $this->creditos;
1234 1234
         $w = $this->wPrint - 4;
1235 1235
         $aFont = array('font' => $this->fontePadrao, 'size' => 6, 'style' => 'I');
Please login to merge, or discard this patch.