Completed
Pull Request — master (#430)
by Roberto
03:08 queued 11s
created
src/CTe/Dacte.php 2 patches
Doc Comments   +45 added lines, -46 removed lines patch added patch discarded remove patch
@@ -98,6 +98,9 @@  discard block
 block discarded – undo
98 98
         $this->loadDoc($xml);
99 99
     }
100 100
 
101
+    /**
102
+     * @param string $xml
103
+     */
101 104
     private function loadDoc($xml)
102 105
     {
103 106
         $this->xml = $xml;
@@ -211,10 +214,6 @@  discard block
 block discarded – undo
211 214
      * A definição de margens e posições iniciais para a impressão são estabelecidas no
212 215
      * pelo conteúdo da funçao e podem ser modificados.
213 216
      *
214
-     * @param string $orientacao (Opcional) Estabelece a orientação da
215
-     *                impressão (ex. P-retrato), se nada for fornecido será
216
-     *                usado o padrão da NFe
217
-     * @param string $papel (Opcional) Estabelece o tamanho do papel (ex. A4)
218 217
      * @return string O ID da NFe numero de 44 digitos extraido do arquivo XML
219 218
      */
220 219
     protected function monta(
@@ -441,8 +440,8 @@  discard block
 block discarded – undo
441 440
      * cabecalho
442 441
      * Monta o cabelhalho da DACTE ( retrato e paisagem )
443 442
      *
444
-     * @param number $x Posição horizontal inicial, canto esquerdo
445
-     * @param number $y Posição vertical inicial, canto superior
443
+     * @param integer $x Posição horizontal inicial, canto esquerdo
444
+     * @param integer $y Posição vertical inicial, canto superior
446 445
      * @param number $pag Número da Página
447 446
      * @param number $totPag Total de páginas
448 447
      * @return number Posição vertical final
@@ -1096,8 +1095,7 @@  discard block
 block discarded – undo
1096 1095
      * rodapeDACTE
1097 1096
      * Monta o rodape no final da DACTE ( retrato e paisagem )
1098 1097
      *
1099
-     * @param number $xInic Posição horizontal canto esquerdo
1100
-     * @param number $yFinal Posição vertical final para impressão
1098
+     * @param integer $x
1101 1099
      */
1102 1100
     protected function rodape($x, $y)
1103 1101
     {
@@ -1121,8 +1119,8 @@  discard block
 block discarded – undo
1121 1119
      * remetente
1122 1120
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1123 1121
      *
1124
-     * @param number $x Posição horizontal canto esquerdo
1125
-     * @param number $y Posição vertical canto superior
1122
+     * @param integer $x Posição horizontal canto esquerdo
1123
+     * @param integer $y Posição vertical canto superior
1126 1124
      * @return number Posição vertical final
1127 1125
      */
1128 1126
     protected function remetente($x = 0, $y = 0)
@@ -1209,8 +1207,8 @@  discard block
 block discarded – undo
1209 1207
      * destinatario
1210 1208
      * Monta o campo com os dados do destinatário na DACTE.
1211 1209
      *
1212
-     * @param number $x Posição horizontal canto esquerdo
1213
-     * @param number $y Posição vertical canto superior
1210
+     * @param integer $x Posição horizontal canto esquerdo
1211
+     * @param integer $y Posição vertical canto superior
1214 1212
      * @return number Posição vertical final
1215 1213
      */
1216 1214
     protected function destinatario($x = 0, $y = 0)
@@ -1296,8 +1294,8 @@  discard block
 block discarded – undo
1296 1294
      * expedidor
1297 1295
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1298 1296
      *
1299
-     * @param number $x Posição horizontal canto esquerdo
1300
-     * @param number $y Posição vertical canto superior
1297
+     * @param integer $x Posição horizontal canto esquerdo
1298
+     * @param integer $y Posição vertical canto superior
1301 1299
      * @return number Posição vertical final
1302 1300
      */
1303 1301
     protected function expedidor($x = 0, $y = 0)
@@ -1393,8 +1391,8 @@  discard block
 block discarded – undo
1393 1391
      * recebedor
1394 1392
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1395 1393
      *
1396
-     * @param number $x Posição horizontal canto esquerdo
1397
-     * @param number $y Posição vertical canto superior
1394
+     * @param integer $x Posição horizontal canto esquerdo
1395
+     * @param integer $y Posição vertical canto superior
1398 1396
      * @return number Posição vertical final
1399 1397
      */
1400 1398
     protected function recebedor($x = 0, $y = 0)
@@ -1490,8 +1488,8 @@  discard block
 block discarded – undo
1490 1488
      * tomador
1491 1489
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1492 1490
      *
1493
-     * @param number $x Posição horizontal canto esquerdo
1494
-     * @param number $y Posição vertical canto superior
1491
+     * @param integer $x Posição horizontal canto esquerdo
1492
+     * @param integer $y Posição vertical canto superior
1495 1493
      * @return number Posição vertical final
1496 1494
      */
1497 1495
     protected function tomador($x = 0, $y = 0)
@@ -1579,8 +1577,8 @@  discard block
 block discarded – undo
1579 1577
      * descricaoCarga
1580 1578
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1581 1579
      *
1582
-     * @param number $x Posição horizontal canto esquerdo
1583
-     * @param number $y Posição vertical canto superior
1580
+     * @param integer $x Posição horizontal canto esquerdo
1581
+     * @param integer $y Posição vertical canto superior
1584 1582
      * @return number Posição vertical final
1585 1583
      */
1586 1584
     protected function descricaoCarga($x = 0, $y = 0)
@@ -1756,8 +1754,8 @@  discard block
 block discarded – undo
1756 1754
      * compValorServ
1757 1755
      * Monta o campo com os componentes da prestação de serviços.
1758 1756
      *
1759
-     * @param number $x Posição horizontal canto esquerdo
1760
-     * @param number $y Posição vertical canto superior
1757
+     * @param integer $x Posição horizontal canto esquerdo
1758
+     * @param integer $y Posição vertical canto superior
1761 1759
      * @return number Posição vertical final
1762 1760
      */
1763 1761
     protected function compValorServ($x = 0, $y = 0)
@@ -1855,8 +1853,8 @@  discard block
 block discarded – undo
1855 1853
      * impostos
1856 1854
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1857 1855
      *
1858
-     * @param number $x Posição horizontal canto esquerdo
1859
-     * @param number $y Posição vertical canto superior
1856
+     * @param integer $x Posição horizontal canto esquerdo
1857
+     * @param integer $y Posição vertical canto superior
1860 1858
      * @return number Posição vertical final
1861 1859
      */
1862 1860
     protected function impostos($x = 0, $y = 0)
@@ -2401,8 +2399,8 @@  discard block
 block discarded – undo
2401 2399
      * docOrig
2402 2400
      * Monta o campo com os documentos originarios.
2403 2401
      *
2404
-     * @param number $x Posição horizontal canto esquerdo
2405
-     * @param number $y Posição vertical canto superior
2402
+     * @param integer $x Posição horizontal canto esquerdo
2403
+     * @param integer $y Posição vertical canto superior
2406 2404
      * @return number Posição vertical final
2407 2405
      */
2408 2406
     protected function docOrig($x = 0, $y = 0)
@@ -2697,8 +2695,8 @@  discard block
 block discarded – undo
2697 2695
      * docOrigContinuacao
2698 2696
      * Monta o campo com os documentos originarios.
2699 2697
      *
2700
-     * @param number $x Posição horizontal canto esquerdo
2701
-     * @param number $y Posição vertical canto superior
2698
+     * @param integer $x Posição horizontal canto esquerdo
2699
+     * @param integer $y Posição vertical canto superior
2702 2700
      * @return number Posição vertical final
2703 2701
      */
2704 2702
     protected function docOrigContinuacao($x = 0, $y = 0)
@@ -2818,8 +2816,8 @@  discard block
 block discarded – undo
2818 2816
      * docCompl
2819 2817
      * Monta o campo com os dados do remetente na DACTE.
2820 2818
      *
2821
-     * @param number $x Posição horizontal canto esquerdo
2822
-     * @param number $y Posição vertical canto superior
2819
+     * @param integer $x Posição horizontal canto esquerdo
2820
+     * @param integer $y Posição vertical canto superior
2823 2821
      * @return number Posição vertical final
2824 2822
      */
2825 2823
     protected function docCompl($x = 0, $y = 0)
@@ -2887,8 +2885,8 @@  discard block
 block discarded – undo
2887 2885
      * observacao
2888 2886
      * Monta o campo com os dados do remetente na DACTE.
2889 2887
      *
2890
-     * @param number $x Posição horizontal canto esquerdo
2891
-     * @param number $y Posição vertical canto superior
2888
+     * @param integer $x Posição horizontal canto esquerdo
2889
+     * @param integer $y Posição vertical canto superior
2892 2890
      * @return number Posição vertical final
2893 2891
      */
2894 2892
     protected function observacao($x = 0, $y = 0)
@@ -2930,8 +2928,8 @@  discard block
 block discarded – undo
2930 2928
      * modalRod
2931 2929
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
2932 2930
      *
2933
-     * @param number $x Posição horizontal canto esquerdo
2934
-     * @param number $y Posição vertical canto superior
2931
+     * @param integer $x Posição horizontal canto esquerdo
2932
+     * @param integer $y Posição vertical canto superior
2935 2933
      * @return number Posição vertical final
2936 2934
      */
2937 2935
     protected function modalRod($x = 0, $y = 0)
@@ -2971,8 +2969,8 @@  discard block
 block discarded – undo
2971 2969
      * modalAereo
2972 2970
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
2973 2971
      *
2974
-     * @param number $x Posição horizontal canto esquerdo
2975
-     * @param number $y Posição vertical canto superior
2972
+     * @param integer $x Posição horizontal canto esquerdo
2973
+     * @param integer $y Posição vertical canto superior
2976 2974
      * @return number Posição vertical final
2977 2975
      */
2978 2976
     protected function modalAereo($x = 0, $y = 0)
@@ -3028,8 +3026,8 @@  discard block
 block discarded – undo
3028 3026
      * modalAquaviario
3029 3027
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
3030 3028
      *
3031
-     * @param number $x Posição horizontal canto esquerdo
3032
-     * @param number $y Posição vertical canto superior
3029
+     * @param integer $x Posição horizontal canto esquerdo
3030
+     * @param integer $y Posição vertical canto superior
3033 3031
      * @return number Posição vertical final
3034 3032
      */
3035 3033
     protected function modalAquaviario($x = 0, $y = 0)
@@ -3145,8 +3143,8 @@  discard block
 block discarded – undo
3145 3143
      * modalFerr
3146 3144
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
3147 3145
      *
3148
-     * @param number $x Posição horizontal canto esquerdo
3149
-     * @param number $y Posição vertical canto superior
3146
+     * @param integer $x Posição horizontal canto esquerdo
3147
+     * @param integer $y Posição vertical canto superior
3150 3148
      * @return number Posição vertical final
3151 3149
      */
3152 3150
     protected function modalFerr($x = 0, $y = 0)
@@ -3423,8 +3421,8 @@  discard block
 block discarded – undo
3423 3421
      * canhoto
3424 3422
      * Monta o campo com os dados do remetente na DACTE.
3425 3423
      *
3426
-     * @param number $x Posição horizontal canto esquerdo
3427
-     * @param number $y Posição vertical canto superior
3424
+     * @param integer $x Posição horizontal canto esquerdo
3425
+     * @param integer $y Posição vertical canto superior
3428 3426
      * @return number Posição vertical final
3429 3427
      */
3430 3428
     protected function canhoto($x = 0, $y = 0)
@@ -3497,9 +3495,10 @@  discard block
 block discarded – undo
3497 3495
      * dadosAdic
3498 3496
      * Coloca o grupo de dados adicionais da DACTE.
3499 3497
      *
3500
-     * @param number $x Posição horizontal canto esquerdo
3501
-     * @param number $y Posição vertical canto superior
3502
-     * @param number $h altura do campo
3498
+     * @param integer $x Posição horizontal canto esquerdo
3499
+     * @param double $y Posição vertical canto superior
3500
+     * @param integer $h altura do campo
3501
+     * @param integer $pag
3503 3502
      * @return number Posição vertical final
3504 3503
      */
3505 3504
     protected function dadosAdic($x, $y, $pag, $h)
@@ -3692,7 +3691,7 @@  discard block
 block discarded – undo
3692 3691
      * Fornece a imformação multiplicação de peso contida na CTe
3693 3692
      *
3694 3693
      * @param interger $U Informação de peso extraida da CTe
3695
-     * @return interger
3694
+     * @return integer
3696 3695
      */
3697 3696
     protected function multiUniPeso($U = '')
3698 3697
     {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1341,8 +1341,7 @@  discard block
 block discarded – undo
1341 1341
             $texto = $this->getTagValue($this->enderExped, "xLgr") . ', ';
1342 1342
             $texto .= $this->getTagValue($this->enderExped, "nro");
1343 1343
             $texto .= $this->getTagValue($this->enderExped, "xCpl") != "" ?
1344
-                ' - ' . $this->getTagValue($this->enderExped, "xCpl") :
1345
-                '';
1344
+                ' - ' . $this->getTagValue($this->enderExped, "xCpl") : '';
1346 1345
         } else {
1347 1346
             $texto = '';
1348 1347
         }
@@ -1438,8 +1437,7 @@  discard block
 block discarded – undo
1438 1437
             $texto = $this->getTagValue($this->enderReceb, "xLgr") . ', ';
1439 1438
             $texto .= $this->getTagValue($this->enderReceb, "nro");
1440 1439
             $texto .= ($this->getTagValue($this->enderReceb, "xCpl") != "") ?
1441
-                ' - ' . $this->getTagValue($this->enderReceb, "xCpl") :
1442
-                '';
1440
+                ' - ' . $this->getTagValue($this->enderReceb, "xCpl") : '';
1443 1441
         } else {
1444 1442
             $texto = '';
1445 1443
         }
@@ -1643,7 +1641,7 @@  discard block
 block discarded – undo
1643 1641
         $qCarga = 0;
1644 1642
         foreach ($this->infQ as $infQ) {
1645 1643
             if (in_array($this->getTagValue($infQ, "cUnid"), array('01', '02'))) {
1646
-                $qCarga += (float)$this->getTagValue($infQ, "qCarga");
1644
+                $qCarga += (float) $this->getTagValue($infQ, "qCarga");
1647 1645
             }
1648 1646
         }
1649 1647
         $texto = 'PESO BRUTO (KG)';
@@ -1694,7 +1692,7 @@  discard block
 block discarded – undo
1694 1692
         $qCarga = 0;
1695 1693
         foreach ($this->infQ as $infQ) {
1696 1694
             if ($this->getTagValue($infQ, "cUnid") == '00') {
1697
-                $qCarga += (float)$this->getTagValue($infQ, "qCarga");
1695
+                $qCarga += (float) $this->getTagValue($infQ, "qCarga");
1698 1696
             }
1699 1697
         }
1700 1698
         $texto = !empty($qCarga) ? number_format($qCarga, 3, ",", ".") : '';
@@ -1711,7 +1709,7 @@  discard block
 block discarded – undo
1711 1709
         $qCarga = 0;
1712 1710
         foreach ($this->infQ as $infQ) {
1713 1711
             if ($this->getTagValue($infQ, "cUnid") == '03') {
1714
-                $qCarga += (float)$this->getTagValue($infQ, "qCarga");
1712
+                $qCarga += (float) $this->getTagValue($infQ, "qCarga");
1715 1713
             }
1716 1714
         }
1717 1715
         $texto = !empty($qCarga) ? number_format($qCarga, 3, ",", ".") : '';
@@ -3641,7 +3639,7 @@  discard block
 block discarded – undo
3641 3639
         $y = $y + 5;
3642 3640
         $this->pdf->line($x, $y + 3, $w * 0.255, $y + 3); // LINHA HORIZONTAL ACIMA DO RG ABAIXO DO NOME
3643 3641
         $texto = 'RG';
3644
-        $aFont = ['font' => $this->fontePadrao,'size' => 6,'style' => ''];
3642
+        $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3645 3643
         $this->pdf->textBox($x, $y + 3, $w * 0.33, $h, $texto, $aFont, 'T', 'L', 0, '');
3646 3644
         $x += $w * 0.85;
3647 3645
         $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/Common/DaCommon.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             //ativar modo debug
122 122
             error_reporting(E_ALL);
123 123
             ini_set('display_errors', 'On');
124
-            set_error_handler(function (int $errnum, string $errmsg, string $errfile, int $errline) {
124
+            set_error_handler(function(int $errnum, string $errmsg, string $errfile, int $errline) {
125 125
                 throw new \Exception("Erro identificado $errnum: '$errmsg' $errfile [linha:" . $errline . "]");
126 126
             });
127 127
         } else {
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
         }
276 276
         if (substr($logo, 0, 24) !== 'data://text/plain;base64') {
277 277
             if (is_file($logo)) {
278
-                $logo = 'data://text/plain;base64,'. base64_encode(file_get_contents($logo));
278
+                $logo = 'data://text/plain;base64,' . base64_encode(file_get_contents($logo));
279 279
             } else {
280 280
                 //se não é uma string e nem um file retorna nulo
281 281
                 return null;
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
         imagedestroy($image);
318 318
         $logo = ob_get_contents(); // read from buffer
319 319
         ob_end_clean();
320
-        return 'data://text/plain;base64,'.base64_encode($logo);
320
+        return 'data://text/plain;base64,' . base64_encode($logo);
321 321
     }
322 322
 
323 323
     /**
Please login to merge, or discard this patch.
src/NFe/Danfe.php 2 patches
Doc Comments   +27 added lines, -19 removed lines patch added patch discarded remove patch
@@ -875,8 +875,8 @@  discard block
 block discarded – undo
875 875
      *header
876 876
      * Monta o cabelhalho da DANFE (retrato e paisagem)
877 877
      *
878
-     * @param number $x      Posição horizontal inicial, canto esquerdo
879
-     * @param number $y      Posição vertical inicial, canto superior
878
+     * @param integer $x      Posição horizontal inicial, canto esquerdo
879
+     * @param integer $y      Posição vertical inicial, canto superior
880 880
      * @param number $pag    Número da Página
881 881
      * @param number $totPag Total de páginas
882 882
      *
@@ -1265,8 +1265,8 @@  discard block
 block discarded – undo
1265 1265
      *
1266 1266
      * @name   destinatarioDANFE
1267 1267
      *
1268
-     * @param number $x Posição horizontal canto esquerdo
1269
-     * @param number $y Posição vertical canto superior
1268
+     * @param integer $x Posição horizontal canto esquerdo
1269
+     * @param integer $y Posição vertical canto superior
1270 1270
      *
1271 1271
      * @return number Posição vertical final
1272 1272
      */
@@ -1480,8 +1480,8 @@  discard block
 block discarded – undo
1480 1480
      *
1481 1481
      * @name   localEntregaDANFE
1482 1482
      *
1483
-     * @param number $x Posição horizontal canto esquerdo
1484
-     * @param number $y Posição vertical canto superior
1483
+     * @param integer $x Posição horizontal canto esquerdo
1484
+     * @param integer $y Posição vertical canto superior
1485 1485
      *
1486 1486
      * @return number Posição vertical final
1487 1487
      */
@@ -1633,8 +1633,8 @@  discard block
 block discarded – undo
1633 1633
      *
1634 1634
      * @name   localretiradaDANFE
1635 1635
      *
1636
-     * @param number $x Posição horizontal canto esquerdo
1637
-     * @param number $y Posição vertical canto superior
1636
+     * @param integer $x Posição horizontal canto esquerdo
1637
+     * @param integer $y Posição vertical canto superior
1638 1638
      *
1639 1639
      * @return number Posição vertical final
1640 1640
      */
@@ -1785,7 +1785,7 @@  discard block
 block discarded – undo
1785 1785
      * Gera a String do Texto da Fatura
1786 1786
      *
1787 1787
      * @name   getTextoFatura
1788
-     * @return uma String com o texto ou "";
1788
+     * @return string String com o texto ou "";
1789 1789
      */
1790 1790
     protected function getTextoFatura()
1791 1791
     {
@@ -1843,8 +1843,8 @@  discard block
 block discarded – undo
1843 1843
      *
1844 1844
      * @name   fatura
1845 1845
      *
1846
-     * @param number $x Posição horizontal canto esquerdo
1847
-     * @param number $y Posição vertical canto superior
1846
+     * @param integer $x Posição horizontal canto esquerdo
1847
+     * @param double $y Posição vertical canto superior
1848 1848
      *
1849 1849
      * @return number Posição vertical final
1850 1850
      */
@@ -1971,8 +1971,8 @@  discard block
 block discarded – undo
1971 1971
      *
1972 1972
      * @name   pagamento
1973 1973
      *
1974
-     * @param number $x Posição horizontal canto esquerdo
1975
-     * @param number $y Posição vertical canto superior
1974
+     * @param integer $x Posição horizontal canto esquerdo
1975
+     * @param double $y Posição vertical canto superior
1976 1976
      *
1977 1977
      * @return number Posição vertical final
1978 1978
      */
@@ -2105,6 +2105,8 @@  discard block
 block discarded – undo
2105 2105
      * @param float $h Altura do campo
2106 2106
      * @param float $h Título do campo
2107 2107
      * @param float $h Valor do imposto
2108
+     * @param string $titulo
2109
+     * @param string $campoImposto
2108 2110
      *
2109 2111
      * @return float Sugestão do $x do próximo imposto
2110 2112
      */
@@ -2133,10 +2135,10 @@  discard block
 block discarded – undo
2133 2135
      * imposto
2134 2136
      * Monta o campo de impostos e totais da DANFE (retrato e paisagem)
2135 2137
      *
2136
-     * @param number $x Posição horizontal canto esquerdo
2137
-     * @param number $y Posição vertical canto superior
2138
+     * @param integer $x Posição horizontal canto esquerdo
2139
+     * @param double $y Posição vertical canto superior
2138 2140
      *
2139
-     * @return number Posição vertical final
2141
+     * @return double Posição vertical final
2140 2142
      */
2141 2143
     protected function imposto($x, $y)
2142 2144
     {
@@ -2531,6 +2533,10 @@  discard block
 block discarded – undo
2531 2533
     } //fim transporte
2532 2534
 
2533 2535
 
2536
+    /**
2537
+     * @param string $campo
2538
+     * @param string $formato
2539
+     */
2534 2540
     protected function descricaoProdutoHelper($origem, $campo, $formato)
2535 2541
     {
2536 2542
         $valor_original = $origem->getElementsByTagName($campo)->item(0);
@@ -2640,7 +2646,6 @@  discard block
 block discarded – undo
2640 2646
      * @param float $x       Posição horizontal canto esquerdo
2641 2647
      * @param float $y       Posição vertical canto superior
2642 2648
      * @param float $nInicio Número do item inicial
2643
-     * @param float $max     Número do item final
2644 2649
      * @param float $hmax    Altura máxima do campo de itens em mm
2645 2650
      *
2646 2651
      * @return float Posição vertical final
@@ -3385,8 +3390,8 @@  discard block
 block discarded – undo
3385 3390
      *
3386 3391
      * @name   canhotoDANFE
3387 3392
      *
3388
-     * @param number $x Posição horizontal canto esquerdo
3389
-     * @param number $y Posição vertical canto superior
3393
+     * @param integer $x Posição horizontal canto esquerdo
3394
+     * @param integer $y Posição vertical canto superior
3390 3395
      *
3391 3396
      * @return number Posição vertical final
3392 3397
      *
@@ -3691,6 +3696,9 @@  discard block
 block discarded – undo
3691 3696
         return $saida;
3692 3697
     }
3693 3698
 
3699
+    /**
3700
+     * @param string $xml
3701
+     */
3694 3702
     private function loadDoc($xml)
3695 3703
     {
3696 3704
         $this->xml = $xml;
Please login to merge, or discard this patch.
Spacing   +232 added lines, -233 removed lines patch added patch discarded remove patch
@@ -310,39 +310,39 @@  discard block
 block discarded – undo
310 310
     {
311 311
         $this->textoAdic = '';
312 312
         //informações adicionais
313
-        $fontProduto            = [
313
+        $fontProduto = [
314 314
             'font'  => $this->fontePadrao,
315 315
             'size'  => 8,
316 316
             'style' => ''
317 317
         ];
318 318
         $k                      = $this->pdf->k;
319 319
         $this->textadicfontsize = $fontProduto['size'] / $k;
320
-        $this->textoAdic        .= $this->geraInformacoesDasNotasReferenciadas();
320
+        $this->textoAdic .= $this->geraInformacoesDasNotasReferenciadas();
321 321
         if (isset($this->infAdic)) {
322 322
             $i = 0;
323 323
             if ($this->textoAdic != '') {
324 324
                 $this->textoAdic .= ". \n";
325 325
             }
326
-            $this->textoAdic .= ! empty($this->getTagValue($this->infAdic, "infCpl"))
326
+            $this->textoAdic .= !empty($this->getTagValue($this->infAdic, "infCpl"))
327 327
                 ? 'Inf. Contribuinte: ' . $this->anfaveaDANFE($this->getTagValue($this->infAdic, "infCpl"))
328 328
                 : '';
329
-            $infPedido       = $this->geraInformacoesDaTagCompra();
329
+            $infPedido = $this->geraInformacoesDaTagCompra();
330 330
             if ($infPedido != "") {
331 331
                 $this->textoAdic .= $infPedido;
332 332
             }
333 333
             $this->textoAdic .= $this->getTagValue($this->dest, "email", ' Email do Destinatário: ');
334
-            $this->textoAdic .= ! empty($this->getTagValue($this->infAdic, "infAdFisco"))
334
+            $this->textoAdic .= !empty($this->getTagValue($this->infAdic, "infAdFisco"))
335 335
                 ? "\n Inf. fisco: " . $this->getTagValue($this->infAdic, "infAdFisco")
336 336
                 : '';
337
-            $obsCont         = $this->infAdic->getElementsByTagName("obsCont");
337
+            $obsCont = $this->infAdic->getElementsByTagName("obsCont");
338 338
             if (isset($obsCont)) {
339 339
                 foreach ($obsCont as $obs) {
340 340
                     $campo           = $obsCont->item($i)->getAttribute("xCampo");
341
-                    $xTexto          = ! empty($obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue)
341
+                    $xTexto          = !empty($obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue)
342 342
                         ? $obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue
343 343
                         : '';
344 344
                     $this->textoAdic .= "\n" . $campo . ':  ' . trim($xTexto);
345
-                    $i ++;
345
+                    $i++;
346 346
                 }
347 347
             }
348 348
         }
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
             $flagVTT  = $flagVTT && (strpos(strtolower(trim($this->textoAdic)), 'trib') ||
357 357
                     strpos(strtolower(trim($this->textoAdic)), 'imp'));
358 358
             $vTotTrib = $this->getTagValue($this->ICMSTot, 'vTotTrib');
359
-            if ($vTotTrib != '' && ! $flagVTT) {
359
+            if ($vTotTrib != '' && !$flagVTT) {
360 360
                 $this->textoAdic .= "\n Valor Aproximado dos Tributos : R$ "
361 361
                     . number_format($vTotTrib, 2, ",", ".");
362 362
             }
@@ -367,9 +367,9 @@  discard block
 block discarded – undo
367 367
         $this->textadicfontsize = $this->pdf->fontSize;
368 368
         $hdadosadic             = ceil($numlinhasdados * ($this->textadicfontsize));
369 369
         if ($hdadosadic > 70) {
370
-            for ($f = 8; $f > 3; $f --) {
370
+            for ($f = 8; $f > 3; $f--) {
371 371
                 $this->pdf->setFont($this->fontePadrao, '', $f);
372
-                $fontProduto            = [
372
+                $fontProduto = [
373 373
                     'font'  => $this->fontePadrao,
374 374
                     'size'  => $f,
375 375
                     'style' => ''
@@ -497,9 +497,9 @@  discard block
 block discarded – undo
497 497
         $this->hdadosadic = $this->calculoEspacoVericalDadosAdicionais();
498 498
 
499 499
         //altura disponivel para os campos da DANFE
500
-        $hcabecalho    = 47;//para cabeçalho
501
-        $hdestinatario = 25;//para destinatario
502
-        $hduplicatas   = 12;//para cada grupo de 7 duplicatas
500
+        $hcabecalho    = 47; //para cabeçalho
501
+        $hdestinatario = 25; //para destinatario
502
+        $hduplicatas   = 12; //para cada grupo de 7 duplicatas
503 503
         if (isset($this->entrega)) {
504 504
             $hlocalentrega = 25;
505 505
         } else {
@@ -510,11 +510,11 @@  discard block
 block discarded – undo
510 510
         } else {
511 511
             $hlocalretirada = 0;
512 512
         }
513
-        $himposto    = 18;// para imposto
514
-        $htransporte = 25;// para transporte
515
-        $hissqn      = 11;// para issqn
516
-        $hfooter     = 5;// para rodape
517
-        $hCabecItens = 4;//cabeçalho dos itens
513
+        $himposto    = 18; // para imposto
514
+        $htransporte = 25; // para transporte
515
+        $hissqn      = 11; // para issqn
516
+        $hfooter     = 5; // para rodape
517
+        $hCabecItens = 4; //cabeçalho dos itens
518 518
         $hOCUPADA    = $hcabecalho
519 519
             + $hdestinatario
520 520
             + $hlocalentrega
@@ -537,10 +537,10 @@  discard block
 block discarded – undo
537 537
         $this->sizeExtraTextoFatura());*/
538 538
 
539 539
         if ($this->orientacao == 'P') {
540
-            $hDispo1 -= 24 * $this->qCanhoto;//para canhoto
541
-            $w       = $this->wPrint;
540
+            $hDispo1 -= 24 * $this->qCanhoto; //para canhoto
541
+            $w = $this->wPrint;
542 542
         } else {
543
-            $hcanhoto = $this->hPrint;//para canhoto
543
+            $hcanhoto = $this->hPrint; //para canhoto
544 544
             $w        = $this->wPrint - $this->wCanhoto;
545 545
         }
546 546
         //$hDispo1 += 14;
@@ -561,18 +561,18 @@  discard block
 block discarded – undo
561 561
             $prod = $itemProd->getElementsByTagName('prod')->item(0);
562 562
             $uCom = $prod->getElementsByTagName("uCom")->item(0)->nodeValue;
563 563
             $uTrib = $prod->getElementsByTagName("uTrib")->item(0);
564
-            if (! empty($uTrib) && strcmp($uCom, $uTrib->nodeValue) != 0) {
564
+            if (!empty($uTrib) && strcmp($uCom, $uTrib->nodeValue) != 0) {
565 565
                 $mostrarUnidadeTributavel = true;
566 566
             }
567 567
 
568 568
             $hUsado += $this->calculeHeight($itemProd, $mostrarUnidadeTributavel);
569 569
             if ($hUsado > $hDispo) {
570
-                $totPag ++;
570
+                $totPag++;
571 571
                 $hDispo = $hDispo2;
572 572
                 $hUsado = $hCabecItens;
573
-                $i --; // decrementa para readicionar o item que não coube nessa pagina na outra.
573
+                $i--; // decrementa para readicionar o item que não coube nessa pagina na outra.
574 574
             }
575
-            $i ++;
575
+            $i++;
576 576
         } //fim da soma das areas de itens usadas
577 577
         $qtdeItens = $i; //controle da quantidade de itens no DANFE
578 578
         //montagem da primeira página
@@ -604,7 +604,7 @@  discard block
 block discarded – undo
604 604
         $formaPag = [];
605 605
         if (isset($this->detPag) && $this->detPag->length > 0) {
606 606
             foreach ($this->detPag as $k => $d) {
607
-                $fPag            = ! empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
607
+                $fPag            = !empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
608 608
                     ? $this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue
609 609
                     : '0';
610 610
                 $formaPag[$fPag] = $fPag;
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
         }
649 649
 
650 650
         //loop para páginas seguintes
651
-        for ($n = 2; $n <= $totPag; $n ++) {
651
+        for ($n = 2; $n <= $totPag; $n++) {
652 652
             // fixa as margens
653 653
             $this->pdf->setMargins($this->margesq, $this->margsup);
654 654
             //adiciona nova página
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
             }
673 673
             //se estiver na última página e ainda restar itens para inserir, adiciona mais uma página
674 674
             if ($n == $totPag && $this->qtdeItensProc < $qtdeItens) {
675
-                $totPag ++;
675
+                $totPag++;
676 676
             }
677 677
         }
678 678
     }
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
         if ($startPos === false) {
702 702
             return $cdata;
703 703
         }
704
-        for ($x = $len; $x > 0; $x --) {
704
+        for ($x = $len; $x > 0; $x--) {
705 705
             if (substr($cdata, $x, 1) == '>') {
706 706
                 $endPos = $x;
707 707
                 break;
@@ -794,15 +794,15 @@  discard block
 block discarded – undo
794 794
         //grupo CADATA infCpl
795 795
         $t          = $dom->getElementsByTagName('transmissor')->item(0);
796 796
         $r          = $dom->getElementsByTagName('receptor')->item(0);
797
-        $versao     = ! empty($dom->getElementsByTagName('versao')->item(0)->nodeValue) ?
797
+        $versao     = !empty($dom->getElementsByTagName('versao')->item(0)->nodeValue) ?
798 798
             'Versao:' . $dom->getElementsByTagName('versao')->item(0)->nodeValue . ' ' : '';
799
-        $especieNF  = ! empty($dom->getElementsByTagName('especieNF')->item(0)->nodeValue) ?
799
+        $especieNF  = !empty($dom->getElementsByTagName('especieNF')->item(0)->nodeValue) ?
800 800
             'Especie:' . $dom->getElementsByTagName('especieNF')->item(0)->nodeValue . ' ' : '';
801
-        $fabEntrega = ! empty($dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue) ?
801
+        $fabEntrega = !empty($dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue) ?
802 802
             'Entrega:' . $dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue . ' ' : '';
803
-        $dca        = ! empty($dom->getElementsByTagName('dca')->item(0)->nodeValue) ?
803
+        $dca        = !empty($dom->getElementsByTagName('dca')->item(0)->nodeValue) ?
804 804
             'dca:' . $dom->getElementsByTagName('dca')->item(0)->nodeValue . ' ' : '';
805
-        $texto      .= "" . $versao . $especieNF . $fabEntrega . $dca;
805
+        $texto .= "" . $versao . $especieNF . $fabEntrega . $dca;
806 806
         if (isset($t)) {
807 807
             if ($t->hasAttributes()) {
808 808
                 $texto .= " Transmissor ";
@@ -844,7 +844,7 @@  discard block
 block discarded – undo
844 844
             $resp['message'][] = 'NFe NÃO PROTOCOLADA';
845 845
         } elseif ($this->getTagValue($this->ide, "tpAmb") == '2') {
846 846
             $resp['status'] = false;
847
-            $resp['message'][] =  "NFe EMITIDA EM HOMOLOGAÇÃO";
847
+            $resp['message'][] = "NFe EMITIDA EM HOMOLOGAÇÃO";
848 848
         }
849 849
         $retEvento = $this->nfeProc->getElementsByTagName('retEvento')->item(0);
850 850
         $cStat = $this->getTagValue($this->nfeProc, "cStat");
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
         } elseif (!empty($retEvento)) {
866 866
             $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0);
867 867
             $cStat = $this->getTagValue($infEvento, "cStat");
868
-            $tpEvento= $this->getTagValue($infEvento, "tpEvento");
868
+            $tpEvento = $this->getTagValue($infEvento, "tpEvento");
869 869
             $dhEvento = date("d/m/Y H:i:s", $this->toTimestamp($this->getTagValue($infEvento, "dhRegEvento")));
870 870
             $nProt = $this->getTagValue($infEvento, "nProt");
871 871
             if ($tpEvento == '110111' && ($cStat == '101' || $cStat == '151' || $cStat == '135' || $cStat == '155')) {
@@ -879,7 +879,7 @@  discard block
 block discarded – undo
879 879
 
880 880
     protected function notaDPEC()
881 881
     {
882
-        return ! empty($this->numdepec);
882
+        return !empty($this->numdepec);
883 883
     }
884 884
 
885 885
     /**
@@ -928,7 +928,7 @@  discard block
 block discarded – undo
928 928
         //se for right separa 2/3 para os dados e o terço seguinte para o logo
929 929
         //se não houver logo centraliza dos dados do emitente
930 930
         // coloca o logo
931
-        if (! empty($this->logomarca)) {
931
+        if (!empty($this->logomarca)) {
932 932
             $logoInfo = getimagesize($this->logomarca);
933 933
             //largura da imagem em mm
934 934
             $logoWmm = ($logoInfo[0] / 72) * 25.4;
@@ -984,7 +984,7 @@  discard block
 block discarded – undo
984 984
             //endereço
985 985
             $y1     = $y1 + 5;
986 986
             $aFont  = ['font' => $this->fontePadrao, 'size' => 8, 'style' => ''];
987
-            $fone   = ! empty($this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue)
987
+            $fone   = !empty($this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue)
988 988
                 ? $this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue
989 989
                 : '';
990 990
             $lgr    = $this->getTagValue($this->enderEmit, "xLgr");
@@ -1003,8 +1003,8 @@  discard block
 block discarded – undo
1003 1003
 
1004 1004
         //####################################################################################
1005 1005
         //coluna central Danfe
1006
-        $x  += $w;
1007
-        $w  = round($maxW * 0.17, 0);//35;
1006
+        $x += $w;
1007
+        $w  = round($maxW * 0.17, 0); //35;
1008 1008
         $w2 = $w;
1009 1009
         $h  = 32;
1010 1010
         $this->pdf->textBox($x, $y, $w, $h);
@@ -1061,8 +1061,8 @@  discard block
 block discarded – undo
1061 1061
 
1062 1062
         //####################################################################################
1063 1063
         //coluna codigo de barras
1064
-        $x  += $w;
1065
-        $w  = ($maxW - $w1 - $w2);//85;
1064
+        $x += $w;
1065
+        $w  = ($maxW - $w1 - $w2); //85;
1066 1066
         $w3 = $w;
1067 1067
         $h  = 32;
1068 1068
         $this->pdf->textBox($x, $y, $w, $h);
@@ -1092,7 +1092,7 @@  discard block
 block discarded – undo
1092 1092
         } else {
1093 1093
             $cabecalhoProtoAutorizacao = 'PROTOCOLO DE AUTORIZAÇÃO DE USO';
1094 1094
         }
1095
-        if (($this->tpEmis == 2 || $this->tpEmis == 5) && ! $this->notaDpec()) {
1095
+        if (($this->tpEmis == 2 || $this->tpEmis == 5) && !$this->notaDpec()) {
1096 1096
             $cabecalhoProtoAutorizacao = "DADOS DA NF-E";
1097 1097
             $chaveContingencia         = $this->geraChaveAdicionalDeContingencia();
1098 1098
             $this->pdf->setFillColor(0, 0, 0);
@@ -1124,7 +1124,7 @@  discard block
 block discarded – undo
1124 1124
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1125 1125
         $w     = $w1 + $w2;
1126 1126
         $y     = $oldY;
1127
-        $oldY  += $h;
1127
+        $oldY += $h;
1128 1128
         $x     = $oldX;
1129 1129
         $h     = 7;
1130 1130
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1141,7 +1141,7 @@  discard block
 block discarded – undo
1141 1141
         // NOTA : DANFE sem protocolo deve existir somente no caso de contingência !!!
1142 1142
         // Além disso, existem várias NFes em contingência que eu recebo com protocolo de autorização.
1143 1143
         // Na minha opinião, deveríamos mostra-lo, mas o  manual  da NFe v4.01 diz outra coisa...
1144
-        if (($this->tpEmis == 2 || $this->tpEmis == 5) && ! $this->notaDpec()) {
1144
+        if (($this->tpEmis == 2 || $this->tpEmis == 5) && !$this->notaDpec()) {
1145 1145
             $aFont = ['font' => $this->fontePadrao, 'size' => 8, 'style' => 'B'];
1146 1146
             $texto = $this->formatField(
1147 1147
                 $chaveContingencia,
@@ -1155,7 +1155,7 @@  discard block
 block discarded – undo
1155 1155
                 $cStat = '';
1156 1156
             } else {
1157 1157
                 if (isset($this->nfeProc)) {
1158
-                    $texto  = ! empty($this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue)
1158
+                    $texto  = !empty($this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue)
1159 1159
                         ? $this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue
1160 1160
                         : '';
1161 1161
                     $tsHora = $this->toTimestamp(
@@ -1185,7 +1185,7 @@  discard block
 block discarded – undo
1185 1185
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1186 1186
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1187 1187
         //INSCRIÇÃO MUNICIPAL
1188
-        $x     += $w;
1188
+        $x += $w;
1189 1189
         $texto = 'INSCRIÇÃO MUNICIPAL';
1190 1190
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1191 1191
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1193,29 +1193,29 @@  discard block
 block discarded – undo
1193 1193
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1194 1194
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1195 1195
         //INSCRIÇÃO ESTADUAL DO SUBST. TRIBUT.
1196
-        $x     += $w;
1196
+        $x += $w;
1197 1197
         $texto = 'INSCRIÇÃO ESTADUAL DO SUBST. TRIBUT.';
1198 1198
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1199 1199
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1200
-        $texto = ! empty($this->emit->getElementsByTagName("IEST")->item(0)->nodeValue)
1200
+        $texto = !empty($this->emit->getElementsByTagName("IEST")->item(0)->nodeValue)
1201 1201
             ? $this->emit->getElementsByTagName("IEST")->item(0)->nodeValue
1202 1202
             : '';
1203 1203
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1204 1204
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1205 1205
         //CNPJ
1206
-        $x     += $w;
1206
+        $x += $w;
1207 1207
         $w     = ($maxW - (3 * $w));
1208 1208
         $texto = 'CNPJ';
1209 1209
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1210 1210
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1211 1211
         //Pegando valor do CPF/CNPJ
1212
-        if (! empty($this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1212
+        if (!empty($this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1213 1213
             $texto = $this->formatField(
1214 1214
                 $this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1215 1215
                 "###.###.###/####-##"
1216 1216
             );
1217 1217
         } else {
1218
-            $texto = ! empty($this->emit->getElementsByTagName("CPF")->item(0)->nodeValue)
1218
+            $texto = !empty($this->emit->getElementsByTagName("CPF")->item(0)->nodeValue)
1219 1219
                 ? $this->formatField(
1220 1220
                     $this->emit->getElementsByTagName("CPF")->item(0)->nodeValue,
1221 1221
                     "###.###.###-##"
@@ -1234,12 +1234,12 @@  discard block
 block discarded – undo
1234 1234
             $n = count($resp['message']);
1235 1235
             $alttot = $n * 15;
1236 1236
             $x = 10;
1237
-            $y = $this->hPrint/2 - $alttot/2;
1237
+            $y = $this->hPrint / 2 - $alttot / 2;
1238 1238
             $h = 15;
1239 1239
             $w = $maxW - (2 * $x);
1240 1240
             $this->pdf->settextcolor(90, 90, 90);
1241 1241
             
1242
-            foreach($resp['message'] as $msg) { 
1242
+            foreach ($resp['message'] as $msg) { 
1243 1243
                 $aFont = ['font' => $this->fontePadrao, 'size' => 48, 'style' => 'B'];
1244 1244
                 $this->pdf->textBox($x, $y, $w, $h, $msg, $aFont, 'C', 'C', 0, '');
1245 1245
                 $y += $h; 
@@ -1307,7 +1307,7 @@  discard block
 block discarded – undo
1307 1307
         //NOME / RAZÃO SOCIAL
1308 1308
         $w     = round($maxW * 0.61, 0);
1309 1309
         $w1    = $w;
1310
-        $y     += 3;
1310
+        $y += 3;
1311 1311
         $texto = 'NOME / RAZÃO SOCIAL';
1312 1312
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1313 1313
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1319,20 +1319,20 @@  discard block
 block discarded – undo
1319 1319
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, '');
1320 1320
         }
1321 1321
         //CNPJ / CPF
1322
-        $x     += $w;
1322
+        $x += $w;
1323 1323
         $w     = round($maxW * 0.23, 0);
1324 1324
         $w2    = $w;
1325 1325
         $texto = 'CNPJ / CPF';
1326 1326
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1327 1327
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1328 1328
         //Pegando valor do CPF/CNPJ
1329
-        if (! empty($this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1329
+        if (!empty($this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1330 1330
             $texto = $this->formatField(
1331 1331
                 $this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1332 1332
                 "###.###.###/####-##"
1333 1333
             );
1334 1334
         } else {
1335
-            $texto = ! empty($this->dest->getElementsByTagName("CPF")->item(0)->nodeValue)
1335
+            $texto = !empty($this->dest->getElementsByTagName("CPF")->item(0)->nodeValue)
1336 1336
                 ? $this->formatField(
1337 1337
                     $this->dest->getElementsByTagName("CPF")->item(0)->nodeValue,
1338 1338
                     "###.###.###-##"
@@ -1342,17 +1342,17 @@  discard block
 block discarded – undo
1342 1342
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1343 1343
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1344 1344
         //DATA DA EMISSÃO
1345
-        $x     += $w;
1345
+        $x += $w;
1346 1346
         $w     = $maxW - ($w1 + $w2);
1347 1347
         $wx    = $w;
1348 1348
         $texto = 'DATA DA EMISSÃO';
1349 1349
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1350 1350
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1351
-        $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue)
1351
+        $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue)
1352 1352
             ? $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue
1353 1353
             : '';
1354 1354
         if ($dEmi == '') {
1355
-            $dEmi  = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue)
1355
+            $dEmi  = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue)
1356 1356
                 ? $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue
1357 1357
                 : '';
1358 1358
             $aDemi = explode('T', $dEmi);
@@ -1368,7 +1368,7 @@  discard block
 block discarded – undo
1368 1368
         //ENDEREÇO
1369 1369
         $w     = round($maxW * 0.47, 0);
1370 1370
         $w1    = $w;
1371
-        $y     += $h;
1371
+        $y += $h;
1372 1372
         $x     = $oldX;
1373 1373
         $texto = 'ENDEREÇO';
1374 1374
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1380,7 +1380,7 @@  discard block
 block discarded – undo
1380 1380
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1381 1381
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true);
1382 1382
         //BAIRRO / DISTRITO
1383
-        $x     += $w;
1383
+        $x += $w;
1384 1384
         $w     = round($maxW * 0.21, 0);
1385 1385
         $w2    = $w;
1386 1386
         $texto = 'BAIRRO / DISTRITO';
@@ -1390,29 +1390,29 @@  discard block
 block discarded – undo
1390 1390
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1391 1391
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1392 1392
         //CEP
1393
-        $x     += $w;
1393
+        $x += $w;
1394 1394
         $w     = $maxW - $w1 - $w2 - $wx;
1395 1395
         $w2    = $w;
1396 1396
         $texto = 'CEP';
1397 1397
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1398 1398
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1399
-        $texto = ! empty($this->dest->getElementsByTagName("CEP")->item(0)->nodeValue)
1399
+        $texto = !empty($this->dest->getElementsByTagName("CEP")->item(0)->nodeValue)
1400 1400
             ? $this->dest->getElementsByTagName("CEP")->item(0)->nodeValue
1401 1401
             : '';
1402 1402
         $texto = $this->formatField($texto, "#####-###");
1403 1403
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1404 1404
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1405 1405
         //DATA DA SAÍDA
1406
-        $x     += $w;
1406
+        $x += $w;
1407 1407
         $w     = $wx;
1408 1408
         $texto = 'DATA DA SAÍDA/ENTRADA';
1409 1409
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1410 1410
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1411
-        $dSaiEnt = ! empty($this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue)
1411
+        $dSaiEnt = !empty($this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue)
1412 1412
             ? $this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue
1413 1413
             : '';
1414 1414
         if ($dSaiEnt == '') {
1415
-            $dSaiEnt  = ! empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1415
+            $dSaiEnt  = !empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1416 1416
                 ? $this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue
1417 1417
                 : '';
1418 1418
             $aDsaient = explode('T', $dSaiEnt);
@@ -1423,7 +1423,7 @@  discard block
 block discarded – undo
1423 1423
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1424 1424
         //MUNICÍPIO
1425 1425
         $w     = $w1;
1426
-        $y     += $h;
1426
+        $y += $h;
1427 1427
         $x     = $oldX;
1428 1428
         $texto = 'MUNICÍPIO';
1429 1429
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1437,7 +1437,7 @@  discard block
 block discarded – undo
1437 1437
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1438 1438
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
1439 1439
         //UF
1440
-        $x     += $w;
1440
+        $x += $w;
1441 1441
         $w     = 8;
1442 1442
         $texto = 'UF';
1443 1443
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1446,19 +1446,19 @@  discard block
 block discarded – undo
1446 1446
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1447 1447
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1448 1448
         //FONE / FAX
1449
-        $x     += $w;
1449
+        $x += $w;
1450 1450
         $w     = round(($maxW - $w1 - $wx - 8) / 2, 0);
1451 1451
         $w3    = $w;
1452 1452
         $texto = 'FONE / FAX';
1453 1453
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1454 1454
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1455
-        $texto = ! empty($this->dest->getElementsByTagName("fone")->item(0)->nodeValue)
1455
+        $texto = !empty($this->dest->getElementsByTagName("fone")->item(0)->nodeValue)
1456 1456
             ? $this->dest->getElementsByTagName("fone")->item(0)->nodeValue
1457 1457
             : '';
1458 1458
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1459 1459
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1460 1460
         //INSCRIÇÃO ESTADUAL
1461
-        $x     += $w;
1461
+        $x += $w;
1462 1462
         $w     = $maxW - $w1 - $wx - 8 - $w3;
1463 1463
         $texto = 'INSCRIÇÃO ESTADUAL';
1464 1464
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1468,16 +1468,16 @@  discard block
 block discarded – undo
1468 1468
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1469 1469
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1470 1470
         //HORA DA SAÍDA
1471
-        $x     += $w;
1471
+        $x += $w;
1472 1472
         $w     = $wx;
1473 1473
         $texto = 'HORA DA SAÍDA/ENTRADA';
1474 1474
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1475 1475
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1476
-        $hSaiEnt = ! empty($this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue)
1476
+        $hSaiEnt = !empty($this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue)
1477 1477
             ? $this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue
1478 1478
             : '';
1479 1479
         if ($hSaiEnt == '') {
1480
-            $dhSaiEnt   = ! empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1480
+            $dhSaiEnt   = !empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1481 1481
                 ? $this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue
1482 1482
                 : '';
1483 1483
             $tsDhSaiEnt = $this->toTimestamp($dhSaiEnt);
@@ -1521,7 +1521,7 @@  discard block
 block discarded – undo
1521 1521
         //NOME / RAZÃO SOCIAL
1522 1522
         $w     = round($maxW * 0.61, 0);
1523 1523
         $w1    = $w;
1524
-        $y     += 3;
1524
+        $y += 3;
1525 1525
         $texto = 'NOME / RAZÃO SOCIAL';
1526 1526
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1527 1527
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1536,20 +1536,20 @@  discard block
 block discarded – undo
1536 1536
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, '');
1537 1537
         }
1538 1538
         //CNPJ / CPF
1539
-        $x     += $w;
1539
+        $x += $w;
1540 1540
         $w     = round($maxW * 0.23, 0);
1541 1541
         $w2    = $w;
1542 1542
         $texto = 'CNPJ / CPF';
1543 1543
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1544 1544
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1545 1545
         //Pegando valor do CPF/CNPJ
1546
-        if (! empty($this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1546
+        if (!empty($this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1547 1547
             $texto = $this->formatField(
1548 1548
                 $this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1549 1549
                 "###.###.###/####-##"
1550 1550
             );
1551 1551
         } else {
1552
-            $texto = ! empty($this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1552
+            $texto = !empty($this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1553 1553
                 $this->formatField(
1554 1554
                     $this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue,
1555 1555
                     "###.###.###-##"
@@ -1558,7 +1558,7 @@  discard block
 block discarded – undo
1558 1558
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1559 1559
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1560 1560
         //INSCRIÇÃO ESTADUAL
1561
-        $x     += $w;
1561
+        $x += $w;
1562 1562
         $w     = $maxW - ($w1 + $w2);
1563 1563
         $wx    = $w;
1564 1564
         $texto = 'INSCRIÇÃO ESTADUAL';
@@ -1577,7 +1577,7 @@  discard block
 block discarded – undo
1577 1577
         //ENDEREÇO
1578 1578
         $w     = round($maxW * 0.355, 0) + $wx;
1579 1579
         $w1    = $w;
1580
-        $y     += $h;
1580
+        $y += $h;
1581 1581
         $x     = $oldX;
1582 1582
         $texto = 'ENDEREÇO';
1583 1583
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1588,7 +1588,7 @@  discard block
 block discarded – undo
1588 1588
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1589 1589
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true);
1590 1590
         //BAIRRO / DISTRITO
1591
-        $x     += $w;
1591
+        $x += $w;
1592 1592
         $w     = round($maxW * 0.335, 0);
1593 1593
         $w2    = $w;
1594 1594
         $texto = 'BAIRRO / DISTRITO';
@@ -1598,12 +1598,12 @@  discard block
 block discarded – undo
1598 1598
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1599 1599
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1600 1600
         //CEP
1601
-        $x     += $w;
1601
+        $x += $w;
1602 1602
         $w     = $maxW - ($w1 + $w2);
1603 1603
         $texto = 'CEP';
1604 1604
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1605 1605
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1606
-        $texto = ! empty($this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1606
+        $texto = !empty($this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1607 1607
             $this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue : '';
1608 1608
         $texto = $this->formatField($texto, "#####-###");
1609 1609
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
@@ -1611,7 +1611,7 @@  discard block
 block discarded – undo
1611 1611
         //MUNICÍPIO
1612 1612
         $w     = round($maxW * 0.805, 0);
1613 1613
         $w1    = $w;
1614
-        $y     += $h;
1614
+        $y += $h;
1615 1615
         $x     = $oldX;
1616 1616
         $texto = 'MUNICÍPIO';
1617 1617
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1623,7 +1623,7 @@  discard block
 block discarded – undo
1623 1623
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1624 1624
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
1625 1625
         //UF
1626
-        $x     += $w;
1626
+        $x += $w;
1627 1627
         $w     = 8;
1628 1628
         $texto = 'UF';
1629 1629
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1632,12 +1632,12 @@  discard block
 block discarded – undo
1632 1632
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1633 1633
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1634 1634
         //FONE / FAX
1635
-        $x     += $w;
1635
+        $x += $w;
1636 1636
         $w     = $maxW - $w - $w1;
1637 1637
         $texto = 'FONE / FAX';
1638 1638
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1639 1639
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1640
-        $texto = ! empty($this->entrega->getElementsByTagName("fone")->item(0)->nodeValue) ?
1640
+        $texto = !empty($this->entrega->getElementsByTagName("fone")->item(0)->nodeValue) ?
1641 1641
             $this->entrega->getElementsByTagName("fone")->item(0)->nodeValue : '';
1642 1642
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1643 1643
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
@@ -1674,7 +1674,7 @@  discard block
 block discarded – undo
1674 1674
         //NOME / RAZÃO SOCIAL
1675 1675
         $w     = round($maxW * 0.61, 0);
1676 1676
         $w1    = $w;
1677
-        $y     += 3;
1677
+        $y += 3;
1678 1678
         $texto = 'NOME / RAZÃO SOCIAL';
1679 1679
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1680 1680
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1689,20 +1689,20 @@  discard block
 block discarded – undo
1689 1689
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, '');
1690 1690
         }
1691 1691
         //CNPJ / CPF
1692
-        $x     += $w;
1692
+        $x += $w;
1693 1693
         $w     = round($maxW * 0.23, 0);
1694 1694
         $w2    = $w;
1695 1695
         $texto = 'CNPJ / CPF';
1696 1696
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1697 1697
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1698 1698
         //Pegando valor do CPF/CNPJ
1699
-        if (! empty($this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1699
+        if (!empty($this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1700 1700
             $texto = $this->formatField(
1701 1701
                 $this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1702 1702
                 "###.###.###/####-##"
1703 1703
             );
1704 1704
         } else {
1705
-            $texto = ! empty($this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1705
+            $texto = !empty($this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1706 1706
                 $this->formatField(
1707 1707
                     $this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue,
1708 1708
                     "###.###.###-##"
@@ -1711,7 +1711,7 @@  discard block
 block discarded – undo
1711 1711
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1712 1712
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1713 1713
         //INSCRIÇÃO ESTADUAL
1714
-        $x     += $w;
1714
+        $x += $w;
1715 1715
         $w     = $maxW - ($w1 + $w2);
1716 1716
         $wx    = $w;
1717 1717
         $texto = 'INSCRIÇÃO ESTADUAL';
@@ -1730,7 +1730,7 @@  discard block
 block discarded – undo
1730 1730
         //ENDEREÇO
1731 1731
         $w     = round($maxW * 0.355, 0) + $wx;
1732 1732
         $w1    = $w;
1733
-        $y     += $h;
1733
+        $y += $h;
1734 1734
         $x     = $oldX;
1735 1735
         $texto = 'ENDEREÇO';
1736 1736
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1741,7 +1741,7 @@  discard block
 block discarded – undo
1741 1741
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1742 1742
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true);
1743 1743
         //BAIRRO / DISTRITO
1744
-        $x     += $w;
1744
+        $x += $w;
1745 1745
         $w     = round($maxW * 0.335, 0);
1746 1746
         $w2    = $w;
1747 1747
         $texto = 'BAIRRO / DISTRITO';
@@ -1751,12 +1751,12 @@  discard block
 block discarded – undo
1751 1751
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1752 1752
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1753 1753
         //CEP
1754
-        $x     += $w;
1754
+        $x += $w;
1755 1755
         $w     = $maxW - ($w1 + $w2);
1756 1756
         $texto = 'CEP';
1757 1757
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1758 1758
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1759
-        $texto = ! empty($this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1759
+        $texto = !empty($this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1760 1760
             $this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue : '';
1761 1761
         $texto = $this->formatField($texto, "#####-###");
1762 1762
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
@@ -1764,7 +1764,7 @@  discard block
 block discarded – undo
1764 1764
         //MUNICÍPIO
1765 1765
         $w     = round($maxW * 0.805, 0);
1766 1766
         $w1    = $w;
1767
-        $y     += $h;
1767
+        $y += $h;
1768 1768
         $x     = $oldX;
1769 1769
         $texto = 'MUNICÍPIO';
1770 1770
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1776,7 +1776,7 @@  discard block
 block discarded – undo
1776 1776
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1777 1777
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
1778 1778
         //UF
1779
-        $x     += $w;
1779
+        $x += $w;
1780 1780
         $w     = 8;
1781 1781
         $texto = 'UF';
1782 1782
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1785,12 +1785,12 @@  discard block
 block discarded – undo
1785 1785
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1786 1786
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1787 1787
         //FONE / FAX
1788
-        $x     += $w;
1788
+        $x += $w;
1789 1789
         $w     = $maxW - $w - $w1;
1790 1790
         $texto = 'FONE / FAX';
1791 1791
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1792 1792
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1793
-        $texto = ! empty($this->retirada->getElementsByTagName("fone")->item(0)->nodeValue) ?
1793
+        $texto = !empty($this->retirada->getElementsByTagName("fone")->item(0)->nodeValue) ?
1794 1794
             $this->retirada->getElementsByTagName("fone")->item(0)->nodeValue : '';
1795 1795
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1796 1796
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
@@ -1810,7 +1810,7 @@  discard block
 block discarded – undo
1810 1810
         if (isset($this->cobr)) {
1811 1811
             $fat = $this->cobr->getElementsByTagName("fat")->item(0);
1812 1812
             if (isset($fat)) {
1813
-                if (! empty($this->getTagValue($this->ide, "indPag"))) {
1813
+                if (!empty($this->getTagValue($this->ide, "indPag"))) {
1814 1814
                     $textoIndPag = "";
1815 1815
                     $indPag      = $this->getTagValue($this->ide, "indPag");
1816 1816
                     if ($indPag === "0") {
@@ -1885,7 +1885,7 @@  discard block
 block discarded – undo
1885 1885
             $h     = 8;
1886 1886
             $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B'];
1887 1887
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1888
-            $y       += 3;
1888
+            $y += 3;
1889 1889
             $dups    = "";
1890 1890
             $dupcont = 0;
1891 1891
             $nFat    = $this->dup->length;
@@ -1919,13 +1919,13 @@  discard block
 block discarded – undo
1919 1919
             }
1920 1920
             $increm = 1;
1921 1921
             foreach ($this->dup as $k => $d) {
1922
-                $nDup  = ! empty($this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue)
1922
+                $nDup  = !empty($this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue)
1923 1923
                     ? $this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue
1924 1924
                     : '';
1925
-                $dDup  = ! empty($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue)
1925
+                $dDup  = !empty($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue)
1926 1926
                     ? $this->ymdTodmy($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue)
1927 1927
                     : '';
1928
-                $vDup  = ! empty($this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue)
1928
+                $vDup  = !empty($this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue)
1929 1929
                     ? 'R$ ' . number_format(
1930 1930
                         $this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue,
1931 1931
                         2,
@@ -1972,7 +1972,7 @@  discard block
 block discarded – undo
1972 1972
             }
1973 1973
             if ($dupcont == 0) {
1974 1974
                 $y -= 9;
1975
-                $linha --;
1975
+                $linha--;
1976 1976
             }
1977 1977
 
1978 1978
             return ($y + $h);
@@ -2012,7 +2012,7 @@  discard block
 block discarded – undo
2012 2012
             $h     = 8;
2013 2013
             $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B'];
2014 2014
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
2015
-            $y       += 3;
2015
+            $y += 3;
2016 2016
             $dups    = "";
2017 2017
             $dupcont = 0;
2018 2018
             if ($this->orientacao == 'P') {
@@ -2041,7 +2041,7 @@  discard block
 block discarded – undo
2041 2041
                 '90' => 'Sem pagamento',
2042 2042
                 '99' => 'Outros'
2043 2043
             ];
2044
-            $bandeira       = [
2044
+            $bandeira = [
2045 2045
                 '01' => 'Visa',
2046 2046
                 '02' => 'Mastercard',
2047 2047
                 '03' => 'American',
@@ -2054,10 +2054,10 @@  discard block
 block discarded – undo
2054 2054
                 '99' => 'Outros'
2055 2055
             ];
2056 2056
             foreach ($this->detPag as $k => $d) {
2057
-                $fPag  = ! empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
2057
+                $fPag  = !empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
2058 2058
                     ? $this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue
2059 2059
                     : '0';
2060
-                $vPag  = ! empty($this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue)
2060
+                $vPag  = !empty($this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue)
2061 2061
                     ? 'R$ ' . number_format(
2062 2062
                         $this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue,
2063 2063
                         2,
@@ -2100,7 +2100,7 @@  discard block
 block discarded – undo
2100 2100
             }
2101 2101
             if ($dupcont == 0) {
2102 2102
                 $y -= 9;
2103
-                $linha --;
2103
+                $linha--;
2104 2104
             }
2105 2105
 
2106 2106
             return ($y + $h);
@@ -2132,7 +2132,7 @@  discard block
 block discarded – undo
2132 2132
         $the_field    = $this->ICMSTot->getElementsByTagName($campoImposto)->item(0);
2133 2133
         if (isset($the_field)) {
2134 2134
             $the_value = $the_field->nodeValue;
2135
-            if (! empty($the_value)) {
2135
+            if (!empty($the_value)) {
2136 2136
                 $valorImposto = number_format($the_value, 2, ",", ".");
2137 2137
             }
2138 2138
         }
@@ -2161,10 +2161,10 @@  discard block
 block discarded – undo
2161 2161
         $x_inicial = $x;
2162 2162
         //#####################################################################
2163 2163
         $campos_por_linha = 9;
2164
-        if (! $this->exibirPIS) {
2165
-            $campos_por_linha --;
2164
+        if (!$this->exibirPIS) {
2165
+            $campos_por_linha--;
2166 2166
         }
2167
-        if (! $this->exibirIcmsInterestadual) {
2167
+        if (!$this->exibirIcmsInterestadual) {
2168 2168
             $campos_por_linha -= 2;
2169 2169
         }
2170 2170
 
@@ -2251,12 +2251,12 @@  discard block
 block discarded – undo
2251 2251
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
2252 2252
         //NOME / RAZÃO SOCIAL
2253 2253
         $w1    = $maxW * 0.29;
2254
-        $y     += 3;
2254
+        $y += 3;
2255 2255
         $texto = 'NOME / RAZÃO SOCIAL';
2256 2256
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2257 2257
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, '');
2258 2258
         if (isset($this->transporta)) {
2259
-            $texto = ! empty($this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue)
2259
+            $texto = !empty($this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue)
2260 2260
                 ? $this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue
2261 2261
                 : '';
2262 2262
         } else {
@@ -2265,12 +2265,12 @@  discard block
 block discarded – undo
2265 2265
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2266 2266
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'L', 0, '');
2267 2267
         //FRETE POR CONTA
2268
-        $x     += $w1;
2268
+        $x += $w1;
2269 2269
         $w2    = $maxW * 0.15;
2270 2270
         $texto = 'FRETE';
2271 2271
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2272 2272
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2273
-        $tipoFrete = ! empty($this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue)
2273
+        $tipoFrete = !empty($this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue)
2274 2274
             ? $this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue
2275 2275
             : '0';
2276 2276
         switch ($tipoFrete) {
@@ -2296,12 +2296,12 @@  discard block
 block discarded – undo
2296 2296
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2297 2297
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'C', 'C', 1, '');
2298 2298
         //CÓDIGO ANTT
2299
-        $x     += $w2;
2299
+        $x += $w2;
2300 2300
         $texto = 'CÓDIGO ANTT';
2301 2301
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2302 2302
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2303 2303
         if (isset($this->veicTransp)) {
2304
-            $texto = ! empty($this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue)
2304
+            $texto = !empty($this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue)
2305 2305
                 ? $this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue
2306 2306
                 : '';
2307 2307
         } else {
@@ -2310,16 +2310,16 @@  discard block
 block discarded – undo
2310 2310
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2311 2311
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2312 2312
         //PLACA DO VEÍC
2313
-        $x     += $w2;
2313
+        $x += $w2;
2314 2314
         $texto = 'PLACA DO VEÍCULO';
2315 2315
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2316 2316
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2317 2317
         if (isset($this->veicTransp)) {
2318
-            $texto = ! empty($this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue)
2318
+            $texto = !empty($this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue)
2319 2319
                 ? $this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue
2320 2320
                 : '';
2321 2321
         } elseif (isset($this->reboque)) {
2322
-            $texto = ! empty($this->reboque->getElementsByTagName("placa")->item(0)->nodeValue)
2322
+            $texto = !empty($this->reboque->getElementsByTagName("placa")->item(0)->nodeValue)
2323 2323
                 ? $this->reboque->getElementsByTagName("placa")->item(0)->nodeValue
2324 2324
                 : '';
2325 2325
         } else {
@@ -2328,17 +2328,17 @@  discard block
 block discarded – undo
2328 2328
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2329 2329
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2330 2330
         //UF
2331
-        $x     += $w2;
2331
+        $x += $w2;
2332 2332
         $w3    = round($maxW * 0.04, 0);
2333 2333
         $texto = 'UF';
2334 2334
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2335 2335
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'L', 1, '');
2336 2336
         if (isset($this->veicTransp)) {
2337
-            $texto = ! empty($this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue)
2337
+            $texto = !empty($this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue)
2338 2338
                 ? $this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue
2339 2339
                 : '';
2340 2340
         } elseif (isset($this->reboque)) {
2341
-            $texto = ! empty($this->reboque->getElementsByTagName("UF")->item(0)->nodeValue)
2341
+            $texto = !empty($this->reboque->getElementsByTagName("UF")->item(0)->nodeValue)
2342 2342
                 ? $this->reboque->getElementsByTagName("UF")->item(0)->nodeValue
2343 2343
                 : '';
2344 2344
         } else {
@@ -2347,20 +2347,20 @@  discard block
 block discarded – undo
2347 2347
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2348 2348
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'C', 0, '');
2349 2349
         //CNPJ / CPF
2350
-        $x     += $w3;
2350
+        $x += $w3;
2351 2351
         $w     = $maxW - ($w1 + 3 * $w2 + $w3);
2352 2352
         $texto = 'CNPJ / CPF';
2353 2353
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2354 2354
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
2355 2355
         if (isset($this->transporta)) {
2356
-            $texto = ! empty($this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue)
2356
+            $texto = !empty($this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue)
2357 2357
                 ? $this->formatField(
2358 2358
                     $this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue,
2359 2359
                     "##.###.###/####-##"
2360 2360
                 )
2361 2361
                 : '';
2362 2362
             if ($texto == '') {
2363
-                $texto = ! empty($this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue)
2363
+                $texto = !empty($this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue)
2364 2364
                     ? $this->formatField(
2365 2365
                         $this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue,
2366 2366
                         "###.###.###-##"
@@ -2374,7 +2374,7 @@  discard block
 block discarded – undo
2374 2374
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
2375 2375
         //#####################################################################
2376 2376
         //ENDEREÇO
2377
-        $y     += $h;
2377
+        $y += $h;
2378 2378
         $x     = $oldX;
2379 2379
         $h     = 7;
2380 2380
         $w1    = $maxW * 0.44;
@@ -2382,7 +2382,7 @@  discard block
 block discarded – undo
2382 2382
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2383 2383
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, '');
2384 2384
         if (isset($this->transporta)) {
2385
-            $texto = ! empty($this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue)
2385
+            $texto = !empty($this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue)
2386 2386
                 ? $this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue
2387 2387
                 : '';
2388 2388
         } else {
@@ -2391,13 +2391,13 @@  discard block
 block discarded – undo
2391 2391
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2392 2392
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'L', 0, '');
2393 2393
         //MUNICÍPIO
2394
-        $x     += $w1;
2394
+        $x += $w1;
2395 2395
         $w2    = round($maxW * 0.30, 0);
2396 2396
         $texto = 'MUNICÍPIO';
2397 2397
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2398 2398
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2399 2399
         if (isset($this->transporta)) {
2400
-            $texto = ! empty($this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue)
2400
+            $texto = !empty($this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue)
2401 2401
                 ? $this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue
2402 2402
                 : '';
2403 2403
         } else {
@@ -2406,13 +2406,13 @@  discard block
 block discarded – undo
2406 2406
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2407 2407
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2408 2408
         //UF
2409
-        $x     += $w2;
2409
+        $x += $w2;
2410 2410
         $w3    = round($maxW * 0.04, 0);
2411 2411
         $texto = 'UF';
2412 2412
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2413 2413
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'L', 1, '');
2414 2414
         if (isset($this->transporta)) {
2415
-            $texto = ! empty($this->transporta->getElementsByTagName("UF")->item(0)->nodeValue)
2415
+            $texto = !empty($this->transporta->getElementsByTagName("UF")->item(0)->nodeValue)
2416 2416
                 ? $this->transporta->getElementsByTagName("UF")->item(0)->nodeValue
2417 2417
                 : '';
2418 2418
         } else {
@@ -2421,14 +2421,14 @@  discard block
 block discarded – undo
2421 2421
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2422 2422
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'C', 0, '');
2423 2423
         //INSCRIÇÃO ESTADUAL
2424
-        $x     += $w3;
2424
+        $x += $w3;
2425 2425
         $w     = $maxW - ($w1 + $w2 + $w3);
2426 2426
         $texto = 'INSCRIÇÃO ESTADUAL';
2427 2427
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2428 2428
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
2429 2429
         $texto = '';
2430 2430
         if (isset($this->transporta)) {
2431
-            if (! empty($this->transporta->getElementsByTagName("IE")->item(0)->nodeValue)) {
2431
+            if (!empty($this->transporta->getElementsByTagName("IE")->item(0)->nodeValue)) {
2432 2432
                 $texto = $this->transporta->getElementsByTagName("IE")->item(0)->nodeValue;
2433 2433
             }
2434 2434
         }
@@ -2444,13 +2444,13 @@  discard block
 block discarded – undo
2444 2444
         $pesoBruto   = 0;
2445 2445
         $pesoLiquido = 0;
2446 2446
         foreach ($volumes as $volume) {
2447
-            $quantidade  += ! empty($volume->getElementsByTagName("qVol")->item(0)->nodeValue) ?
2447
+            $quantidade  += !empty($volume->getElementsByTagName("qVol")->item(0)->nodeValue) ?
2448 2448
                 $volume->getElementsByTagName("qVol")->item(0)->nodeValue : 0;
2449
-            $pesoBruto   += ! empty($volume->getElementsByTagName("pesoB")->item(0)->nodeValue) ?
2449
+            $pesoBruto   += !empty($volume->getElementsByTagName("pesoB")->item(0)->nodeValue) ?
2450 2450
                 $volume->getElementsByTagName("pesoB")->item(0)->nodeValue : 0;
2451
-            $pesoLiquido += ! empty($volume->getElementsByTagName("pesoL")->item(0)->nodeValue) ?
2451
+            $pesoLiquido += !empty($volume->getElementsByTagName("pesoL")->item(0)->nodeValue) ?
2452 2452
                 $volume->getElementsByTagName("pesoL")->item(0)->nodeValue : 0;
2453
-            $texto       = ! empty($this->transp->getElementsByTagName("esp")->item(0)->nodeValue) ?
2453
+            $texto = !empty($this->transp->getElementsByTagName("esp")->item(0)->nodeValue) ?
2454 2454
                 $this->transp->getElementsByTagName("esp")->item(0)->nodeValue : '';
2455 2455
             if ($texto != $especie && $especie != '') {
2456 2456
                 //tem várias especies
@@ -2458,7 +2458,7 @@  discard block
 block discarded – undo
2458 2458
             } else {
2459 2459
                 $especie = $texto;
2460 2460
             }
2461
-            $texto = ! empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue)
2461
+            $texto = !empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue)
2462 2462
                 ? $this->transp->getElementsByTagName("marca")->item(0)->nodeValue
2463 2463
                 : '';
2464 2464
             if ($texto != $marca && $marca != '') {
@@ -2467,7 +2467,7 @@  discard block
 block discarded – undo
2467 2467
             } else {
2468 2468
                 $marca = $texto;
2469 2469
             }
2470
-            $texto = ! empty($this->transp->getElementsByTagName("nVol")->item(0)->nodeValue)
2470
+            $texto = !empty($this->transp->getElementsByTagName("nVol")->item(0)->nodeValue)
2471 2471
                 ? $this->transp->getElementsByTagName("nVol")->item(0)->nodeValue
2472 2472
                 : '';
2473 2473
             if ($texto != $numero && $numero != '') {
@@ -2480,20 +2480,20 @@  discard block
 block discarded – undo
2480 2480
 
2481 2481
         //#####################################################################
2482 2482
         //QUANTIDADE
2483
-        $y     += $h;
2483
+        $y += $h;
2484 2484
         $x     = $oldX;
2485 2485
         $h     = 7;
2486 2486
         $w1    = round($maxW * 0.10, 0);
2487 2487
         $texto = 'QUANTIDADE';
2488 2488
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2489 2489
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, '');
2490
-        if (! empty($quantidade)) {
2490
+        if (!empty($quantidade)) {
2491 2491
             $texto = $quantidade;
2492 2492
             $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2493 2493
             $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'C', 0, '');
2494 2494
         }
2495 2495
         //ESPÉCIE
2496
-        $x     += $w1;
2496
+        $x += $w1;
2497 2497
         $w2    = round($maxW * 0.17, 0);
2498 2498
         $texto = 'ESPÉCIE';
2499 2499
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -2502,16 +2502,16 @@  discard block
 block discarded – undo
2502 2502
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2503 2503
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2504 2504
         //MARCA
2505
-        $x     += $w2;
2505
+        $x += $w2;
2506 2506
         $texto = 'MARCA';
2507 2507
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2508 2508
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2509
-        $texto = ! empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) ?
2509
+        $texto = !empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) ?
2510 2510
             $this->transp->getElementsByTagName("marca")->item(0)->nodeValue : '';
2511 2511
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2512 2512
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2513 2513
         //NUMERAÇÃO
2514
-        $x     += $w2;
2514
+        $x += $w2;
2515 2515
         $texto = 'NUMERAÇÃO';
2516 2516
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2517 2517
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -2519,7 +2519,7 @@  discard block
 block discarded – undo
2519 2519
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2520 2520
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2521 2521
         //PESO BRUTO
2522
-        $x     += $w2;
2522
+        $x += $w2;
2523 2523
         $w3    = round($maxW * 0.20, 0);
2524 2524
         $texto = 'PESO BRUTO';
2525 2525
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -2532,7 +2532,7 @@  discard block
 block discarded – undo
2532 2532
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2533 2533
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'R', 0, '');
2534 2534
         //PESO LÍQUIDO
2535
-        $x     += $w3;
2535
+        $x += $w3;
2536 2536
         $w     = $maxW - ($w1 + 3 * $w2 + $w3);
2537 2537
         $texto = 'PESO LÍQUIDO';
2538 2538
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -2552,11 +2552,11 @@  discard block
 block discarded – undo
2552 2552
     protected function descricaoProdutoHelper($origem, $campo, $formato)
2553 2553
     {
2554 2554
         $valor_original = $origem->getElementsByTagName($campo)->item(0);
2555
-        if (! isset($valor_original)) {
2555
+        if (!isset($valor_original)) {
2556 2556
             return "";
2557 2557
         }
2558 2558
         $valor_original = $valor_original->nodeValue;
2559
-        $valor          = ! empty($valor_original) ? number_format($valor_original, 2, ",", ".") : '';
2559
+        $valor          = !empty($valor_original) ? number_format($valor_original, 2, ",", ".") : '';
2560 2560
 
2561 2561
         if ($valor != "") {
2562 2562
             return sprintf($formato, $valor);
@@ -2582,7 +2582,7 @@  discard block
 block discarded – undo
2582 2582
         $ICMSUFDest = $itemProd->getElementsByTagName("ICMSUFDest")->item(0);
2583 2583
         $impostos   = '';
2584 2584
 
2585
-        if (! empty($ICMS)) {
2585
+        if (!empty($ICMS)) {
2586 2586
             $impostos .= $this->descricaoProdutoHelper($ICMS, "vBCFCP", " BcFcp=%s");
2587 2587
             $impostos .= $this->descricaoProdutoHelper($ICMS, "pFCP", " pFcp=%s%%");
2588 2588
             $impostos .= $this->descricaoProdutoHelper($ICMS, "vFCP", " vFcp=%s");
@@ -2598,7 +2598,7 @@  discard block
 block discarded – undo
2598 2598
             $impostos .= $this->descricaoProdutoHelper($ICMS, "pST", " pSt=%s");
2599 2599
             $impostos .= $this->descricaoProdutoHelper($ICMS, "vICMSSTRet", " VALOR ICMS ST=%s");
2600 2600
         }
2601
-        if (! empty($ICMSUFDest)) {
2601
+        if (!empty($ICMSUFDest)) {
2602 2602
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pFCPUFDest", " pFCPUFDest=%s%%");
2603 2603
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pICMSUFDest", " pICMSUFDest=%s%%");
2604 2604
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pICMSInterPart", " pICMSInterPart=%s%%");
@@ -2606,20 +2606,20 @@  discard block
 block discarded – undo
2606 2606
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "vICMSUFDest", " vICMSUFDest=%s");
2607 2607
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "vICMSUFRemet", " vICMSUFRemet=%s");
2608 2608
         }
2609
-        $infAdProd = ! empty($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue)
2609
+        $infAdProd = !empty($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue)
2610 2610
             ? substr(
2611 2611
                 $this->anfaveaDANFE($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue),
2612 2612
                 0,
2613 2613
                 500
2614 2614
             )
2615 2615
             : '';
2616
-        if (! empty($infAdProd)) {
2616
+        if (!empty($infAdProd)) {
2617 2617
             $infAdProd = trim($infAdProd);
2618 2618
             $infAdProd .= ' ';
2619 2619
         }
2620 2620
         $loteTxt = '';
2621 2621
         $rastro  = $prod->getElementsByTagName("med");
2622
-        if (! empty($prod->getElementsByTagName("rastro"))) {
2622
+        if (!empty($prod->getElementsByTagName("rastro"))) {
2623 2623
             $rastro = $prod->getElementsByTagName("rastro");
2624 2624
             $i      = 0;
2625 2625
             while ($i < $rastro->length) {
@@ -2628,14 +2628,14 @@  discard block
 block discarded – undo
2628 2628
                 $loteTxt .= $this->getTagDate($rastro->item($i), 'dFab', ' Fab: ');
2629 2629
                 $loteTxt .= $this->getTagDate($rastro->item($i), 'dVal', ' Val: ');
2630 2630
                 $loteTxt .= $this->getTagValue($rastro->item($i), 'vPMC', ' PMC: ');
2631
-                $i ++;
2631
+                $i++;
2632 2632
             }
2633 2633
             if ($loteTxt != '') {
2634 2634
                 $loteTxt .= ' ';
2635 2635
             }
2636 2636
         }
2637 2637
         //NT2013.006 FCI
2638
-        $nFCI   = (! empty($itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue)) ?
2638
+        $nFCI   = (!empty($itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue)) ?
2639 2639
             ' FCI:' . $itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue : '';
2640 2640
         $tmp_ad = $infAdProd . ($this->descProdInfoComplemento ? $loteTxt . $impostos . $nFCI : '');
2641 2641
         $texto  = $prod->getElementsByTagName("xProd")->item(0)->nodeValue
@@ -2685,7 +2685,7 @@  discard block
 block discarded – undo
2685 2685
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
2686 2686
         $y += 3;
2687 2687
         //desenha a caixa dos dados dos itens da NF
2688
-        $hmax  += 1;
2688
+        $hmax += 1;
2689 2689
         $texto = '';
2690 2690
         $this->pdf->textBox($x, $y, $w, $hmax);
2691 2691
         //##################################################################################
@@ -2698,101 +2698,101 @@  discard block
 block discarded – undo
2698 2698
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2699 2699
         $this->pdf->line($x + $w1, $y, $x + $w1, $y + $hmax);
2700 2700
         //DESCRIÇÃO DO PRODUTO / SERVIÇO
2701
-        $x     += $w1;
2701
+        $x += $w1;
2702 2702
         $w2    = round($w * 0.25, 0);
2703 2703
         $texto = 'DESCRIÇÃO DO PRODUTO / SERVIÇO';
2704 2704
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2705 2705
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2706 2706
         $this->pdf->line($x + $w2, $y, $x + $w2, $y + $hmax);
2707 2707
         //NCM/SH
2708
-        $x     += $w2;
2708
+        $x += $w2;
2709 2709
         $w3    = round($w * 0.06, 0);
2710 2710
         $texto = 'NCM/SH';
2711 2711
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2712 2712
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2713 2713
         $this->pdf->line($x + $w3, $y, $x + $w3, $y + $hmax);
2714 2714
         //O/CST ou O/CSOSN
2715
-        $x     += $w3;
2715
+        $x += $w3;
2716 2716
         $w4    = round($w * 0.05, 0);
2717
-        $texto = 'O/CSOSN';//Regime do Simples CRT = 1 ou CRT = 2
2717
+        $texto = 'O/CSOSN'; //Regime do Simples CRT = 1 ou CRT = 2
2718 2718
         if ($this->getTagValue($this->emit, 'CRT') == '3') {
2719
-            $texto = 'O/CST';//Regime Normal
2719
+            $texto = 'O/CST'; //Regime Normal
2720 2720
         }
2721 2721
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2722 2722
         $this->pdf->textBox($x, $y, $w4, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2723 2723
         $this->pdf->line($x + $w4, $y, $x + $w4, $y + $hmax);
2724 2724
         //CFOP
2725
-        $x     += $w4;
2725
+        $x += $w4;
2726 2726
         $w5    = round($w * 0.04, 0);
2727 2727
         $texto = 'CFOP';
2728 2728
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2729 2729
         $this->pdf->textBox($x, $y, $w5, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2730 2730
         $this->pdf->line($x + $w5, $y, $x + $w5, $y + $hmax);
2731 2731
         //UN
2732
-        $x     += $w5;
2732
+        $x += $w5;
2733 2733
         $w6    = round($w * 0.03, 0);
2734 2734
         $texto = 'UN';
2735 2735
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2736 2736
         $this->pdf->textBox($x, $y, $w6, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2737 2737
         $this->pdf->line($x + $w6, $y, $x + $w6, $y + $hmax);
2738 2738
         //QUANT
2739
-        $x     += $w6;
2739
+        $x += $w6;
2740 2740
         $w7    = round($w * 0.08, 0);
2741 2741
         $texto = 'QUANT';
2742 2742
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2743 2743
         $this->pdf->textBox($x, $y, $w7, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2744 2744
         $this->pdf->line($x + $w7, $y, $x + $w7, $y + $hmax);
2745 2745
         //VALOR UNIT
2746
-        $x     += $w7;
2746
+        $x += $w7;
2747 2747
         $w8    = round($w * 0.06, 0);
2748 2748
         $texto = 'VALOR UNIT';
2749 2749
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2750 2750
         $this->pdf->textBox($x, $y, $w8, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2751 2751
         $this->pdf->line($x + $w8, $y, $x + $w8, $y + $hmax);
2752 2752
         //VALOR TOTAL
2753
-        $x     += $w8;
2753
+        $x += $w8;
2754 2754
         $w9    = round($w * 0.06, 0);
2755 2755
         $texto = 'VALOR TOTAL';
2756 2756
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2757 2757
         $this->pdf->textBox($x, $y, $w9, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2758 2758
         $this->pdf->line($x + $w9, $y, $x + $w9, $y + $hmax);
2759 2759
         //VALOR DESCONTO
2760
-        $x     += $w9;
2760
+        $x += $w9;
2761 2761
         $w10   = round($w * 0.05, 0);
2762 2762
         $texto = 'VALOR DESC';
2763 2763
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2764 2764
         $this->pdf->textBox($x, $y, $w10, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2765 2765
         $this->pdf->line($x + $w10, $y, $x + $w10, $y + $hmax);
2766 2766
         //B.CÁLC ICMS
2767
-        $x     += $w10;
2767
+        $x += $w10;
2768 2768
         $w11   = round($w * 0.06, 0);
2769 2769
         $texto = 'B.CÁLC ICMS';
2770 2770
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2771 2771
         $this->pdf->textBox($x, $y, $w11, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2772 2772
         $this->pdf->line($x + $w11, $y, $x + $w11, $y + $hmax);
2773 2773
         //VALOR ICMS
2774
-        $x     += $w11;
2774
+        $x += $w11;
2775 2775
         $w12   = round($w * 0.06, 0);
2776 2776
         $texto = 'VALOR ICMS';
2777 2777
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2778 2778
         $this->pdf->textBox($x, $y, $w12, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2779 2779
         $this->pdf->line($x + $w12, $y, $x + $w12, $y + $hmax);
2780 2780
         //VALOR IPI
2781
-        $x     += $w12;
2781
+        $x += $w12;
2782 2782
         $w13   = round($w * 0.05, 0);
2783 2783
         $texto = 'VALOR IPI';
2784 2784
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2785 2785
         $this->pdf->textBox($x, $y, $w13, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2786 2786
         $this->pdf->line($x + $w13, $y, $x + $w13, $y + $hmax);
2787 2787
         //ALÍQ. ICMS
2788
-        $x     += $w13;
2788
+        $x += $w13;
2789 2789
         $w14   = round($w * 0.04, 0);
2790 2790
         $texto = 'ALÍQ. ICMS';
2791 2791
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2792 2792
         $this->pdf->textBox($x, $y, $w14, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2793 2793
         $this->pdf->line($x + $w14, $y, $x + $w14, $y + $hmax);
2794 2794
         //ALÍQ. IPI
2795
-        $x     += $w14;
2795
+        $x += $w14;
2796 2796
         $w15   = $w - ($w1 + $w2 + $w3 + $w4 + $w5 + $w6 + $w7 + $w8 + $w9 + $w10 + $w11 + $w12 + $w13 + $w14);
2797 2797
         $texto = 'ALÍQ. IPI';
2798 2798
         $this->pdf->textBox($x, $y, $w15, $h, $texto, $aFont, 'C', 'C', 0, '', false);
@@ -2836,7 +2836,7 @@  discard block
 block discarded – undo
2836 2836
                 // Informação sobre unidade de medida tributavel.
2837 2837
                 // Se não for para exibir a unidade de medida tributavel, então
2838 2838
                 // A Escrita irá começar em 0.
2839
-                if (! $mostrarUnidadeTributavel) {
2839
+                if (!$mostrarUnidadeTributavel) {
2840 2840
                     $yTrib = 0;
2841 2841
                 }
2842 2842
                 $h = $this->calculeHeight($thisItem, $mostrarUnidadeTributavel);
@@ -2871,7 +2871,7 @@  discard block
 block discarded – undo
2871 2871
                 }
2872 2872
                 $x += $w2;
2873 2873
                 //NCM
2874
-                $texto = ! empty($prod->getElementsByTagName("NCM")->item(0)->nodeValue) ?
2874
+                $texto = !empty($prod->getElementsByTagName("NCM")->item(0)->nodeValue) ?
2875 2875
                     $prod->getElementsByTagName("NCM")->item(0)->nodeValue : '';
2876 2876
                 $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'C', 0, '');
2877 2877
                 $x += $w3;
@@ -2884,11 +2884,11 @@  discard block
 block discarded – undo
2884 2884
                     $this->pdf->textBox($x, $y, $w4, $h, $texto, $aFont, 'T', 'C', 0, '');
2885 2885
                 }
2886 2886
                 //CFOP
2887
-                $x     += $w4;
2887
+                $x += $w4;
2888 2888
                 $texto = $prod->getElementsByTagName("CFOP")->item(0)->nodeValue;
2889 2889
                 $this->pdf->textBox($x, $y, $w5, $h, $texto, $aFont, 'T', 'C', 0, '');
2890 2890
                 //Unidade
2891
-                $x     += $w5;
2891
+                $x += $w5;
2892 2892
                 $texto = $uCom;
2893 2893
                 $this->pdf->textBox($x, $y, $w6, $h, $texto, $aFont, 'T', 'C', 0, '');
2894 2894
                 //Unidade de medida tributável
@@ -2909,7 +2909,7 @@  discard block
 block discarded – undo
2909 2909
                 // QTDADE Tributável
2910 2910
                 if ($mostrarUnidadeTributavel) {
2911 2911
                     $qTrib = $prod->getElementsByTagName("qTrib")->item(0);
2912
-                    if (! empty($qTrib)) {
2912
+                    if (!empty($qTrib)) {
2913 2913
                         $texto = number_format($qTrib->nodeValue, $this->qComCasasDec, ",", ".");
2914 2914
                         $this->pdf->textBox($x, $yTrib, $w7, $h, $texto, $aFont, 'T', $alinhamento, 0, '');
2915 2915
                     }
@@ -2922,7 +2922,7 @@  discard block
 block discarded – undo
2922 2922
                 // Valor Unitário Tributável
2923 2923
                 if ($mostrarUnidadeTributavel) {
2924 2924
                     $vUnTrib = $prod->getElementsByTagName("vUnTrib")->item(0);
2925
-                    if (! empty($vUnTrib)) {
2925
+                    if (!empty($vUnTrib)) {
2926 2926
                         $texto = number_format($vUnTrib->nodeValue, $this->vUnComCasasDec, ",", ".");
2927 2927
                         $this->pdf->textBox($x, $yTrib, $w8, $h, $texto, $aFont, 'T', $alinhamento, 0, '');
2928 2928
                     }
@@ -2936,7 +2936,7 @@  discard block
 block discarded – undo
2936 2936
                 $this->pdf->textBox($x, $y, $w9, $h, $texto, $aFont, 'T', $alinhamento, 0, '');
2937 2937
                 $x += $w9;
2938 2938
                 //Valor do Desconto
2939
-                $vdesc = ! empty($prod->getElementsByTagName("vDesc")->item(0)->nodeValue)
2939
+                $vdesc = !empty($prod->getElementsByTagName("vDesc")->item(0)->nodeValue)
2940 2940
                     ? $prod->getElementsByTagName("vDesc")->item(0)->nodeValue : 0;
2941 2941
 
2942 2942
                 $texto = number_format($vdesc, 2, ",", ".");
@@ -2944,7 +2944,7 @@  discard block
 block discarded – undo
2944 2944
                 //Valor da Base de calculo
2945 2945
                 $x += $w10;
2946 2946
                 if (isset($ICMS)) {
2947
-                    $texto = ! empty($ICMS->getElementsByTagName("vBC")->item(0)->nodeValue)
2947
+                    $texto = !empty($ICMS->getElementsByTagName("vBC")->item(0)->nodeValue)
2948 2948
                         ? number_format(
2949 2949
                             $ICMS->getElementsByTagName("vBC")->item(0)->nodeValue,
2950 2950
                             2,
@@ -2957,7 +2957,7 @@  discard block
 block discarded – undo
2957 2957
                 //Valor do ICMS
2958 2958
                 $x += $w11;
2959 2959
                 if (isset($ICMS)) {
2960
-                    $texto = ! empty($ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue)
2960
+                    $texto = !empty($ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue)
2961 2961
                         ? number_format(
2962 2962
                             $ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue,
2963 2963
                             2,
@@ -2970,7 +2970,7 @@  discard block
 block discarded – undo
2970 2970
                 //Valor do IPI
2971 2971
                 $x += $w12;
2972 2972
                 if (isset($IPI)) {
2973
-                    $texto = ! empty($IPI->getElementsByTagName("vIPI")->item(0)->nodeValue)
2973
+                    $texto = !empty($IPI->getElementsByTagName("vIPI")->item(0)->nodeValue)
2974 2974
                         ? number_format(
2975 2975
                             $IPI->getElementsByTagName("vIPI")->item(0)->nodeValue,
2976 2976
                             2,
@@ -2985,7 +2985,7 @@  discard block
 block discarded – undo
2985 2985
                 // %ICMS
2986 2986
                 $x += $w13;
2987 2987
                 if (isset($ICMS)) {
2988
-                    $texto = ! empty($ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue)
2988
+                    $texto = !empty($ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue)
2989 2989
                         ? number_format(
2990 2990
                             $ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue,
2991 2991
                             2,
@@ -2998,7 +2998,7 @@  discard block
 block discarded – undo
2998 2998
                 //%IPI
2999 2999
                 $x += $w14;
3000 3000
                 if (isset($IPI)) {
3001
-                    $texto = ! empty($IPI->getElementsByTagName("pIPI")->item(0)->nodeValue)
3001
+                    $texto = !empty($IPI->getElementsByTagName("pIPI")->item(0)->nodeValue)
3002 3002
                         ? number_format(
3003 3003
                             $IPI->getElementsByTagName("pIPI")->item(0)->nodeValue,
3004 3004
                             2,
@@ -3016,17 +3016,17 @@  discard block
 block discarded – undo
3016 3016
                 $veicProd = $prod->getElementsByTagName("veicProd")->item(0);
3017 3017
                 // Tag somente é gerada para veiculo 0k, e só é permitido um veiculo por NF-e por conta do detran
3018 3018
                 // Verifica se a Tag existe
3019
-                if (! empty($veicProd)) {
3019
+                if (!empty($veicProd)) {
3020 3020
                     $this->dadosItenVeiculoDANFE($oldX, $y, $nInicio, $h, $prod);
3021 3021
                 }
3022 3022
 
3023 3023
 
3024 3024
                 $y += $h;
3025
-                $i ++;
3025
+                $i++;
3026 3026
                 //incrementa o controle dos itens processados.
3027
-                $this->qtdeItensProc ++;
3027
+                $this->qtdeItensProc++;
3028 3028
             } else {
3029
-                $i ++;
3029
+                $i++;
3030 3030
             }
3031 3031
         }
3032 3032
 
@@ -3231,23 +3231,23 @@  discard block
 block discarded – undo
3231 3231
         $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B'];
3232 3232
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
3233 3233
         //INSCRIÇÃO MUNICIPAL
3234
-        $y     += 3;
3234
+        $y += 3;
3235 3235
         $w     = round($this->wPrint * 0.23, 0);
3236 3236
         $texto = 'INSCRIÇÃO MUNICIPAL';
3237 3237
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3238 3238
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3239 3239
         //inscrição municipal
3240
-        $texto = ! empty($this->emit->getElementsByTagName("IM")->item(0)->nodeValue) ?
3240
+        $texto = !empty($this->emit->getElementsByTagName("IM")->item(0)->nodeValue) ?
3241 3241
             $this->emit->getElementsByTagName("IM")->item(0)->nodeValue : '';
3242 3242
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
3243 3243
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
3244 3244
         //VALOR TOTAL DOS SERVIÇOS
3245
-        $x     += $w;
3245
+        $x += $w;
3246 3246
         $texto = 'VALOR TOTAL DOS SERVIÇOS';
3247 3247
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3248 3248
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3249 3249
         if (isset($this->ISSQNtot)) {
3250
-            $texto = ! empty($this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue) ?
3250
+            $texto = !empty($this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue) ?
3251 3251
                 $this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue : '';
3252 3252
             $texto = number_format($texto, 2, ",", ".");
3253 3253
         } else {
@@ -3256,14 +3256,14 @@  discard block
 block discarded – undo
3256 3256
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
3257 3257
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'R', 0, '');
3258 3258
         //BASE DE CÁLCULO DO ISSQN
3259
-        $x     += $w;
3259
+        $x += $w;
3260 3260
         $texto = 'BASE DE CÁLCULO DO ISSQN';
3261 3261
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3262 3262
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3263 3263
         if (isset($this->ISSQNtot)) {
3264
-            $texto = ! empty($this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue) ?
3264
+            $texto = !empty($this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue) ?
3265 3265
                 $this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue : '';
3266
-            $texto = ! empty($texto) ? number_format($texto, 2, ",", ".") : '';
3266
+            $texto = !empty($texto) ? number_format($texto, 2, ",", ".") : '';
3267 3267
         } else {
3268 3268
             $texto = '';
3269 3269
         }
@@ -3280,9 +3280,9 @@  discard block
 block discarded – undo
3280 3280
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3281 3281
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3282 3282
         if (isset($this->ISSQNtot)) {
3283
-            $texto = ! empty($this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue) ?
3283
+            $texto = !empty($this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue) ?
3284 3284
                 $this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue : '';
3285
-            $texto = ! empty($texto) ? number_format($texto, 2, ",", ".") : '';
3285
+            $texto = !empty($texto) ? number_format($texto, 2, ",", ".") : '';
3286 3286
         } else {
3287 3287
             $texto = '';
3288 3288
         }
@@ -3321,7 +3321,7 @@  discard block
 block discarded – undo
3321 3321
 
3322 3322
         //INFORMAÇÕES COMPLEMENTARES
3323 3323
         $texto = "INFORMAÇÕES COMPLEMENTARES";
3324
-        $y     += 3;
3324
+        $y += 3;
3325 3325
         $w     = $this->wAdic;
3326 3326
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => 'B'];
3327 3327
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -3331,7 +3331,7 @@  discard block
 block discarded – undo
3331 3331
         //$this->textoAdic com o texto completo do campo
3332 3332
         //echo str_replace("\n", "<br>",$this->textoAdic);
3333 3333
         //die;
3334
-        $y     += 1;
3334
+        $y += 1;
3335 3335
         $aFont = ['font' => $this->fontePadrao, 'size' => $this->textadicfontsize * $this->pdf->k, 'style' => ''];
3336 3336
         //$aFont = ['font'=>$this->fontePadrao, 'size'=> 5, 'style'=>''];
3337 3337
         $this->pdf->textBox($x, $y + 2, $w - 2, $h, $this->textoAdic, $aFont, 'T', 'L', 0, '', false);
@@ -3382,7 +3382,7 @@  discard block
 block discarded – undo
3382 3382
                 $texto = 'CONTINGÊNCIA SVC-RS' . $dhCont . $xJust;
3383 3383
                 break;
3384 3384
         }
3385
-        $y     += 2;
3385
+        $y += 2;
3386 3386
         $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => ''];
3387 3387
         $this->pdf->textBox($x, $y, $w - 2, $h, $texto, $aFont, 'T', 'L', 0, '', false);
3388 3388
 
@@ -3437,7 +3437,7 @@  discard block
 block discarded – undo
3437 3437
         $tpNF = $this->ide->getElementsByTagName('tpNF')->item(0)->nodeValue;
3438 3438
         if ($tpNF == '0') {
3439 3439
             //NFe de Entrada
3440
-            $emitente     = '';
3440
+            $emitente = '';
3441 3441
             $emitente     .= $this->dest->getElementsByTagName("xNome")->item(0)->nodeValue . " - ";
3442 3442
             $emitente     .= $this->enderDest->getElementsByTagName("xLgr")->item(0)->nodeValue . ", ";
3443 3443
             $emitente     .= $this->enderDest->getElementsByTagName("nro")->item(0)->nodeValue . " - ";
@@ -3490,10 +3490,10 @@  discard block
 block discarded – undo
3490 3490
             $texto .= "AO LADO";
3491 3491
         }
3492 3492
         $texto .= ". EMISSÃO: ";
3493
-        $dEmi  = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3493
+        $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3494 3494
             $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue : '';
3495 3495
         if ($dEmi == '') {
3496
-            $dEmi  = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3496
+            $dEmi  = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3497 3497
                 $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue : '';
3498 3498
             $aDemi = explode('T', $dEmi);
3499 3499
             $dEmi  = $aDemi[0];
@@ -3516,12 +3516,12 @@  discard block
 block discarded – undo
3516 3516
             $this->pdf->textBox($x1, $y, $w1, 18, $texto, $aFont, 'C', 'C', 1, '');
3517 3517
             //DATA DE RECEBIMENTO
3518 3518
             $texto = "DATA DE RECEBIMENTO";
3519
-            $y     += $h;
3519
+            $y += $h;
3520 3520
             $w2    = round($this->wPrint * 0.17, 0); //35;
3521 3521
             $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3522 3522
             $this->pdf->textBox($x, $y, $w2, 8, $texto, $aFont, 'T', 'L', 1, '');
3523 3523
             //IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR
3524
-            $x     += $w2;
3524
+            $x += $w2;
3525 3525
             $w3    = $w - $w2;
3526 3526
             $texto = "IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR";
3527 3527
             $this->pdf->textBox($x, $y, $w3, 8, $texto, $aFont, 'T', 'L', 1, '');
@@ -3532,7 +3532,7 @@  discard block
 block discarded – undo
3532 3532
 
3533 3533
             return $y;
3534 3534
         } else {
3535
-            $x --;
3535
+            $x--;
3536 3536
             $x = $this->pdf->textBox90($x, $y, $w - 1, $h, $texto, $aFontSmall, 'C', 'L', 0, '', false);
3537 3537
             //NUMERO DA NOTA FISCAL LOGO NFE
3538 3538
             $w1    = 18;
@@ -3553,7 +3553,7 @@  discard block
 block discarded – undo
3553 3553
             $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3554 3554
             $this->pdf->textBox90($x, $y, $w2, 8, $texto, $aFont, 'T', 'L', 1, '');
3555 3555
             //IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR
3556
-            $y     -= $w2;
3556
+            $y -= $w2;
3557 3557
             $w3    = $w - $w2;
3558 3558
             $texto = "IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR";
3559 3559
             $aFont = ['font' => $this->fontePadrao, 'size' => 5.7, 'style' => ''];
@@ -3574,18 +3574,18 @@  discard block
 block discarded – undo
3574 3574
      */
3575 3575
     protected function geraInformacoesDaTagCompra()
3576 3576
     {
3577
-        if (! $this->gerarInformacoesAutomaticas) {
3577
+        if (!$this->gerarInformacoesAutomaticas) {
3578 3578
             return '';
3579 3579
         }
3580 3580
         $saida = "";
3581 3581
         if (isset($this->compra)) {
3582
-            if (! empty($this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue)) {
3582
+            if (!empty($this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue)) {
3583 3583
                 $saida .= " Nota de Empenho: " . $this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue;
3584 3584
             }
3585
-            if (! empty($this->compra->getElementsByTagName("xPed")->item(0)->nodeValue)) {
3585
+            if (!empty($this->compra->getElementsByTagName("xPed")->item(0)->nodeValue)) {
3586 3586
                 $saida .= " Pedido: " . $this->compra->getElementsByTagName("xPed")->item(0)->nodeValue;
3587 3587
             }
3588
-            if (! empty($this->compra->getElementsByTagName("xCont")->item(0)->nodeValue)) {
3588
+            if (!empty($this->compra->getElementsByTagName("xCont")->item(0)->nodeValue)) {
3589 3589
                 $saida .= " Contrato: " . $this->compra->getElementsByTagName("xCont")->item(0)->nodeValue;
3590 3590
             }
3591 3591
         }
@@ -3616,10 +3616,10 @@  discard block
 block discarded – undo
3616 3616
         if ($icmss > 0) {
3617 3617
             $icmss = 1;
3618 3618
         }
3619
-        $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3619
+        $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3620 3620
             $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue : '';
3621 3621
         if ($dEmi == '') {
3622
-            $dEmi  = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3622
+            $dEmi  = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3623 3623
                 $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue : '';
3624 3624
             $aDemi = explode('T', $dEmi);
3625 3625
             $dEmi  = $aDemi[0];
@@ -3643,7 +3643,7 @@  discard block
 block discarded – undo
3643 3643
      */
3644 3644
     protected function geraInformacoesDasNotasReferenciadas()
3645 3645
     {
3646
-        if (! $this->gerarInformacoesAutomaticas) {
3646
+        if (!$this->gerarInformacoesAutomaticas) {
3647 3647
             return '';
3648 3648
         }
3649 3649
         $formaNfeRef = "\r\nNFe Ref.: série:%d número:%d emit:%s em %s [%s]";
@@ -3671,7 +3671,7 @@  discard block
 block discarded – undo
3671 3671
                 $cnpj          = $this->formatField(substr($chave_acesso, 6, 14), "##.###.###/####-##");
3672 3672
                 $serie         = substr($chave_acesso, 22, 3);
3673 3673
                 $numero        = substr($chave_acesso, 25, 9);
3674
-                $saida         .= sprintf($formaNfeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3674
+                $saida .= sprintf($formaNfeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3675 3675
             }
3676 3676
             $refNF = $nfRef->getElementsByTagName('refNF');
3677 3677
             foreach ($refNF as $umaRefNFe) {
@@ -3682,7 +3682,7 @@  discard block
 block discarded – undo
3682 3682
                 $numero = $umaRefNFe->getElementsByTagName('nNF')->item(0)->nodeValue;
3683 3683
                 $data   = substr($data, 2, 2) . "/20" . substr($data, 0, 2);
3684 3684
                 $cnpj   = $this->formatField($cnpj, "##.###.###/####-##");
3685
-                $saida  .= sprintf($formaNfRef, $serie, $numero, $cnpj, $data, $mod);
3685
+                $saida .= sprintf($formaNfRef, $serie, $numero, $cnpj, $data, $mod);
3686 3686
             }
3687 3687
             $refCTe = $nfRef->getElementsByTagName('refCTe');
3688 3688
             foreach ($refCTe as $chave_acessoRef) {
@@ -3692,7 +3692,7 @@  discard block
 block discarded – undo
3692 3692
                 $cnpj          = $this->formatField(substr($chave_acesso, 6, 14), "##.###.###/####-##");
3693 3693
                 $serie         = substr($chave_acesso, 22, 3);
3694 3694
                 $numero        = substr($chave_acesso, 25, 9);
3695
-                $saida         .= sprintf($formaCTeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3695
+                $saida .= sprintf($formaCTeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3696 3696
             }
3697 3697
             $refECF = $nfRef->getElementsByTagName('refECF');
3698 3698
             foreach ($refECF as $umaRefNFe) {
@@ -3704,10 +3704,9 @@  discard block
 block discarded – undo
3704 3704
             $refNFP = $nfRef->getElementsByTagName('refNFP');
3705 3705
             foreach ($refNFP as $umaRefNFe) {
3706 3706
                 $data   = $umaRefNFe->getElementsByTagName('AAMM')->item(0)->nodeValue;
3707
-                $cnpj   = ! empty($umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue) ?
3708
-                    $umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue :
3709
-                    '';
3710
-                $cpf    = ! empty($umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue) ?
3707
+                $cnpj   = !empty($umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue) ?
3708
+                    $umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue : '';
3709
+                $cpf    = !empty($umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue) ?
3711 3710
                     $umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue : '';
3712 3711
                 $mod    = $umaRefNFe->getElementsByTagName('mod')->item(0)->nodeValue;
3713 3712
                 $serie  = $umaRefNFe->getElementsByTagName('serie')->item(0)->nodeValue;
@@ -3729,7 +3728,7 @@  discard block
 block discarded – undo
3729 3728
     private function loadDoc($xml)
3730 3729
     {
3731 3730
         $this->xml = $xml;
3732
-        if (! empty($xml)) {
3731
+        if (!empty($xml)) {
3733 3732
             $this->dom = new Dom();
3734 3733
             $this->dom->loadXML($this->xml);
3735 3734
             if (empty($this->dom->getElementsByTagName("infNFe")->item(0))) {
@@ -3783,7 +3782,7 @@  discard block
 block discarded – undo
3783 3782
         $numlinhas    = $this->pdf->getNumLines($textoProduto, $w2, $aFont);
3784 3783
 
3785 3784
         if ($mostrarUnidadeTributavel && $numlinhas == 1) {
3786
-            $numlinhas ++;
3785
+            $numlinhas++;
3787 3786
         }
3788 3787
 
3789 3788
         return round(($numlinhas * $this->pdf->fontSize) + ($numlinhas * 0.5), 2);
Please login to merge, or discard this patch.
src/Legacy/FPDF/Fpdf181.php 2 patches
Spacing   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -7,64 +7,64 @@  discard block
 block discarded – undo
7 7
     const FPDF_VERSION = '1.81';
8 8
     const FPDF_FONTPATH = 'font/';
9 9
 
10
-    protected $page;               // current page number
11
-    protected $n;                  // current object number
12
-    protected $offsets;            // array of object offsets
13
-    protected $buffer;             // buffer holding in-memory PDF
14
-    protected $pages;              // array containing pages
15
-    protected $state;              // current document state
16
-    protected $compress;           // compression flag
17
-    public $k;                  // scale factor (number of points in user unit)
18
-    protected $defOrientation;     // default orientation
19
-    protected $curOrientation;     // current orientation
20
-    protected $stdPageSizes;       // standard page sizes
21
-    protected $defPageSize;        // default page size
22
-    protected $curPageSize;        // current page size
23
-    protected $curRotation;        // current page rotation
24
-    protected $pageInfo;           // page-related data
10
+    protected $page; // current page number
11
+    protected $n; // current object number
12
+    protected $offsets; // array of object offsets
13
+    protected $buffer; // buffer holding in-memory PDF
14
+    protected $pages; // array containing pages
15
+    protected $state; // current document state
16
+    protected $compress; // compression flag
17
+    public $k; // scale factor (number of points in user unit)
18
+    protected $defOrientation; // default orientation
19
+    protected $curOrientation; // current orientation
20
+    protected $stdPageSizes; // standard page sizes
21
+    protected $defPageSize; // default page size
22
+    protected $curPageSize; // current page size
23
+    protected $curRotation; // current page rotation
24
+    protected $pageInfo; // page-related data
25 25
     protected $wPt;
26
-    protected $hPt;          // dimensions of current page in points
26
+    protected $hPt; // dimensions of current page in points
27 27
     protected $w;
28
-    protected $h;              // dimensions of current page in user unit
29
-    protected $lMargin;            // left margin
30
-    protected $tMargin;            // top margin
31
-    protected $rMargin;            // right margin
32
-    protected $bMargin;            // page break margin
33
-    protected $cMargin;            // cell margin
28
+    protected $h; // dimensions of current page in user unit
29
+    protected $lMargin; // left margin
30
+    protected $tMargin; // top margin
31
+    protected $rMargin; // right margin
32
+    protected $bMargin; // page break margin
33
+    protected $cMargin; // cell margin
34 34
     protected $x;
35
-    protected $y;              // current position in user unit
36
-    protected $lasth;              // height of last printed cell
37
-    protected $lineWidth;          // line width in user unit
38
-    protected $fontpath;           // path containing fonts
39
-    protected $coreFonts;          // array of core font names
40
-    protected $fonts;              // array of used fonts
41
-    protected $fontFiles;          // array of font files
42
-    protected $encodings;          // array of encodings
43
-    protected $cmaps;              // array of ToUnicode CMaps
44
-    protected $fontFamily;         // current font family
45
-    protected $fontStyle;          // current font style
46
-    protected $underline;          // underlining flag
47
-    protected $currentFont;        // current font info
48
-    protected $fontSizePt;         // current font size in points
49
-    public $fontSize;           // current font size in user unit
50
-    protected $drawColor;          // commands for drawing color
51
-    protected $fillColor;          // commands for filling color
52
-    protected $textColor;          // commands for text color
53
-    protected $colorFlag;          // indicates whether fill and text colors are different
54
-    protected $withAlpha;          // indicates whether alpha channel is used
55
-    protected $ws;                 // word spacing
56
-    protected $images;             // array of used images
57
-    protected $pageLinks;          // array of links in pages
58
-    protected $links;              // array of internal links
59
-    protected $autoPageBreak;      // automatic page breaking
60
-    protected $pageBreakTrigger;   // threshold used to trigger page breaks
61
-    protected $inHeader;           // flag set when processing header
62
-    protected $infooter;           // flag set when processing footer
63
-    protected $aliasNbPages;       // alias for total number of pages
64
-    protected $zoomMode;           // zoom display mode
65
-    protected $layoutMode;         // layout display mode
66
-    protected $metadata;           // document properties
67
-    protected $pdfVersion;         // PDF version number
35
+    protected $y; // current position in user unit
36
+    protected $lasth; // height of last printed cell
37
+    protected $lineWidth; // line width in user unit
38
+    protected $fontpath; // path containing fonts
39
+    protected $coreFonts; // array of core font names
40
+    protected $fonts; // array of used fonts
41
+    protected $fontFiles; // array of font files
42
+    protected $encodings; // array of encodings
43
+    protected $cmaps; // array of ToUnicode CMaps
44
+    protected $fontFamily; // current font family
45
+    protected $fontStyle; // current font style
46
+    protected $underline; // underlining flag
47
+    protected $currentFont; // current font info
48
+    protected $fontSizePt; // current font size in points
49
+    public $fontSize; // current font size in user unit
50
+    protected $drawColor; // commands for drawing color
51
+    protected $fillColor; // commands for filling color
52
+    protected $textColor; // commands for text color
53
+    protected $colorFlag; // indicates whether fill and text colors are different
54
+    protected $withAlpha; // indicates whether alpha channel is used
55
+    protected $ws; // word spacing
56
+    protected $images; // array of used images
57
+    protected $pageLinks; // array of links in pages
58
+    protected $links; // array of internal links
59
+    protected $autoPageBreak; // automatic page breaking
60
+    protected $pageBreakTrigger; // threshold used to trigger page breaks
61
+    protected $inHeader; // flag set when processing header
62
+    protected $infooter; // flag set when processing footer
63
+    protected $aliasNbPages; // alias for total number of pages
64
+    protected $zoomMode; // zoom display mode
65
+    protected $layoutMode; // layout display mode
66
+    protected $metadata; // document properties
67
+    protected $pdfVersion; // PDF version number
68 68
 
69 69
     public function __construct($orientation = 'P', $unit = 'mm', $size = 'A4')
70 70
     {
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $this->withAlpha = false;
98 98
         $this->ws = 0;
99 99
 
100
-        $this->fontpath = __DIR__. FPDF_FONTPATH;
100
+        $this->fontpath = __DIR__ . FPDF_FONTPATH;
101 101
 
102 102
         // Core fonts
103 103
         $this->coreFonts = [
Please login to merge, or discard this patch.
Doc Comments   +56 added lines patch added patch discarded remove patch
@@ -172,6 +172,9 @@  discard block
 block discarded – undo
172 172
         $this->pdfVersion = '1.3';
173 173
     }
174 174
 
175
+    /**
176
+     * @param integer $right
177
+     */
175 178
     public function setMargins($left, $top, $right = null)
176 179
     {
177 180
         // Set left, top and right margins
@@ -204,6 +207,9 @@  discard block
 block discarded – undo
204 207
         $this->rMargin = $margin;
205 208
     }
206 209
 
210
+    /**
211
+     * @param boolean $auto
212
+     */
207 213
     public function setautoPageBreak($auto, $margin = 0)
208 214
     {
209 215
         // Set auto page break mode and triggering margin
@@ -211,6 +217,10 @@  discard block
 block discarded – undo
211 217
         $this->bMargin = $margin;
212 218
         $this->pageBreakTrigger = $this->h - $margin;
213 219
     }
220
+
221
+    /**
222
+     * @param string $zoom
223
+     */
214 224
     public function setDisplayMode($zoom, $layout = 'default')
215 225
     {
216 226
         // Set display mode in viewer
@@ -226,6 +236,9 @@  discard block
 block discarded – undo
226 236
         }
227 237
     }
228 238
 
239
+    /**
240
+     * @param boolean $compress
241
+     */
229 242
     public function setCompression($compress)
230 243
     {
231 244
         // Set page compression
@@ -272,6 +285,9 @@  discard block
 block discarded – undo
272 285
         $this->aliasNbPages = $alias;
273 286
     }
274 287
 
288
+    /**
289
+     * @param string $msg
290
+     */
275 291
     public function error($msg)
276 292
     {
277 293
         // Fatal error
@@ -382,6 +398,12 @@  discard block
 block discarded – undo
382 398
         // Get current page number
383 399
         return $this->page;
384 400
     }
401
+
402
+    /**
403
+     * @param integer $r
404
+     * @param integer $g
405
+     * @param integer $b
406
+     */
385 407
     public function setdrawColor($r, $g = null, $b = null)
386 408
     {
387 409
         // Set color for all stroking operations
@@ -395,6 +417,11 @@  discard block
 block discarded – undo
395 417
         }
396 418
     }
397 419
 
420
+    /**
421
+     * @param integer $r
422
+     * @param integer $g
423
+     * @param integer $b
424
+     */
398 425
     public function setfillColor($r, $g = null, $b = null)
399 426
     {
400 427
         // Set color for all filling operations
@@ -409,6 +436,11 @@  discard block
 block discarded – undo
409 436
         }
410 437
     }
411 438
 
439
+    /**
440
+     * @param integer $r
441
+     * @param integer $g
442
+     * @param integer $b
443
+     */
412 444
     public function settextColor($r, $g = null, $b = null)
413 445
     {
414 446
         // Set color for text
@@ -478,6 +510,9 @@  discard block
 block discarded – undo
478 510
         );
479 511
     }
480 512
 
513
+    /**
514
+     * @param string $family
515
+     */
481 516
     public function addFont($family, $style = '', $file = '')
482 517
     {
483 518
         // Add a TrueType, OpenType or Type1 font
@@ -594,6 +629,10 @@  discard block
 block discarded – undo
594 629
         $this->links[$link] = [$page, $y];
595 630
     }
596 631
 
632
+    /**
633
+     * @param double $y
634
+     * @param string $link
635
+     */
597 636
     public function link($x, $y, $w, $h, $link)
598 637
     {
599 638
         // Put a link on the page
@@ -606,6 +645,10 @@  discard block
 block discarded – undo
606 645
         ];
607 646
     }
608 647
 
648
+    /**
649
+     * @param double $y
650
+     * @param string $txt
651
+     */
609 652
     public function text($x, $y, $txt)
610 653
     {
611 654
         // output a string
@@ -770,6 +813,9 @@  discard block
 block discarded – undo
770 813
         }
771 814
     }
772 815
 
816
+    /**
817
+     * @param integer $h
818
+     */
773 819
     public function multiCell($w, $h, $txt, $border = 0, $align = 'J', $fill = false)
774 820
     {
775 821
         // output text with automatic or explicit line breaks
@@ -970,6 +1016,9 @@  discard block
 block discarded – undo
970 1016
         }
971 1017
     }
972 1018
 
1019
+    /**
1020
+     * @param string $file
1021
+     */
973 1022
     public function image($file, $x = null, $y = null, $w = 0, $h = 0, $type = '', $link = '')
974 1023
     {
975 1024
         // Put an image on the page
@@ -1214,6 +1263,10 @@  discard block
 block discarded – undo
1214 1263
         }
1215 1264
     }
1216 1265
 
1266
+    /**
1267
+     * @param string $orientation
1268
+     * @param string $size
1269
+     */
1217 1270
     protected function beginPage($orientation, $size, $rotation)
1218 1271
     {
1219 1272
         $this->page++;
@@ -1416,6 +1469,9 @@  discard block
 block discarded – undo
1416 1469
         ];
1417 1470
     }
1418 1471
 
1472
+    /**
1473
+     * @param string $file
1474
+     */
1419 1475
     protected function parsePng($file)
1420 1476
     {
1421 1477
         // Extract info from a PNG file
Please login to merge, or discard this patch.
src/NFe/Danfce.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -279,7 +279,6 @@
 block discarded – undo
279 279
 
280 280
     /**
281 281
      * Carrega os dados do xml na classe
282
-     * @param string $xml
283 282
      *
284 283
      * @throws InvalidArgumentException
285 284
      */
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -13,13 +13,11 @@
 block discarded – undo
13 13
  * @link      http://github.com/nfephp-org/sped-da for the canonical source repository
14 14
  */
15 15
 
16
-use DateTime;
17 16
 use Exception;
18 17
 use InvalidArgumentException;
19 18
 use NFePHP\DA\Legacy\Dom;
20 19
 use NFePHP\DA\Legacy\Pdf;
21 20
 use NFePHP\DA\Common\DaCommon;
22
-use Com\Tecnick\Barcode\Barcode;
23 21
 
24 22
 class Danfce extends DaCommon
25 23
 {
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
     protected $paperwidth = 80;
28 28
     protected $descPercent = 0.38;
29 29
     protected $xml; // string XML NFe
30
-    protected $logomarca=''; // path para logomarca em jpg
31
-    protected $formatoChave="#### #### #### #### #### #### #### #### #### #### ####";
30
+    protected $logomarca = ''; // path para logomarca em jpg
31
+    protected $formatoChave = "#### #### #### #### #### #### #### #### #### #### ####";
32 32
     protected $nfeProc;
33 33
     protected $nfe;
34 34
     protected $infNFe;
@@ -220,10 +220,10 @@  discard block
 block discarded – undo
220 220
         //total inicial de paginas
221 221
         $totPag = 1;
222 222
         //largura imprimivel em mm: largura da folha menos as margens esq/direita
223
-        $this->wPrint = $maxW-($margEsq*2);
223
+        $this->wPrint = $maxW - ($margEsq * 2);
224 224
         //comprimento (altura) imprimivel em mm: altura da folha menos as margens
225 225
         //superior e inferior
226
-        $this->hPrint = $maxH-$margSup-$margInf;
226
+        $this->hPrint = $maxH - $margSup - $margInf;
227 227
         // estabelece contagem de paginas
228 228
         $this->pdf->aliasNbPages();
229 229
         $this->pdf->setMargins($margEsq, $margSup); // fixa as margens
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
         $y = $this->blocoIX($y); //informações sobre tributos
248 248
         $y = $this->blocoX($y); //creditos
249 249
         
250
-        $ymark = $maxH/4;
250
+        $ymark = $maxH / 4;
251 251
         if ($this->tpAmb == 2) {
252 252
             $this->pdf->setTextColor(120, 120, 120);
253 253
             $texto = "SEM VALOR FISCAL\nEmitida em ambiente de homologacao";
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
                 $this->margem,
257 257
                 $ymark,
258 258
                 $this->wPrint,
259
-                $maxH/2,
259
+                $maxH / 2,
260 260
                 $texto,
261 261
                 $aFont,
262 262
                 'T',
@@ -273,9 +273,9 @@  discard block
 block discarded – undo
273 273
             $aFont = ['font' => $this->fontePadrao, 'size' => 24, 'style' => 'B'];
274 274
             $this->pdf->textBox(
275 275
                 $this->margem,
276
-                $ymark+4,
276
+                $ymark + 4,
277 277
                 $this->wPrint,
278
-                $maxH/2,
278
+                $maxH / 2,
279 279
                 $texto,
280 280
                 $aFont,
281 281
                 'T',
@@ -287,9 +287,9 @@  discard block
 block discarded – undo
287 287
             $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
288 288
             $this->pdf->textBox(
289 289
                 $this->margem,
290
-                $ymark+14,
290
+                $ymark + 14,
291 291
                 $this->wPrint,
292
-                $maxH/2,
292
+                $maxH / 2,
293 293
                 $this->submessage,
294 294
                 $aFont,
295 295
                 'T',
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
             $y = $this->blocoVIII($y); //QRCODE
318 318
             $y = $this->blocoIX($y); //informações sobre tributos
319 319
             $y = $this->blocoX($y); //creditos
320
-            $ymark = $maxH/4;
320
+            $ymark = $maxH / 4;
321 321
             if ($this->tpAmb == 2) {
322 322
                 $this->pdf->setTextColor(120, 120, 120);
323 323
                 $texto = "SEM VALOR FISCAL\nEmitida em ambiente de homologacao";
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
                     $this->margem,
327 327
                     $ymark,
328 328
                     $this->wPrint,
329
-                    $maxH/2,
329
+                    $maxH / 2,
330 330
                     $texto,
331 331
                     $aFont,
332 332
                     'T',
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
             } elseif (!empty($retEvento = $this->nfeProc->getElementsByTagName('retEvento')->item(0))) {
411 411
                 $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0);
412 412
                 $cStat = $this->getTagValue($infEvento, "cStat");
413
-                $tpEvento= $this->getTagValue($infEvento, "tpEvento");
413
+                $tpEvento = $this->getTagValue($infEvento, "tpEvento");
414 414
                 $dhEvento = date("d/m/Y H:i:s", $this->toTimestamp($this->getTagValue($infEvento, "dhRegEvento")));
415 415
                 $nProt = $this->getTagValue($infEvento, "nProt");
416 416
                 if ($tpEvento == '110111' && ($cStat == '101' || $cStat == '151' || $cStat == '135' || $cStat == '155')) {
Please login to merge, or discard this patch.
src/NFe/Traits/TraitBlocoI.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -31,13 +31,13 @@  discard block
 block discarded – undo
31 31
             $xImg = $this->margem;
32 32
             $yImg = $this->margem + 1;
33 33
             $logoInfo = getimagesize($this->logomarca);
34
-            $logoWmm = ($logoInfo[0]/72)*25.4;
35
-            $logoHmm = ($logoInfo[1]/72)*25.4;
36
-            $nImgW = $this->wPrint/4;
37
-            $nImgH = round($logoHmm * ($nImgW/$logoWmm), 0);
34
+            $logoWmm = ($logoInfo[0] / 72) * 25.4;
35
+            $logoHmm = ($logoInfo[1] / 72) * 25.4;
36
+            $nImgW = $this->wPrint / 4;
37
+            $nImgH = round($logoHmm * ($nImgW / $logoWmm), 0);
38 38
             if ($nImgH > $maxHimg) {
39 39
                 $nImgH = $maxHimg;
40
-                $nImgW = round($logoWmm * ($nImgH/$logoHmm), 0);
40
+                $nImgW = round($logoWmm * ($nImgH / $logoHmm), 0);
41 41
             }
42 42
             $xRs = ($nImgW) + $this->margem;
43 43
             $wRs = ($this->wPrint - $nImgW);
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
         $aFont = ['font'=>$this->fontePadrao, 'size' => 8, 'style' => ''];
53 53
         $texto = "{$emitRazao}";
54 54
         $y += $this->pdf->textBox(
55
-            $xRs+2,
55
+            $xRs + 2,
56 56
             $this->margem,
57
-            $wRs-2,
58
-            $this->bloco1H-$this->margem-1,
57
+            $wRs - 2,
58
+            $this->bloco1H - $this->margem - 1,
59 59
             $texto,
60 60
             $aFont,
61 61
             'T',
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
             $aFont = ['font'=>$this->fontePadrao, 'size' => $this->pdf->fontSizePt, 'style' => ''];
69 69
         }
70 70
         $texto = "CNPJ: {$emitCnpj} IE: {$emitIE}";
71
-        $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
71
+        $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
72 72
         $texto = $emitLgr . ", " . $emitNro;
73
-        $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
73
+        $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
74 74
         $texto = $emitBairro;
75
-        $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
75
+        $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
76 76
         $texto = $emitMun . "-" . $emitUF;
77
-        $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
77
+        $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
78 78
         $this->pdf->dashedHLine($this->margem, $this->bloco1H, $this->wPrint, 0.1, 30);
79 79
         return $this->bloco1H;
80 80
     }
Please login to merge, or discard this patch.
src/NFe/Traits/TraitBlocoII.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => ''];
35 35
             $y1 += $this->pdf->textBox(
36 36
                 $this->margem,
37
-                $y+$y1,
37
+                $y + $y1,
38 38
                 $this->wPrint,
39 39
                 2,
40 40
                 $texto,
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             $aFont = ['font'=> $this->fontePadrao, 'size' => 10, 'style' => 'B'];
51 51
             $y2 = $this->pdf->textBox(
52 52
                 $this->margem,
53
-                $y+$y1,
53
+                $y + $y1,
54 54
                 $this->wPrint,
55 55
                 4,
56 56
                 $texto,
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             $aFont = ['font'=> $this->fontePadrao, 'size' => 8, 'style' => 'I'];
67 67
             $this->pdf->textBox(
68 68
                 $this->margem,
69
-                $y+$y1+$y2,
69
+                $y + $y1 + $y2,
70 70
                 $this->wPrint,
71 71
                 3,
72 72
                 $texto,
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => ''];
84 84
             $y1 = $this->pdf->textBox(
85 85
                 $this->margem,
86
-                $this->bloco1H-2,
86
+                $this->bloco1H - 2,
87 87
                 $this->wPrint,
88 88
                 $this->bloco2H,
89 89
                 $texto,
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                 true
96 96
             );
97 97
         }
98
-        $this->pdf->dashedHLine($this->margem, $this->bloco2H+$y, $this->wPrint, 0.1, 30);
98
+        $this->pdf->dashedHLine($this->margem, $this->bloco2H + $y, $this->wPrint, 0.1, 30);
99 99
         return $this->bloco2H + $y;
100 100
     }
101 101
 }
Please login to merge, or discard this patch.
src/NFe/Traits/TraitBlocoVI.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
             false
31 31
         );
32 32
         
33
-        $texto =  $this->urlChave;
33
+        $texto = $this->urlChave;
34 34
         $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => ''];
35 35
         $y2 = $this->pdf->textBox(
36 36
             $this->margem,
37
-            $y+$y1,
37
+            $y + $y1,
38 38
             $this->wPrint,
39 39
             2,
40 40
             $texto,
@@ -46,12 +46,12 @@  discard block
 block discarded – undo
46 46
             false
47 47
         );
48 48
         
49
-        $chave =  str_replace('NFe', '', $this->infNFe->getAttribute("Id"));
49
+        $chave = str_replace('NFe', '', $this->infNFe->getAttribute("Id"));
50 50
         $texto = $this->formatField($chave, $this->formatoChave);
51 51
         $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => ''];
52 52
         $y3 = $this->pdf->textBox(
53 53
             $this->margem,
54
-            $y+$y1+$y2+1,
54
+            $y + $y1 + $y2 + 1,
55 55
             $this->wPrint,
56 56
             2,
57 57
             $texto,
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             '',
63 63
             true
64 64
         );
65
-        $this->pdf->dashedHLine($this->margem, $this->bloco6H+$y, $this->wPrint, 0.1, 30);
65
+        $this->pdf->dashedHLine($this->margem, $this->bloco6H + $y, $this->wPrint, 0.1, 30);
66 66
         return $this->bloco6H + $y;
67 67
     }
68 68
 }
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -7,6 +7,9 @@
 block discarded – undo
7 7
  */
8 8
 trait TraitBlocoVI
9 9
 {
10
+    /**
11
+     * @param double $y
12
+     */
10 13
     protected function blocoVI($y)
11 14
     {
12 15
         //$this->bloco6H = 10;
Please login to merge, or discard this patch.
src/NFe/Traits/TraitBlocoIV.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         $this->pdf->textBox(
25 25
             $this->margem,
26 26
             $y,
27
-            $this->wPrint/2,
27
+            $this->wPrint / 2,
28 28
             3,
29 29
             $texto,
30 30
             $aFont,
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
             false
36 36
         );
37 37
         $y1 = $this->pdf->textBox(
38
-            $this->margem+$this->wPrint/2,
38
+            $this->margem + $this->wPrint / 2,
39 39
             $y,
40
-            $this->wPrint/2,
40
+            $this->wPrint / 2,
41 41
             3,
42 42
             $qtd,
43 43
             $aFont,
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
         $texto = "Valor Total R$";
52 52
         $this->pdf->textBox(
53 53
             $this->margem,
54
-            $y+$y1,
55
-            $this->wPrint/2,
54
+            $y + $y1,
55
+            $this->wPrint / 2,
56 56
             3,
57 57
             $texto,
58 58
             $aFont,
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
         );
65 65
         $texto = number_format((float) $bruto, 2, ',', '.');
66 66
         $y2 = $this->pdf->textBox(
67
-            $this->margem+$this->wPrint/2,
68
-            $y+$y1,
69
-            $this->wPrint/2,
67
+            $this->margem + $this->wPrint / 2,
68
+            $y + $y1,
69
+            $this->wPrint / 2,
70 70
             3,
71 71
             $texto,
72 72
             $aFont,
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
         $texto = "Desconto R$";
81 81
         $this->pdf->textBox(
82 82
             $this->margem,
83
-            $y+$y1+$y2,
84
-            $this->wPrint/2,
83
+            $y + $y1 + $y2,
84
+            $this->wPrint / 2,
85 85
             3,
86 86
             $texto,
87 87
             $aFont,
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
         );
94 94
         $texto = number_format((float) $desconto, 2, ',', '.');
95 95
         $y3 = $this->pdf->textBox(
96
-            $this->margem+$this->wPrint/2,
97
-            $y+$y1+$y2,
98
-            $this->wPrint/2,
96
+            $this->margem + $this->wPrint / 2,
97
+            $y + $y1 + $y2,
98
+            $this->wPrint / 2,
99 99
             3,
100 100
             $texto,
101 101
             $aFont,
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
         $texto = "Valor a Pagar R$";
114 114
         $this->pdf->textBox(
115 115
             $this->margem,
116
-            $y+$y1+$y2+$y3,
117
-            $this->wPrint/2,
116
+            $y + $y1 + $y2 + $y3,
117
+            $this->wPrint / 2,
118 118
             3,
119 119
             $texto,
120 120
             $aFont,
@@ -126,9 +126,9 @@  discard block
 block discarded – undo
126 126
         );
127 127
         $texto = number_format((float) $valor, 2, ',', '.');
128 128
         $y4 = $this->pdf->textBox(
129
-            $this->margem+$this->wPrint/2,
130
-            $y+$y1+$y2+$y3,
131
-            $this->wPrint/2,
129
+            $this->margem + $this->wPrint / 2,
130
+            $y + $y1 + $y2 + $y3,
131
+            $this->wPrint / 2,
132 132
             3,
133 133
             $texto,
134 134
             $aFont,
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
             false
140 140
         );
141 141
         
142
-        $this->pdf->dashedHLine($this->margem, $this->bloco4H+$y, $this->wPrint, 0.1, 30);
142
+        $this->pdf->dashedHLine($this->margem, $this->bloco4H + $y, $this->wPrint, 0.1, 30);
143 143
         return $this->bloco4H + $y;
144 144
     }
145 145
 }
Please login to merge, or discard this patch.