Completed
Push — master ( 572257...cbb0fa )
by Roberto
03:42 queued 48s
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
@@ -945,7 +945,7 @@  discard block
 block discarded – undo
945 945
             $n = count($resp['message']);
946 946
             $alttot = $n * 15;
947 947
             $x = 10;
948
-            $y = $this->hPrint/2 - $alttot/2;
948
+            $y = $this->hPrint / 2 - $alttot / 2;
949 949
             $h = 15;
950 950
             $w = $maxW - (2 * $x);
951 951
             $this->pdf->settextcolor(90, 90, 90);
@@ -1271,8 +1271,7 @@  discard block
 block discarded – undo
1271 1271
             $texto = $this->getTagValue($this->enderExped, "xLgr") . ', ';
1272 1272
             $texto .= $this->getTagValue($this->enderExped, "nro");
1273 1273
             $texto .= $this->getTagValue($this->enderExped, "xCpl") != "" ?
1274
-                ' - ' . $this->getTagValue($this->enderExped, "xCpl") :
1275
-                '';
1274
+                ' - ' . $this->getTagValue($this->enderExped, "xCpl") : '';
1276 1275
         } else {
1277 1276
             $texto = '';
1278 1277
         }
@@ -1368,8 +1367,7 @@  discard block
 block discarded – undo
1368 1367
             $texto = $this->getTagValue($this->enderReceb, "xLgr") . ', ';
1369 1368
             $texto .= $this->getTagValue($this->enderReceb, "nro");
1370 1369
             $texto .= ($this->getTagValue($this->enderReceb, "xCpl") != "") ?
1371
-                ' - ' . $this->getTagValue($this->enderReceb, "xCpl") :
1372
-                '';
1370
+                ' - ' . $this->getTagValue($this->enderReceb, "xCpl") : '';
1373 1371
         } else {
1374 1372
             $texto = '';
1375 1373
         }
@@ -1625,7 +1623,7 @@  discard block
 block discarded – undo
1625 1623
         $qCarga = 0;
1626 1624
         foreach ($this->infQ as $infQ) {
1627 1625
             if ($this->getTagValue($infQ, "cUnid") == '00') {
1628
-                $qCarga += (float)$this->getTagValue($infQ, "qCarga");
1626
+                $qCarga += (float) $this->getTagValue($infQ, "qCarga");
1629 1627
             }
1630 1628
         }
1631 1629
         $texto = !empty($qCarga) ? number_format($qCarga, 3, ",", ".") : '';
@@ -1642,7 +1640,7 @@  discard block
 block discarded – undo
1642 1640
         $qCarga = 0;
1643 1641
         foreach ($this->infQ as $infQ) {
1644 1642
             if ($this->getTagValue($infQ, "cUnid") == '03') {
1645
-                $qCarga += (float)$this->getTagValue($infQ, "qCarga");
1643
+                $qCarga += (float) $this->getTagValue($infQ, "qCarga");
1646 1644
             }
1647 1645
         }
1648 1646
         $texto = !empty($qCarga) ? number_format($qCarga, 3, ",", ".") : '';
@@ -3572,7 +3570,7 @@  discard block
 block discarded – undo
3572 3570
         $y = $y + 5;
3573 3571
         $this->pdf->line($x, $y + 3, $w * 0.255, $y + 3); // LINHA HORIZONTAL ACIMA DO RG ABAIXO DO NOME
3574 3572
         $texto = 'RG';
3575
-        $aFont = ['font' => $this->fontePadrao,'size' => 6,'style' => ''];
3573
+        $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3576 3574
         $this->pdf->textBox($x, $y + 3, $w * 0.33, $h, $texto, $aFont, 'T', 'L', 0, '');
3577 3575
         $x += $w * 0.85;
3578 3576
         $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 3 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   +225 added lines, -226 removed lines patch added patch discarded remove patch
@@ -331,28 +331,28 @@  discard block
 block discarded – undo
331 331
     {
332 332
         $this->textoAdic = '';
333 333
         //informações adicionais
334
-        $fontProduto            = [
334
+        $fontProduto = [
335 335
             'font'  => $this->fontePadrao,
336 336
             'size'  => 8,
337 337
             'style' => ''
338 338
         ];
339 339
         $k                      = $this->pdf->k;
340 340
         $this->textadicfontsize = $fontProduto['size'] / $k;
341
-        $this->textoAdic        .= $this->geraInformacoesDasNotasReferenciadas();
341
+        $this->textoAdic .= $this->geraInformacoesDasNotasReferenciadas();
342 342
         if (isset($this->infAdic)) {
343 343
             $i = 0;
344 344
             if ($this->textoAdic != '') {
345 345
                 $this->textoAdic .= ". \n";
346 346
             }
347
-            $this->textoAdic .= ! empty($this->getTagValue($this->infAdic, "infCpl"))
347
+            $this->textoAdic .= !empty($this->getTagValue($this->infAdic, "infCpl"))
348 348
                 ? 'Inf. Contribuinte: ' . $this->anfaveaDANFE($this->getTagValue($this->infAdic, "infCpl"))
349 349
                 : '';
350
-            $infPedido       = $this->geraInformacoesDaTagCompra();
350
+            $infPedido = $this->geraInformacoesDaTagCompra();
351 351
             if ($infPedido != "") {
352 352
                 $this->textoAdic .= $infPedido;
353 353
             }
354 354
             $this->textoAdic .= $this->getTagValue($this->dest, "email", ' Email do Destinatário: ');
355
-            $this->textoAdic .= ! empty($this->getTagValue($this->infAdic, "infAdFisco"))
355
+            $this->textoAdic .= !empty($this->getTagValue($this->infAdic, "infAdFisco"))
356 356
                 ? "\n Inf. fisco: " . $this->getTagValue($this->infAdic, "infAdFisco")
357 357
                 : '';
358 358
             if ($this->obsshow) {
@@ -360,11 +360,11 @@  discard block
 block discarded – undo
360 360
                 if (isset($obsCont)) {
361 361
                     foreach ($obsCont as $obs) {
362 362
                         $campo = $obsCont->item($i)->getAttribute("xCampo");
363
-                        $xTexto = ! empty($obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue)
363
+                        $xTexto = !empty($obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue)
364 364
                             ? $obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue
365 365
                             : '';
366 366
                         $this->textoAdic .= "\n" . $campo . ':  ' . trim($xTexto);
367
-                        $i ++;
367
+                        $i++;
368 368
                     }
369 369
                 }
370 370
             }
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
             $flagVTT  = $flagVTT && (strpos(strtolower(trim($this->textoAdic)), 'trib') ||
380 380
                     strpos(strtolower(trim($this->textoAdic)), 'imp'));
381 381
             $vTotTrib = $this->getTagValue($this->ICMSTot, 'vTotTrib');
382
-            if ($vTotTrib != '' && ! $flagVTT) {
382
+            if ($vTotTrib != '' && !$flagVTT) {
383 383
                 $this->textoAdic .= "\n Valor Aproximado dos Tributos : R$ "
384 384
                     . number_format($vTotTrib, 2, ",", ".");
385 385
             }
@@ -390,9 +390,9 @@  discard block
 block discarded – undo
390 390
         $this->textadicfontsize = $this->pdf->fontSize;
391 391
         $hdadosadic             = ceil($numlinhasdados * ($this->textadicfontsize));
392 392
         if ($hdadosadic > 70) {
393
-            for ($f = 8; $f > 3; $f --) {
393
+            for ($f = 8; $f > 3; $f--) {
394 394
                 $this->pdf->setFont($this->fontePadrao, '', $f);
395
-                $fontProduto            = [
395
+                $fontProduto = [
396 396
                     'font'  => $this->fontePadrao,
397 397
                     'size'  => $f,
398 398
                     'style' => ''
@@ -516,9 +516,9 @@  discard block
 block discarded – undo
516 516
         $this->hdadosadic = $this->calculoEspacoVericalDadosAdicionais();
517 517
 
518 518
         //altura disponivel para os campos da DANFE
519
-        $hcabecalho    = 47;//para cabeçalho
520
-        $hdestinatario = 25;//para destinatario
521
-        $hduplicatas   = 12;//para cada grupo de 7 duplicatas
519
+        $hcabecalho    = 47; //para cabeçalho
520
+        $hdestinatario = 25; //para destinatario
521
+        $hduplicatas   = 12; //para cada grupo de 7 duplicatas
522 522
         if (isset($this->entrega)) {
523 523
             $hlocalentrega = 25;
524 524
         } else {
@@ -529,11 +529,11 @@  discard block
 block discarded – undo
529 529
         } else {
530 530
             $hlocalretirada = 0;
531 531
         }
532
-        $himposto    = 18;// para imposto
533
-        $htransporte = 25;// para transporte
534
-        $hissqn      = 11;// para issqn
535
-        $hfooter     = 5;// para rodape
536
-        $hCabecItens = 4;//cabeçalho dos itens
532
+        $himposto    = 18; // para imposto
533
+        $htransporte = 25; // para transporte
534
+        $hissqn      = 11; // para issqn
535
+        $hfooter     = 5; // para rodape
536
+        $hCabecItens = 4; //cabeçalho dos itens
537 537
         $hOCUPADA    = $hcabecalho
538 538
             + $hdestinatario
539 539
             + $hlocalentrega
@@ -556,10 +556,10 @@  discard block
 block discarded – undo
556 556
         $this->sizeExtraTextoFatura());*/
557 557
 
558 558
         if ($this->orientacao == 'P') {
559
-            $hDispo1 -= 24 * $this->qCanhoto;//para canhoto
560
-            $w       = $this->wPrint;
559
+            $hDispo1 -= 24 * $this->qCanhoto; //para canhoto
560
+            $w = $this->wPrint;
561 561
         } else {
562
-            $hcanhoto = $this->hPrint;//para canhoto
562
+            $hcanhoto = $this->hPrint; //para canhoto
563 563
             $w        = $this->wPrint - $this->wCanhoto;
564 564
         }
565 565
         //$hDispo1 += 14;
@@ -594,12 +594,12 @@  discard block
 block discarded – undo
594 594
             );
595 595
             $hUsado += $this->calculeHeight($itemProd, $mostrarUnidadeTributavel);
596 596
             if ($hUsado > $hDispo) {
597
-                $totPag ++;
597
+                $totPag++;
598 598
                 $hDispo = $hDispo2;
599 599
                 $hUsado = $hCabecItens;
600
-                $i --; // decrementa para readicionar o item que não coube nessa pagina na outra.
600
+                $i--; // decrementa para readicionar o item que não coube nessa pagina na outra.
601 601
             }
602
-            $i ++;
602
+            $i++;
603 603
         } //fim da soma das areas de itens usadas
604 604
         $qtdeItens = $i; //controle da quantidade de itens no DANFE
605 605
         //montagem da primeira página
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
         $formaPag = [];
632 632
         if (isset($this->detPag) && $this->detPag->length > 0) {
633 633
             foreach ($this->detPag as $k => $d) {
634
-                $fPag            = ! empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
634
+                $fPag            = !empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
635 635
                     ? $this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue
636 636
                     : '0';
637 637
                 $formaPag[$fPag] = $fPag;
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
         }
676 676
 
677 677
         //loop para páginas seguintes
678
-        for ($n = 2; $n <= $totPag; $n ++) {
678
+        for ($n = 2; $n <= $totPag; $n++) {
679 679
             // fixa as margens
680 680
             $this->pdf->setMargins($this->margesq, $this->margsup);
681 681
             //adiciona nova página
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
             }
700 700
             //se estiver na última página e ainda restar itens para inserir, adiciona mais uma página
701 701
             if ($n == $totPag && $this->qtdeItensProc < $qtdeItens) {
702
-                $totPag ++;
702
+                $totPag++;
703 703
             }
704 704
         }
705 705
     }
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
         if ($startPos === false) {
729 729
             return $cdata;
730 730
         }
731
-        for ($x = $len; $x > 0; $x --) {
731
+        for ($x = $len; $x > 0; $x--) {
732 732
             if (substr($cdata, $x, 1) == '>') {
733 733
                 $endPos = $x;
734 734
                 break;
@@ -824,15 +824,15 @@  discard block
 block discarded – undo
824 824
         //grupo CADATA infCpl
825 825
         $t          = $dom->getElementsByTagName('transmissor')->item(0);
826 826
         $r          = $dom->getElementsByTagName('receptor')->item(0);
827
-        $versao     = ! empty($dom->getElementsByTagName('versao')->item(0)->nodeValue) ?
827
+        $versao     = !empty($dom->getElementsByTagName('versao')->item(0)->nodeValue) ?
828 828
             'Versao:' . $dom->getElementsByTagName('versao')->item(0)->nodeValue . ' ' : '';
829
-        $especieNF  = ! empty($dom->getElementsByTagName('especieNF')->item(0)->nodeValue) ?
829
+        $especieNF  = !empty($dom->getElementsByTagName('especieNF')->item(0)->nodeValue) ?
830 830
             'Especie:' . $dom->getElementsByTagName('especieNF')->item(0)->nodeValue . ' ' : '';
831
-        $fabEntrega = ! empty($dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue) ?
831
+        $fabEntrega = !empty($dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue) ?
832 832
             'Entrega:' . $dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue . ' ' : '';
833
-        $dca        = ! empty($dom->getElementsByTagName('dca')->item(0)->nodeValue) ?
833
+        $dca        = !empty($dom->getElementsByTagName('dca')->item(0)->nodeValue) ?
834 834
             'dca:' . $dom->getElementsByTagName('dca')->item(0)->nodeValue . ' ' : '';
835
-        $texto      .= "" . $versao . $especieNF . $fabEntrega . $dca;
835
+        $texto .= "" . $versao . $especieNF . $fabEntrega . $dca;
836 836
         if (isset($t)) {
837 837
             if ($t->hasAttributes()) {
838 838
                 $texto .= " Transmissor ";
@@ -878,7 +878,7 @@  discard block
 block discarded – undo
878 878
         } else {
879 879
             if ($this->getTagValue($this->ide, "tpAmb") == '2') {
880 880
                 $resp['status'] = false;
881
-                $resp['message'][] =  "NFe EMITIDA EM HOMOLOGAÇÃO";
881
+                $resp['message'][] = "NFe EMITIDA EM HOMOLOGAÇÃO";
882 882
             }
883 883
             $retEvento = $this->nfeProc->getElementsByTagName('retEvento')->item(0);
884 884
             $cStat = $this->getTagValue($this->nfeProc, "cStat");
@@ -899,7 +899,7 @@  discard block
 block discarded – undo
899 899
             } elseif (!empty($retEvento)) {
900 900
                 $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0);
901 901
                 $cStat = $this->getTagValue($infEvento, "cStat");
902
-                $tpEvento= $this->getTagValue($infEvento, "tpEvento");
902
+                $tpEvento = $this->getTagValue($infEvento, "tpEvento");
903 903
                 $dhEvento = $this->toDateTime($this->getTagValue($infEvento, "dhRegEvento"))->format("d/m/Y H:i:s");
904 904
                 $nProt = $this->getTagValue($infEvento, "nProt");
905 905
                 if ($tpEvento == '110111' &&
@@ -963,7 +963,7 @@  discard block
 block discarded – undo
963 963
         //se for right separa 2/3 para os dados e o terço seguinte para o logo
964 964
         //se não houver logo centraliza dos dados do emitente
965 965
         // coloca o logo
966
-        if (! empty($this->logomarca)) {
966
+        if (!empty($this->logomarca)) {
967 967
             $logoInfo = getimagesize($this->logomarca);
968 968
             //largura da imagem em mm
969 969
             $logoWmm = ($logoInfo[0] / 72) * 25.4;
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
             //endereço
1020 1020
             $y1     = $y1 + 5;
1021 1021
             $aFont  = ['font' => $this->fontePadrao, 'size' => 8, 'style' => ''];
1022
-            $fone   = ! empty($this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue)
1022
+            $fone   = !empty($this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue)
1023 1023
                 ? $this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue
1024 1024
                 : '';
1025 1025
             $lgr    = $this->getTagValue($this->enderEmit, "xLgr");
@@ -1038,8 +1038,8 @@  discard block
 block discarded – undo
1038 1038
 
1039 1039
         //####################################################################################
1040 1040
         //coluna central Danfe
1041
-        $x  += $w;
1042
-        $w  = round($maxW * 0.17, 0);//35;
1041
+        $x += $w;
1042
+        $w  = round($maxW * 0.17, 0); //35;
1043 1043
         $w2 = $w;
1044 1044
         $h  = 32;
1045 1045
         $this->pdf->textBox($x, $y, $w, $h);
@@ -1096,8 +1096,8 @@  discard block
 block discarded – undo
1096 1096
 
1097 1097
         //####################################################################################
1098 1098
         //coluna codigo de barras
1099
-        $x  += $w;
1100
-        $w  = ($maxW - $w1 - $w2);//85;
1099
+        $x += $w;
1100
+        $w  = ($maxW - $w1 - $w2); //85;
1101 1101
         $w3 = $w;
1102 1102
         $h  = 32;
1103 1103
         $this->pdf->textBox($x, $y, $w, $h);
@@ -1159,7 +1159,7 @@  discard block
 block discarded – undo
1159 1159
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1160 1160
         $w     = $w1 + $w2;
1161 1161
         $y     = $oldY;
1162
-        $oldY  += $h;
1162
+        $oldY += $h;
1163 1163
         $x     = $oldX;
1164 1164
         $h     = 7;
1165 1165
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1190,7 +1190,7 @@  discard block
 block discarded – undo
1190 1190
                 $cStat = '';
1191 1191
             } else {
1192 1192
                 if (isset($this->nfeProc)) {
1193
-                    $texto  = ! empty($this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue)
1193
+                    $texto  = !empty($this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue)
1194 1194
                         ? $this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue
1195 1195
                         : '';
1196 1196
                     $dtHora = $this->toDateTime(
@@ -1220,7 +1220,7 @@  discard block
 block discarded – undo
1220 1220
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1221 1221
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1222 1222
         //INSCRIÇÃO MUNICIPAL
1223
-        $x     += $w;
1223
+        $x += $w;
1224 1224
         $texto = 'INSCRIÇÃO MUNICIPAL';
1225 1225
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1226 1226
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1228,29 +1228,29 @@  discard block
 block discarded – undo
1228 1228
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1229 1229
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1230 1230
         //INSCRIÇÃO ESTADUAL DO SUBST. TRIBUT.
1231
-        $x     += $w;
1231
+        $x += $w;
1232 1232
         $texto = 'INSCRIÇÃO ESTADUAL DO SUBST. TRIBUT.';
1233 1233
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1234 1234
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1235
-        $texto = ! empty($this->emit->getElementsByTagName("IEST")->item(0)->nodeValue)
1235
+        $texto = !empty($this->emit->getElementsByTagName("IEST")->item(0)->nodeValue)
1236 1236
             ? $this->emit->getElementsByTagName("IEST")->item(0)->nodeValue
1237 1237
             : '';
1238 1238
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1239 1239
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1240 1240
         //CNPJ
1241
-        $x     += $w;
1241
+        $x += $w;
1242 1242
         $w     = ($maxW - (3 * $w));
1243 1243
         $texto = 'CNPJ / CPF';
1244 1244
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1245 1245
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1246 1246
         //Pegando valor do CPF/CNPJ
1247
-        if (! empty($this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1247
+        if (!empty($this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1248 1248
             $texto = $this->formatField(
1249 1249
                 $this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1250 1250
                 "###.###.###/####-##"
1251 1251
             );
1252 1252
         } else {
1253
-            $texto = ! empty($this->emit->getElementsByTagName("CPF")->item(0)->nodeValue)
1253
+            $texto = !empty($this->emit->getElementsByTagName("CPF")->item(0)->nodeValue)
1254 1254
                 ? $this->formatField(
1255 1255
                     $this->emit->getElementsByTagName("CPF")->item(0)->nodeValue,
1256 1256
                     "###.###.###-##"
@@ -1269,7 +1269,7 @@  discard block
 block discarded – undo
1269 1269
             $n = count($resp['message']);
1270 1270
             $alttot = $n * 15;
1271 1271
             $x = 10;
1272
-            $y = $this->hPrint/2 - $alttot/2;
1272
+            $y = $this->hPrint / 2 - $alttot / 2;
1273 1273
             $h = 15;
1274 1274
             $w = $maxW - (2 * $x);
1275 1275
             $this->pdf->settextcolor(90, 90, 90);
@@ -1342,7 +1342,7 @@  discard block
 block discarded – undo
1342 1342
         //NOME / RAZÃO SOCIAL
1343 1343
         $w     = round($maxW * 0.61, 0);
1344 1344
         $w1    = $w;
1345
-        $y     += 3;
1345
+        $y += 3;
1346 1346
         $texto = 'NOME / RAZÃO SOCIAL';
1347 1347
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1348 1348
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1354,20 +1354,20 @@  discard block
 block discarded – undo
1354 1354
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, '');
1355 1355
         }
1356 1356
         //CNPJ / CPF
1357
-        $x     += $w;
1357
+        $x += $w;
1358 1358
         $w     = round($maxW * 0.23, 0);
1359 1359
         $w2    = $w;
1360 1360
         $texto = 'CNPJ / CPF';
1361 1361
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1362 1362
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1363 1363
         //Pegando valor do CPF/CNPJ
1364
-        if (! empty($this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1364
+        if (!empty($this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1365 1365
             $texto = $this->formatField(
1366 1366
                 $this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1367 1367
                 "###.###.###/####-##"
1368 1368
             );
1369 1369
         } else {
1370
-            $texto = ! empty($this->dest->getElementsByTagName("CPF")->item(0)->nodeValue)
1370
+            $texto = !empty($this->dest->getElementsByTagName("CPF")->item(0)->nodeValue)
1371 1371
                 ? $this->formatField(
1372 1372
                     $this->dest->getElementsByTagName("CPF")->item(0)->nodeValue,
1373 1373
                     "###.###.###-##"
@@ -1377,17 +1377,17 @@  discard block
 block discarded – undo
1377 1377
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1378 1378
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1379 1379
         //DATA DA EMISSÃO
1380
-        $x     += $w;
1380
+        $x += $w;
1381 1381
         $w     = $maxW - ($w1 + $w2);
1382 1382
         $wx    = $w;
1383 1383
         $texto = 'DATA DA EMISSÃO';
1384 1384
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1385 1385
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1386
-        $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue)
1386
+        $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue)
1387 1387
             ? $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue
1388 1388
             : '';
1389 1389
         if ($dEmi == '') {
1390
-            $dEmi  = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue)
1390
+            $dEmi  = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue)
1391 1391
                 ? $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue
1392 1392
                 : '';
1393 1393
             $aDemi = explode('T', $dEmi);
@@ -1403,7 +1403,7 @@  discard block
 block discarded – undo
1403 1403
         //ENDEREÇO
1404 1404
         $w     = round($maxW * 0.47, 0);
1405 1405
         $w1    = $w;
1406
-        $y     += $h;
1406
+        $y += $h;
1407 1407
         $x     = $oldX;
1408 1408
         $texto = 'ENDEREÇO';
1409 1409
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1415,7 +1415,7 @@  discard block
 block discarded – undo
1415 1415
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1416 1416
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true);
1417 1417
         //BAIRRO / DISTRITO
1418
-        $x     += $w;
1418
+        $x += $w;
1419 1419
         $w     = round($maxW * 0.21, 0);
1420 1420
         $w2    = $w;
1421 1421
         $texto = 'BAIRRO / DISTRITO';
@@ -1425,29 +1425,29 @@  discard block
 block discarded – undo
1425 1425
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1426 1426
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1427 1427
         //CEP
1428
-        $x     += $w;
1428
+        $x += $w;
1429 1429
         $w     = $maxW - $w1 - $w2 - $wx;
1430 1430
         $w2    = $w;
1431 1431
         $texto = 'CEP';
1432 1432
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1433 1433
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1434
-        $texto = ! empty($this->dest->getElementsByTagName("CEP")->item(0)->nodeValue)
1434
+        $texto = !empty($this->dest->getElementsByTagName("CEP")->item(0)->nodeValue)
1435 1435
             ? $this->dest->getElementsByTagName("CEP")->item(0)->nodeValue
1436 1436
             : '';
1437 1437
         $texto = $this->formatField($texto, "#####-###");
1438 1438
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1439 1439
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1440 1440
         //DATA DA SAÍDA
1441
-        $x     += $w;
1441
+        $x += $w;
1442 1442
         $w     = $wx;
1443 1443
         $texto = 'DATA DA SAÍDA/ENTRADA';
1444 1444
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1445 1445
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1446
-        $dSaiEnt = ! empty($this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue)
1446
+        $dSaiEnt = !empty($this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue)
1447 1447
             ? $this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue
1448 1448
             : '';
1449 1449
         if ($dSaiEnt == '') {
1450
-            $dSaiEnt  = ! empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1450
+            $dSaiEnt  = !empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1451 1451
                 ? $this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue
1452 1452
                 : '';
1453 1453
             $aDsaient = explode('T', $dSaiEnt);
@@ -1458,7 +1458,7 @@  discard block
 block discarded – undo
1458 1458
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1459 1459
         //MUNICÍPIO
1460 1460
         $w     = $w1;
1461
-        $y     += $h;
1461
+        $y += $h;
1462 1462
         $x     = $oldX;
1463 1463
         $texto = 'MUNICÍPIO';
1464 1464
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1472,7 +1472,7 @@  discard block
 block discarded – undo
1472 1472
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1473 1473
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
1474 1474
         //UF
1475
-        $x     += $w;
1475
+        $x += $w;
1476 1476
         $w     = 8;
1477 1477
         $texto = 'UF';
1478 1478
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1481,19 +1481,19 @@  discard block
 block discarded – undo
1481 1481
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1482 1482
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1483 1483
         //FONE / FAX
1484
-        $x     += $w;
1484
+        $x += $w;
1485 1485
         $w     = round(($maxW - $w1 - $wx - 8) / 2, 0);
1486 1486
         $w3    = $w;
1487 1487
         $texto = 'FONE / FAX';
1488 1488
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1489 1489
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1490
-        $texto = ! empty($this->dest->getElementsByTagName("fone")->item(0)->nodeValue)
1490
+        $texto = !empty($this->dest->getElementsByTagName("fone")->item(0)->nodeValue)
1491 1491
             ? $this->dest->getElementsByTagName("fone")->item(0)->nodeValue
1492 1492
             : '';
1493 1493
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1494 1494
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1495 1495
         //INSCRIÇÃO ESTADUAL
1496
-        $x     += $w;
1496
+        $x += $w;
1497 1497
         $w     = $maxW - $w1 - $wx - 8 - $w3;
1498 1498
         $texto = 'INSCRIÇÃO ESTADUAL';
1499 1499
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1503,16 +1503,16 @@  discard block
 block discarded – undo
1503 1503
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1504 1504
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1505 1505
         //HORA DA SAÍDA
1506
-        $x     += $w;
1506
+        $x += $w;
1507 1507
         $w     = $wx;
1508 1508
         $texto = 'HORA DA SAÍDA/ENTRADA';
1509 1509
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1510 1510
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1511
-        $hSaiEnt = ! empty($this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue)
1511
+        $hSaiEnt = !empty($this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue)
1512 1512
             ? $this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue
1513 1513
             : '';
1514 1514
         if ($hSaiEnt == '') {
1515
-            $dhSaiEnt   = ! empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1515
+            $dhSaiEnt   = !empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1516 1516
                 ? $this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue
1517 1517
                 : '';
1518 1518
             $tsDhSaiEnt = $this->toDateTime($dhSaiEnt);
@@ -1556,7 +1556,7 @@  discard block
 block discarded – undo
1556 1556
         //NOME / RAZÃO SOCIAL
1557 1557
         $w     = round($maxW * 0.61, 0);
1558 1558
         $w1    = $w;
1559
-        $y     += 3;
1559
+        $y += 3;
1560 1560
         $texto = 'NOME / RAZÃO SOCIAL';
1561 1561
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1562 1562
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1571,20 +1571,20 @@  discard block
 block discarded – undo
1571 1571
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, '');
1572 1572
         }
1573 1573
         //CNPJ / CPF
1574
-        $x     += $w;
1574
+        $x += $w;
1575 1575
         $w     = round($maxW * 0.23, 0);
1576 1576
         $w2    = $w;
1577 1577
         $texto = 'CNPJ / CPF';
1578 1578
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1579 1579
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1580 1580
         //Pegando valor do CPF/CNPJ
1581
-        if (! empty($this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1581
+        if (!empty($this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1582 1582
             $texto = $this->formatField(
1583 1583
                 $this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1584 1584
                 "###.###.###/####-##"
1585 1585
             );
1586 1586
         } else {
1587
-            $texto = ! empty($this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1587
+            $texto = !empty($this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1588 1588
                 $this->formatField(
1589 1589
                     $this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue,
1590 1590
                     "###.###.###-##"
@@ -1593,7 +1593,7 @@  discard block
 block discarded – undo
1593 1593
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1594 1594
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1595 1595
         //INSCRIÇÃO ESTADUAL
1596
-        $x     += $w;
1596
+        $x += $w;
1597 1597
         $w     = $maxW - ($w1 + $w2);
1598 1598
         $wx    = $w;
1599 1599
         $texto = 'INSCRIÇÃO ESTADUAL';
@@ -1612,7 +1612,7 @@  discard block
 block discarded – undo
1612 1612
         //ENDEREÇO
1613 1613
         $w     = round($maxW * 0.355, 0) + $wx;
1614 1614
         $w1    = $w;
1615
-        $y     += $h;
1615
+        $y += $h;
1616 1616
         $x     = $oldX;
1617 1617
         $texto = 'ENDEREÇO';
1618 1618
         $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, '', true);
1625 1625
         //BAIRRO / DISTRITO
1626
-        $x     += $w;
1626
+        $x += $w;
1627 1627
         $w     = round($maxW * 0.335, 0);
1628 1628
         $w2    = $w;
1629 1629
         $texto = 'BAIRRO / DISTRITO';
@@ -1633,12 +1633,12 @@  discard block
 block discarded – undo
1633 1633
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1634 1634
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1635 1635
         //CEP
1636
-        $x     += $w;
1636
+        $x += $w;
1637 1637
         $w     = $maxW - ($w1 + $w2);
1638 1638
         $texto = 'CEP';
1639 1639
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1640 1640
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1641
-        $texto = ! empty($this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1641
+        $texto = !empty($this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1642 1642
             $this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue : '';
1643 1643
         $texto = $this->formatField($texto, "#####-###");
1644 1644
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
@@ -1646,7 +1646,7 @@  discard block
 block discarded – undo
1646 1646
         //MUNICÍPIO
1647 1647
         $w     = round($maxW * 0.805, 0);
1648 1648
         $w1    = $w;
1649
-        $y     += $h;
1649
+        $y += $h;
1650 1650
         $x     = $oldX;
1651 1651
         $texto = 'MUNICÍPIO';
1652 1652
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1658,7 +1658,7 @@  discard block
 block discarded – undo
1658 1658
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1659 1659
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
1660 1660
         //UF
1661
-        $x     += $w;
1661
+        $x += $w;
1662 1662
         $w     = 8;
1663 1663
         $texto = 'UF';
1664 1664
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1667,12 +1667,12 @@  discard block
 block discarded – undo
1667 1667
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1668 1668
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1669 1669
         //FONE / FAX
1670
-        $x     += $w;
1670
+        $x += $w;
1671 1671
         $w     = $maxW - $w - $w1;
1672 1672
         $texto = 'FONE / FAX';
1673 1673
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1674 1674
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1675
-        $texto = ! empty($this->entrega->getElementsByTagName("fone")->item(0)->nodeValue) ?
1675
+        $texto = !empty($this->entrega->getElementsByTagName("fone")->item(0)->nodeValue) ?
1676 1676
             $this->entrega->getElementsByTagName("fone")->item(0)->nodeValue : '';
1677 1677
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1678 1678
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
@@ -1709,7 +1709,7 @@  discard block
 block discarded – undo
1709 1709
         //NOME / RAZÃO SOCIAL
1710 1710
         $w     = round($maxW * 0.61, 0);
1711 1711
         $w1    = $w;
1712
-        $y     += 3;
1712
+        $y += 3;
1713 1713
         $texto = 'NOME / RAZÃO SOCIAL';
1714 1714
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1715 1715
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1724,20 +1724,20 @@  discard block
 block discarded – undo
1724 1724
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, '');
1725 1725
         }
1726 1726
         //CNPJ / CPF
1727
-        $x     += $w;
1727
+        $x += $w;
1728 1728
         $w     = round($maxW * 0.23, 0);
1729 1729
         $w2    = $w;
1730 1730
         $texto = 'CNPJ / CPF';
1731 1731
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1732 1732
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1733 1733
         //Pegando valor do CPF/CNPJ
1734
-        if (! empty($this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1734
+        if (!empty($this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1735 1735
             $texto = $this->formatField(
1736 1736
                 $this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1737 1737
                 "###.###.###/####-##"
1738 1738
             );
1739 1739
         } else {
1740
-            $texto = ! empty($this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1740
+            $texto = !empty($this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1741 1741
                 $this->formatField(
1742 1742
                     $this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue,
1743 1743
                     "###.###.###-##"
@@ -1746,7 +1746,7 @@  discard block
 block discarded – undo
1746 1746
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1747 1747
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1748 1748
         //INSCRIÇÃO ESTADUAL
1749
-        $x     += $w;
1749
+        $x += $w;
1750 1750
         $w     = $maxW - ($w1 + $w2);
1751 1751
         $wx    = $w;
1752 1752
         $texto = 'INSCRIÇÃO ESTADUAL';
@@ -1765,7 +1765,7 @@  discard block
 block discarded – undo
1765 1765
         //ENDEREÇO
1766 1766
         $w     = round($maxW * 0.355, 0) + $wx;
1767 1767
         $w1    = $w;
1768
-        $y     += $h;
1768
+        $y += $h;
1769 1769
         $x     = $oldX;
1770 1770
         $texto = 'ENDEREÇO';
1771 1771
         $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, '', true);
1778 1778
         //BAIRRO / DISTRITO
1779
-        $x     += $w;
1779
+        $x += $w;
1780 1780
         $w     = round($maxW * 0.335, 0);
1781 1781
         $w2    = $w;
1782 1782
         $texto = 'BAIRRO / DISTRITO';
@@ -1786,12 +1786,12 @@  discard block
 block discarded – undo
1786 1786
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1787 1787
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1788 1788
         //CEP
1789
-        $x     += $w;
1789
+        $x += $w;
1790 1790
         $w     = $maxW - ($w1 + $w2);
1791 1791
         $texto = 'CEP';
1792 1792
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1793 1793
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1794
-        $texto = ! empty($this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1794
+        $texto = !empty($this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1795 1795
             $this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue : '';
1796 1796
         $texto = $this->formatField($texto, "#####-###");
1797 1797
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
@@ -1799,7 +1799,7 @@  discard block
 block discarded – undo
1799 1799
         //MUNICÍPIO
1800 1800
         $w     = round($maxW * 0.805, 0);
1801 1801
         $w1    = $w;
1802
-        $y     += $h;
1802
+        $y += $h;
1803 1803
         $x     = $oldX;
1804 1804
         $texto = 'MUNICÍPIO';
1805 1805
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1811,7 +1811,7 @@  discard block
 block discarded – undo
1811 1811
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1812 1812
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
1813 1813
         //UF
1814
-        $x     += $w;
1814
+        $x += $w;
1815 1815
         $w     = 8;
1816 1816
         $texto = 'UF';
1817 1817
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1820,12 +1820,12 @@  discard block
 block discarded – undo
1820 1820
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1821 1821
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1822 1822
         //FONE / FAX
1823
-        $x     += $w;
1823
+        $x += $w;
1824 1824
         $w     = $maxW - $w - $w1;
1825 1825
         $texto = 'FONE / FAX';
1826 1826
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1827 1827
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1828
-        $texto = ! empty($this->retirada->getElementsByTagName("fone")->item(0)->nodeValue) ?
1828
+        $texto = !empty($this->retirada->getElementsByTagName("fone")->item(0)->nodeValue) ?
1829 1829
             $this->retirada->getElementsByTagName("fone")->item(0)->nodeValue : '';
1830 1830
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1831 1831
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
@@ -1845,7 +1845,7 @@  discard block
 block discarded – undo
1845 1845
         if (isset($this->cobr)) {
1846 1846
             $fat = $this->cobr->getElementsByTagName("fat")->item(0);
1847 1847
             if (isset($fat)) {
1848
-                if (! empty($this->getTagValue($this->ide, "indPag"))) {
1848
+                if (!empty($this->getTagValue($this->ide, "indPag"))) {
1849 1849
                     $textoIndPag = "";
1850 1850
                     $indPag      = $this->getTagValue($this->ide, "indPag");
1851 1851
                     if ($indPag === "0") {
@@ -1919,7 +1919,7 @@  discard block
 block discarded – undo
1919 1919
             $h     = 8;
1920 1920
             $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B'];
1921 1921
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1922
-            $y       += 3;
1922
+            $y += 3;
1923 1923
             $dups    = "";
1924 1924
             $dupcont = 0;
1925 1925
             $nFat    = $this->dup->length;
@@ -1953,13 +1953,13 @@  discard block
 block discarded – undo
1953 1953
             }
1954 1954
             $increm = 1;
1955 1955
             foreach ($this->dup as $k => $d) {
1956
-                $nDup  = ! empty($this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue)
1956
+                $nDup  = !empty($this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue)
1957 1957
                     ? $this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue
1958 1958
                     : '';
1959
-                $dDup  = ! empty($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue)
1959
+                $dDup  = !empty($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue)
1960 1960
                     ? $this->ymdTodmy($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue)
1961 1961
                     : '';
1962
-                $vDup  = ! empty($this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue)
1962
+                $vDup  = !empty($this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue)
1963 1963
                     ? 'R$ ' . number_format(
1964 1964
                         $this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue,
1965 1965
                         2,
@@ -2006,7 +2006,7 @@  discard block
 block discarded – undo
2006 2006
             }
2007 2007
             if ($dupcont == 0) {
2008 2008
                 $y -= 9;
2009
-                $linha --;
2009
+                $linha--;
2010 2010
             }
2011 2011
 
2012 2012
             return ($y + $h);
@@ -2046,7 +2046,7 @@  discard block
 block discarded – undo
2046 2046
             $h     = 8;
2047 2047
             $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B'];
2048 2048
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
2049
-            $y       += 3;
2049
+            $y += 3;
2050 2050
             $dups    = "";
2051 2051
             $dupcont = 0;
2052 2052
             if ($this->orientacao == 'P') {
@@ -2079,7 +2079,7 @@  discard block
 block discarded – undo
2079 2079
                 '90' => 'Sem pagamento',
2080 2080
                 '99' => 'Outros'
2081 2081
             ];
2082
-            $bandeira       = [
2082
+            $bandeira = [
2083 2083
                 '01' => 'Visa',
2084 2084
                 '02' => 'Mastercard',
2085 2085
                 '03' => 'American',
@@ -2092,10 +2092,10 @@  discard block
 block discarded – undo
2092 2092
                 '99' => 'Outros'
2093 2093
             ];
2094 2094
             foreach ($this->detPag as $k => $d) {
2095
-                $fPag  = ! empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
2095
+                $fPag  = !empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
2096 2096
                     ? $this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue
2097 2097
                     : '0';
2098
-                $vPag  = ! empty($this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue)
2098
+                $vPag  = !empty($this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue)
2099 2099
                     ? 'R$ ' . number_format(
2100 2100
                         $this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue,
2101 2101
                         2,
@@ -2138,7 +2138,7 @@  discard block
 block discarded – undo
2138 2138
             }
2139 2139
             if ($dupcont == 0) {
2140 2140
                 $y -= 9;
2141
-                $linha --;
2141
+                $linha--;
2142 2142
             }
2143 2143
 
2144 2144
             return ($y + $h);
@@ -2170,7 +2170,7 @@  discard block
 block discarded – undo
2170 2170
         $the_field    = $this->ICMSTot->getElementsByTagName($campoImposto)->item(0);
2171 2171
         if (isset($the_field)) {
2172 2172
             $the_value = $the_field->nodeValue;
2173
-            if (! empty($the_value)) {
2173
+            if (!empty($the_value)) {
2174 2174
                 $valorImposto = number_format($the_value, 2, ",", ".");
2175 2175
             }
2176 2176
         }
@@ -2199,10 +2199,10 @@  discard block
 block discarded – undo
2199 2199
         $x_inicial = $x;
2200 2200
         //#####################################################################
2201 2201
         $campos_por_linha = 9;
2202
-        if (! $this->exibirPIS) {
2203
-            $campos_por_linha --;
2202
+        if (!$this->exibirPIS) {
2203
+            $campos_por_linha--;
2204 2204
         }
2205
-        if (! $this->exibirIcmsInterestadual) {
2205
+        if (!$this->exibirIcmsInterestadual) {
2206 2206
             $campos_por_linha -= 2;
2207 2207
         }
2208 2208
 
@@ -2289,12 +2289,12 @@  discard block
 block discarded – undo
2289 2289
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
2290 2290
         //NOME / RAZÃO SOCIAL
2291 2291
         $w1    = $maxW * 0.29;
2292
-        $y     += 3;
2292
+        $y += 3;
2293 2293
         $texto = 'NOME / RAZÃO SOCIAL';
2294 2294
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2295 2295
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, '');
2296 2296
         if (isset($this->transporta)) {
2297
-            $texto = ! empty($this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue)
2297
+            $texto = !empty($this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue)
2298 2298
                 ? $this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue
2299 2299
                 : '';
2300 2300
         } else {
@@ -2303,12 +2303,12 @@  discard block
 block discarded – undo
2303 2303
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2304 2304
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'L', 0, '');
2305 2305
         //FRETE POR CONTA
2306
-        $x     += $w1;
2306
+        $x += $w1;
2307 2307
         $w2    = $maxW * 0.15;
2308 2308
         $texto = 'FRETE';
2309 2309
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2310 2310
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2311
-        $tipoFrete = ! empty($this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue)
2311
+        $tipoFrete = !empty($this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue)
2312 2312
             ? $this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue
2313 2313
             : '0';
2314 2314
         switch ($tipoFrete) {
@@ -2334,12 +2334,12 @@  discard block
 block discarded – undo
2334 2334
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2335 2335
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'C', 'C', 1, '');
2336 2336
         //CÓDIGO ANTT
2337
-        $x     += $w2;
2337
+        $x += $w2;
2338 2338
         $texto = 'CÓDIGO ANTT';
2339 2339
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2340 2340
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2341 2341
         if (isset($this->veicTransp)) {
2342
-            $texto = ! empty($this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue)
2342
+            $texto = !empty($this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue)
2343 2343
                 ? $this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue
2344 2344
                 : '';
2345 2345
         } else {
@@ -2348,16 +2348,16 @@  discard block
 block discarded – undo
2348 2348
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2349 2349
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2350 2350
         //PLACA DO VEÍC
2351
-        $x     += $w2;
2351
+        $x += $w2;
2352 2352
         $texto = 'PLACA DO VEÍCULO';
2353 2353
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2354 2354
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2355 2355
         if (isset($this->veicTransp)) {
2356
-            $texto = ! empty($this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue)
2356
+            $texto = !empty($this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue)
2357 2357
                 ? $this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue
2358 2358
                 : '';
2359 2359
         } elseif (isset($this->reboque)) {
2360
-            $texto = ! empty($this->reboque->getElementsByTagName("placa")->item(0)->nodeValue)
2360
+            $texto = !empty($this->reboque->getElementsByTagName("placa")->item(0)->nodeValue)
2361 2361
                 ? $this->reboque->getElementsByTagName("placa")->item(0)->nodeValue
2362 2362
                 : '';
2363 2363
         } else {
@@ -2366,17 +2366,17 @@  discard block
 block discarded – undo
2366 2366
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2367 2367
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2368 2368
         //UF
2369
-        $x     += $w2;
2369
+        $x += $w2;
2370 2370
         $w3    = round($maxW * 0.04, 0);
2371 2371
         $texto = 'UF';
2372 2372
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2373 2373
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'L', 1, '');
2374 2374
         if (isset($this->veicTransp)) {
2375
-            $texto = ! empty($this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue)
2375
+            $texto = !empty($this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue)
2376 2376
                 ? $this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue
2377 2377
                 : '';
2378 2378
         } elseif (isset($this->reboque)) {
2379
-            $texto = ! empty($this->reboque->getElementsByTagName("UF")->item(0)->nodeValue)
2379
+            $texto = !empty($this->reboque->getElementsByTagName("UF")->item(0)->nodeValue)
2380 2380
                 ? $this->reboque->getElementsByTagName("UF")->item(0)->nodeValue
2381 2381
                 : '';
2382 2382
         } else {
@@ -2385,20 +2385,20 @@  discard block
 block discarded – undo
2385 2385
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2386 2386
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'C', 0, '');
2387 2387
         //CNPJ / CPF
2388
-        $x     += $w3;
2388
+        $x += $w3;
2389 2389
         $w     = $maxW - ($w1 + 3 * $w2 + $w3);
2390 2390
         $texto = 'CNPJ / CPF';
2391 2391
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2392 2392
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
2393 2393
         if (isset($this->transporta)) {
2394
-            $texto = ! empty($this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue)
2394
+            $texto = !empty($this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue)
2395 2395
                 ? $this->formatField(
2396 2396
                     $this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue,
2397 2397
                     "##.###.###/####-##"
2398 2398
                 )
2399 2399
                 : '';
2400 2400
             if ($texto == '') {
2401
-                $texto = ! empty($this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue)
2401
+                $texto = !empty($this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue)
2402 2402
                     ? $this->formatField(
2403 2403
                         $this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue,
2404 2404
                         "###.###.###-##"
@@ -2412,7 +2412,7 @@  discard block
 block discarded – undo
2412 2412
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
2413 2413
         //#####################################################################
2414 2414
         //ENDEREÇO
2415
-        $y     += $h;
2415
+        $y += $h;
2416 2416
         $x     = $oldX;
2417 2417
         $h     = 7;
2418 2418
         $w1    = $maxW * 0.44;
@@ -2420,7 +2420,7 @@  discard block
 block discarded – undo
2420 2420
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2421 2421
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, '');
2422 2422
         if (isset($this->transporta)) {
2423
-            $texto = ! empty($this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue)
2423
+            $texto = !empty($this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue)
2424 2424
                 ? $this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue
2425 2425
                 : '';
2426 2426
         } else {
@@ -2429,13 +2429,13 @@  discard block
 block discarded – undo
2429 2429
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2430 2430
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'L', 0, '');
2431 2431
         //MUNICÍPIO
2432
-        $x     += $w1;
2432
+        $x += $w1;
2433 2433
         $w2    = round($maxW * 0.30, 0);
2434 2434
         $texto = 'MUNICÍPIO';
2435 2435
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2436 2436
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2437 2437
         if (isset($this->transporta)) {
2438
-            $texto = ! empty($this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue)
2438
+            $texto = !empty($this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue)
2439 2439
                 ? $this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue
2440 2440
                 : '';
2441 2441
         } else {
@@ -2444,13 +2444,13 @@  discard block
 block discarded – undo
2444 2444
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2445 2445
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2446 2446
         //UF
2447
-        $x     += $w2;
2447
+        $x += $w2;
2448 2448
         $w3    = round($maxW * 0.04, 0);
2449 2449
         $texto = 'UF';
2450 2450
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2451 2451
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'L', 1, '');
2452 2452
         if (isset($this->transporta)) {
2453
-            $texto = ! empty($this->transporta->getElementsByTagName("UF")->item(0)->nodeValue)
2453
+            $texto = !empty($this->transporta->getElementsByTagName("UF")->item(0)->nodeValue)
2454 2454
                 ? $this->transporta->getElementsByTagName("UF")->item(0)->nodeValue
2455 2455
                 : '';
2456 2456
         } else {
@@ -2459,14 +2459,14 @@  discard block
 block discarded – undo
2459 2459
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2460 2460
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'C', 0, '');
2461 2461
         //INSCRIÇÃO ESTADUAL
2462
-        $x     += $w3;
2462
+        $x += $w3;
2463 2463
         $w     = $maxW - ($w1 + $w2 + $w3);
2464 2464
         $texto = 'INSCRIÇÃO ESTADUAL';
2465 2465
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2466 2466
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
2467 2467
         $texto = '';
2468 2468
         if (isset($this->transporta)) {
2469
-            if (! empty($this->transporta->getElementsByTagName("IE")->item(0)->nodeValue)) {
2469
+            if (!empty($this->transporta->getElementsByTagName("IE")->item(0)->nodeValue)) {
2470 2470
                 $texto = $this->transporta->getElementsByTagName("IE")->item(0)->nodeValue;
2471 2471
             }
2472 2472
         }
@@ -2482,13 +2482,13 @@  discard block
 block discarded – undo
2482 2482
         $pesoBruto   = 0;
2483 2483
         $pesoLiquido = 0;
2484 2484
         foreach ($volumes as $volume) {
2485
-            $quantidade  += ! empty($volume->getElementsByTagName("qVol")->item(0)->nodeValue) ?
2485
+            $quantidade  += !empty($volume->getElementsByTagName("qVol")->item(0)->nodeValue) ?
2486 2486
                 $volume->getElementsByTagName("qVol")->item(0)->nodeValue : 0;
2487
-            $pesoBruto   += ! empty($volume->getElementsByTagName("pesoB")->item(0)->nodeValue) ?
2487
+            $pesoBruto   += !empty($volume->getElementsByTagName("pesoB")->item(0)->nodeValue) ?
2488 2488
                 $volume->getElementsByTagName("pesoB")->item(0)->nodeValue : 0;
2489
-            $pesoLiquido += ! empty($volume->getElementsByTagName("pesoL")->item(0)->nodeValue) ?
2489
+            $pesoLiquido += !empty($volume->getElementsByTagName("pesoL")->item(0)->nodeValue) ?
2490 2490
                 $volume->getElementsByTagName("pesoL")->item(0)->nodeValue : 0;
2491
-            $texto       = ! empty($this->transp->getElementsByTagName("esp")->item(0)->nodeValue) ?
2491
+            $texto = !empty($this->transp->getElementsByTagName("esp")->item(0)->nodeValue) ?
2492 2492
                 $this->transp->getElementsByTagName("esp")->item(0)->nodeValue : '';
2493 2493
             if ($texto != $especie && $especie != '') {
2494 2494
                 //tem várias especies
@@ -2496,7 +2496,7 @@  discard block
 block discarded – undo
2496 2496
             } else {
2497 2497
                 $especie = $texto;
2498 2498
             }
2499
-            $texto = ! empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue)
2499
+            $texto = !empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue)
2500 2500
                 ? $this->transp->getElementsByTagName("marca")->item(0)->nodeValue
2501 2501
                 : '';
2502 2502
             if ($texto != $marca && $marca != '') {
@@ -2505,7 +2505,7 @@  discard block
 block discarded – undo
2505 2505
             } else {
2506 2506
                 $marca = $texto;
2507 2507
             }
2508
-            $texto = ! empty($this->transp->getElementsByTagName("nVol")->item(0)->nodeValue)
2508
+            $texto = !empty($this->transp->getElementsByTagName("nVol")->item(0)->nodeValue)
2509 2509
                 ? $this->transp->getElementsByTagName("nVol")->item(0)->nodeValue
2510 2510
                 : '';
2511 2511
             if ($texto != $numero && $numero != '') {
@@ -2518,20 +2518,20 @@  discard block
 block discarded – undo
2518 2518
 
2519 2519
         //#####################################################################
2520 2520
         //QUANTIDADE
2521
-        $y     += $h;
2521
+        $y += $h;
2522 2522
         $x     = $oldX;
2523 2523
         $h     = 7;
2524 2524
         $w1    = round($maxW * 0.10, 0);
2525 2525
         $texto = 'QUANTIDADE';
2526 2526
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2527 2527
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, '');
2528
-        if (! empty($quantidade)) {
2528
+        if (!empty($quantidade)) {
2529 2529
             $texto = $quantidade;
2530 2530
             $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2531 2531
             $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'C', 0, '');
2532 2532
         }
2533 2533
         //ESPÉCIE
2534
-        $x     += $w1;
2534
+        $x += $w1;
2535 2535
         $w2    = round($maxW * 0.17, 0);
2536 2536
         $texto = 'ESPÉCIE';
2537 2537
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -2540,16 +2540,16 @@  discard block
 block discarded – undo
2540 2540
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2541 2541
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2542 2542
         //MARCA
2543
-        $x     += $w2;
2543
+        $x += $w2;
2544 2544
         $texto = 'MARCA';
2545 2545
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2546 2546
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2547
-        $texto = ! empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) ?
2547
+        $texto = !empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) ?
2548 2548
             $this->transp->getElementsByTagName("marca")->item(0)->nodeValue : '';
2549 2549
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2550 2550
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2551 2551
         //NUMERAÇÃO
2552
-        $x     += $w2;
2552
+        $x += $w2;
2553 2553
         $texto = 'NUMERAÇÃO';
2554 2554
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2555 2555
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -2557,7 +2557,7 @@  discard block
 block discarded – undo
2557 2557
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2558 2558
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2559 2559
         //PESO BRUTO
2560
-        $x     += $w2;
2560
+        $x += $w2;
2561 2561
         $w3    = round($maxW * 0.20, 0);
2562 2562
         $texto = 'PESO BRUTO';
2563 2563
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -2570,7 +2570,7 @@  discard block
 block discarded – undo
2570 2570
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2571 2571
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'R', 0, '');
2572 2572
         //PESO LÍQUIDO
2573
-        $x     += $w3;
2573
+        $x += $w3;
2574 2574
         $w     = $maxW - ($w1 + 3 * $w2 + $w3);
2575 2575
         $texto = 'PESO LÍQUIDO';
2576 2576
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -2590,11 +2590,11 @@  discard block
 block discarded – undo
2590 2590
     protected function descricaoProdutoHelper($origem, $campo, $formato)
2591 2591
     {
2592 2592
         $valor_original = $origem->getElementsByTagName($campo)->item(0);
2593
-        if (! isset($valor_original)) {
2593
+        if (!isset($valor_original)) {
2594 2594
             return "";
2595 2595
         }
2596 2596
         $valor_original = $valor_original->nodeValue;
2597
-        $valor          = ! empty($valor_original) ? number_format($valor_original, 2, ",", ".") : '';
2597
+        $valor          = !empty($valor_original) ? number_format($valor_original, 2, ",", ".") : '';
2598 2598
 
2599 2599
         if ($valor != "") {
2600 2600
             return sprintf($formato, $valor);
@@ -2620,7 +2620,7 @@  discard block
 block discarded – undo
2620 2620
         $ICMSUFDest = $itemProd->getElementsByTagName("ICMSUFDest")->item(0);
2621 2621
         $impostos   = '';
2622 2622
 
2623
-        if (! empty($ICMS)) {
2623
+        if (!empty($ICMS)) {
2624 2624
             $impostos .= $this->descricaoProdutoHelper($ICMS, "vBCFCP", " BcFcp=%s");
2625 2625
             $impostos .= $this->descricaoProdutoHelper($ICMS, "pFCP", " pFcp=%s%%");
2626 2626
             $impostos .= $this->descricaoProdutoHelper($ICMS, "vFCP", " vFcp=%s");
@@ -2636,7 +2636,7 @@  discard block
 block discarded – undo
2636 2636
             $impostos .= $this->descricaoProdutoHelper($ICMS, "pST", " pSt=%s");
2637 2637
             $impostos .= $this->descricaoProdutoHelper($ICMS, "vICMSSTRet", " VALOR ICMS ST=%s");
2638 2638
         }
2639
-        if (! empty($ICMSUFDest)) {
2639
+        if (!empty($ICMSUFDest)) {
2640 2640
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pFCPUFDest", " pFCPUFDest=%s%%");
2641 2641
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pICMSUFDest", " pICMSUFDest=%s%%");
2642 2642
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pICMSInterPart", " pICMSInterPart=%s%%");
@@ -2644,20 +2644,20 @@  discard block
 block discarded – undo
2644 2644
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "vICMSUFDest", " vICMSUFDest=%s");
2645 2645
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "vICMSUFRemet", " vICMSUFRemet=%s");
2646 2646
         }
2647
-        $infAdProd = ! empty($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue)
2647
+        $infAdProd = !empty($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue)
2648 2648
             ? substr(
2649 2649
                 $this->anfaveaDANFE($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue),
2650 2650
                 0,
2651 2651
                 500
2652 2652
             )
2653 2653
             : '';
2654
-        if (! empty($infAdProd)) {
2654
+        if (!empty($infAdProd)) {
2655 2655
             $infAdProd = trim($infAdProd);
2656 2656
             $infAdProd .= ' ';
2657 2657
         }
2658 2658
         $loteTxt = '';
2659 2659
         $rastro  = $prod->getElementsByTagName("med");
2660
-        if (! empty($prod->getElementsByTagName("rastro"))) {
2660
+        if (!empty($prod->getElementsByTagName("rastro"))) {
2661 2661
             $rastro = $prod->getElementsByTagName("rastro");
2662 2662
             $i      = 0;
2663 2663
             while ($i < $rastro->length) {
@@ -2673,14 +2673,14 @@  discard block
 block discarded – undo
2673 2673
                 $loteTxt .= $datafab; //$this->getTagDate($rastro->item($i), 'dFab', ' Fab: ');
2674 2674
                 $loteTxt .= $dataval; //$this->getTagDate($rastro->item($i), 'dVal', ' Val: ');
2675 2675
                 $loteTxt .= $this->getTagValue($rastro->item($i), 'vPMC', ' PMC: ');
2676
-                $i ++;
2676
+                $i++;
2677 2677
             }
2678 2678
             if ($loteTxt != '') {
2679 2679
                 $loteTxt .= ' ';
2680 2680
             }
2681 2681
         }
2682 2682
         //NT2013.006 FCI
2683
-        $nFCI   = (! empty($itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue)) ?
2683
+        $nFCI   = (!empty($itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue)) ?
2684 2684
             ' FCI:' . $itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue : '';
2685 2685
         $tmp_ad = $infAdProd . ($this->descProdInfoComplemento ? $loteTxt . $impostos . $nFCI : '');
2686 2686
         $texto  = $prod->getElementsByTagName("xProd")->item(0)->nodeValue
@@ -2730,7 +2730,7 @@  discard block
 block discarded – undo
2730 2730
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
2731 2731
         $y += 3;
2732 2732
         //desenha a caixa dos dados dos itens da NF
2733
-        $hmax  += 1;
2733
+        $hmax += 1;
2734 2734
         $texto = '';
2735 2735
         $this->pdf->textBox($x, $y, $w, $hmax);
2736 2736
         //##################################################################################
@@ -2743,101 +2743,101 @@  discard block
 block discarded – undo
2743 2743
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2744 2744
         $this->pdf->line($x + $w1, $y, $x + $w1, $y + $hmax);
2745 2745
         //DESCRIÇÃO DO PRODUTO / SERVIÇO
2746
-        $x     += $w1;
2746
+        $x += $w1;
2747 2747
         $w2    = round($w * 0.25, 0);
2748 2748
         $texto = 'DESCRIÇÃO DO PRODUTO / SERVIÇO';
2749 2749
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2750 2750
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2751 2751
         $this->pdf->line($x + $w2, $y, $x + $w2, $y + $hmax);
2752 2752
         //NCM/SH
2753
-        $x     += $w2;
2753
+        $x += $w2;
2754 2754
         $w3    = round($w * 0.06, 0);
2755 2755
         $texto = 'NCM/SH';
2756 2756
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2757 2757
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2758 2758
         $this->pdf->line($x + $w3, $y, $x + $w3, $y + $hmax);
2759 2759
         //O/CST ou O/CSOSN
2760
-        $x     += $w3;
2760
+        $x += $w3;
2761 2761
         $w4    = round($w * 0.05, 0);
2762 2762
         $texto = 'O/CST'; // CRT = 2 ou CRT = 3
2763 2763
         if ($this->getTagValue($this->emit, 'CRT') == '1') {
2764
-            $texto = 'O/CSOSN';//Regime do Simples CRT = 1
2764
+            $texto = 'O/CSOSN'; //Regime do Simples CRT = 1
2765 2765
         }
2766 2766
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2767 2767
         $this->pdf->textBox($x, $y, $w4, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2768 2768
         $this->pdf->line($x + $w4, $y, $x + $w4, $y + $hmax);
2769 2769
         //CFOP
2770
-        $x     += $w4;
2770
+        $x += $w4;
2771 2771
         $w5    = round($w * 0.04, 0);
2772 2772
         $texto = 'CFOP';
2773 2773
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2774 2774
         $this->pdf->textBox($x, $y, $w5, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2775 2775
         $this->pdf->line($x + $w5, $y, $x + $w5, $y + $hmax);
2776 2776
         //UN
2777
-        $x     += $w5;
2777
+        $x += $w5;
2778 2778
         $w6    = round($w * 0.03, 0);
2779 2779
         $texto = 'UN';
2780 2780
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2781 2781
         $this->pdf->textBox($x, $y, $w6, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2782 2782
         $this->pdf->line($x + $w6, $y, $x + $w6, $y + $hmax);
2783 2783
         //QUANT
2784
-        $x     += $w6;
2784
+        $x += $w6;
2785 2785
         $w7    = round($w * 0.08, 0);
2786 2786
         $texto = 'QUANT';
2787 2787
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2788 2788
         $this->pdf->textBox($x, $y, $w7, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2789 2789
         $this->pdf->line($x + $w7, $y, $x + $w7, $y + $hmax);
2790 2790
         //VALOR UNIT
2791
-        $x     += $w7;
2791
+        $x += $w7;
2792 2792
         $w8    = round($w * 0.06, 0);
2793 2793
         $texto = 'VALOR UNIT';
2794 2794
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2795 2795
         $this->pdf->textBox($x, $y, $w8, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2796 2796
         $this->pdf->line($x + $w8, $y, $x + $w8, $y + $hmax);
2797 2797
         //VALOR TOTAL
2798
-        $x     += $w8;
2798
+        $x += $w8;
2799 2799
         $w9    = round($w * 0.06, 0);
2800 2800
         $texto = 'VALOR TOTAL';
2801 2801
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2802 2802
         $this->pdf->textBox($x, $y, $w9, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2803 2803
         $this->pdf->line($x + $w9, $y, $x + $w9, $y + $hmax);
2804 2804
         //VALOR DESCONTO
2805
-        $x     += $w9;
2805
+        $x += $w9;
2806 2806
         $w10   = round($w * 0.05, 0);
2807 2807
         $texto = 'VALOR DESC';
2808 2808
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2809 2809
         $this->pdf->textBox($x, $y, $w10, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2810 2810
         $this->pdf->line($x + $w10, $y, $x + $w10, $y + $hmax);
2811 2811
         //B.CÁLC ICMS
2812
-        $x     += $w10;
2812
+        $x += $w10;
2813 2813
         $w11   = round($w * 0.06, 0);
2814 2814
         $texto = 'B.CÁLC ICMS';
2815 2815
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2816 2816
         $this->pdf->textBox($x, $y, $w11, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2817 2817
         $this->pdf->line($x + $w11, $y, $x + $w11, $y + $hmax);
2818 2818
         //VALOR ICMS
2819
-        $x     += $w11;
2819
+        $x += $w11;
2820 2820
         $w12   = round($w * 0.06, 0);
2821 2821
         $texto = 'VALOR ICMS';
2822 2822
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2823 2823
         $this->pdf->textBox($x, $y, $w12, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2824 2824
         $this->pdf->line($x + $w12, $y, $x + $w12, $y + $hmax);
2825 2825
         //VALOR IPI
2826
-        $x     += $w12;
2826
+        $x += $w12;
2827 2827
         $w13   = round($w * 0.05, 0);
2828 2828
         $texto = 'VALOR IPI';
2829 2829
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2830 2830
         $this->pdf->textBox($x, $y, $w13, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2831 2831
         $this->pdf->line($x + $w13, $y, $x + $w13, $y + $hmax);
2832 2832
         //ALÍQ. ICMS
2833
-        $x     += $w13;
2833
+        $x += $w13;
2834 2834
         $w14   = round($w * 0.04, 0);
2835 2835
         $texto = 'ALÍQ. ICMS';
2836 2836
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2837 2837
         $this->pdf->textBox($x, $y, $w14, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2838 2838
         $this->pdf->line($x + $w14, $y, $x + $w14, $y + $hmax);
2839 2839
         //ALÍQ. IPI
2840
-        $x     += $w14;
2840
+        $x += $w14;
2841 2841
         $w15   = $w - ($w1 + $w2 + $w3 + $w4 + $w5 + $w6 + $w7 + $w8 + $w9 + $w10 + $w11 + $w12 + $w13 + $w14);
2842 2842
         $texto = 'ALÍQ. IPI';
2843 2843
         $this->pdf->textBox($x, $y, $w15, $h, $texto, $aFont, 'C', 'C', 0, '', false);
@@ -2890,7 +2890,7 @@  discard block
 block discarded – undo
2890 2890
                 // Informação sobre unidade de medida tributavel.
2891 2891
                 // Se não for para exibir a unidade de medida tributavel, então
2892 2892
                 // A Escrita irá começar em 0.
2893
-                if (! $mostrarUnidadeTributavel) {
2893
+                if (!$mostrarUnidadeTributavel) {
2894 2894
                     $yTrib = 0;
2895 2895
                 }
2896 2896
                 $h = $this->calculeHeight($thisItem, $mostrarUnidadeTributavel);
@@ -2925,7 +2925,7 @@  discard block
 block discarded – undo
2925 2925
                 }
2926 2926
                 $x += $w2;
2927 2927
                 //NCM
2928
-                $texto = ! empty($prod->getElementsByTagName("NCM")->item(0)->nodeValue) ?
2928
+                $texto = !empty($prod->getElementsByTagName("NCM")->item(0)->nodeValue) ?
2929 2929
                     $prod->getElementsByTagName("NCM")->item(0)->nodeValue : '';
2930 2930
                 $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'C', 0, '');
2931 2931
                 $x += $w3;
@@ -2938,11 +2938,11 @@  discard block
 block discarded – undo
2938 2938
                     $this->pdf->textBox($x, $y, $w4, $h, $texto, $aFont, 'T', 'C', 0, '');
2939 2939
                 }
2940 2940
                 //CFOP
2941
-                $x     += $w4;
2941
+                $x += $w4;
2942 2942
                 $texto = $prod->getElementsByTagName("CFOP")->item(0)->nodeValue;
2943 2943
                 $this->pdf->textBox($x, $y, $w5, $h, $texto, $aFont, 'T', 'C', 0, '');
2944 2944
                 //Unidade
2945
-                $x     += $w5;
2945
+                $x += $w5;
2946 2946
                 $texto = $uCom;
2947 2947
                 $this->pdf->textBox($x, $y, $w6, $h, $texto, $aFont, 'T', 'C', 0, '');
2948 2948
                 //Unidade de medida tributável
@@ -2964,7 +2964,7 @@  discard block
 block discarded – undo
2964 2964
                 // QTDADE Tributável
2965 2965
                 if ($mostrarUnidadeTributavel) {
2966 2966
                     $qTrib = $prod->getElementsByTagName("qTrib")->item(0);
2967
-                    if (! empty($qTrib)) {
2967
+                    if (!empty($qTrib)) {
2968 2968
                         $texto = number_format($qTrib->nodeValue, $this->qComCasasDec, ",", ".");
2969 2969
                         $this->pdf->textBox($x, $yTrib, $w7, $h, $texto, $aFont, 'T', $alinhamento, 0, '');
2970 2970
                     }
@@ -2977,7 +2977,7 @@  discard block
 block discarded – undo
2977 2977
                 // Valor Unitário Tributável
2978 2978
                 if ($mostrarUnidadeTributavel) {
2979 2979
                     $vUnTrib = $prod->getElementsByTagName("vUnTrib")->item(0);
2980
-                    if (! empty($vUnTrib)) {
2980
+                    if (!empty($vUnTrib)) {
2981 2981
                         $texto = number_format($vUnTrib->nodeValue, $this->vUnComCasasDec, ",", ".");
2982 2982
                         $this->pdf->textBox($x, $yTrib, $w8, $h, $texto, $aFont, 'T', $alinhamento, 0, '');
2983 2983
                     }
@@ -2991,7 +2991,7 @@  discard block
 block discarded – undo
2991 2991
                 $this->pdf->textBox($x, $y, $w9, $h, $texto, $aFont, 'T', $alinhamento, 0, '');
2992 2992
                 $x += $w9;
2993 2993
                 //Valor do Desconto
2994
-                $vdesc = ! empty($prod->getElementsByTagName("vDesc")->item(0)->nodeValue)
2994
+                $vdesc = !empty($prod->getElementsByTagName("vDesc")->item(0)->nodeValue)
2995 2995
                     ? $prod->getElementsByTagName("vDesc")->item(0)->nodeValue : 0;
2996 2996
 
2997 2997
                 $texto = number_format($vdesc, 2, ",", ".");
@@ -2999,7 +2999,7 @@  discard block
 block discarded – undo
2999 2999
                 //Valor da Base de calculo
3000 3000
                 $x += $w10;
3001 3001
                 if (isset($ICMS)) {
3002
-                    $texto = ! empty($ICMS->getElementsByTagName("vBC")->item(0)->nodeValue)
3002
+                    $texto = !empty($ICMS->getElementsByTagName("vBC")->item(0)->nodeValue)
3003 3003
                         ? number_format(
3004 3004
                             $ICMS->getElementsByTagName("vBC")->item(0)->nodeValue,
3005 3005
                             2,
@@ -3012,7 +3012,7 @@  discard block
 block discarded – undo
3012 3012
                 //Valor do ICMS
3013 3013
                 $x += $w11;
3014 3014
                 if (isset($ICMS)) {
3015
-                    $texto = ! empty($ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue)
3015
+                    $texto = !empty($ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue)
3016 3016
                         ? number_format(
3017 3017
                             $ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue,
3018 3018
                             2,
@@ -3025,7 +3025,7 @@  discard block
 block discarded – undo
3025 3025
                 //Valor do IPI
3026 3026
                 $x += $w12;
3027 3027
                 if (isset($IPI)) {
3028
-                    $texto = ! empty($IPI->getElementsByTagName("vIPI")->item(0)->nodeValue)
3028
+                    $texto = !empty($IPI->getElementsByTagName("vIPI")->item(0)->nodeValue)
3029 3029
                         ? number_format(
3030 3030
                             $IPI->getElementsByTagName("vIPI")->item(0)->nodeValue,
3031 3031
                             2,
@@ -3040,7 +3040,7 @@  discard block
 block discarded – undo
3040 3040
                 // %ICMS
3041 3041
                 $x += $w13;
3042 3042
                 if (isset($ICMS)) {
3043
-                    $texto = ! empty($ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue)
3043
+                    $texto = !empty($ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue)
3044 3044
                         ? number_format(
3045 3045
                             $ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue,
3046 3046
                             2,
@@ -3053,7 +3053,7 @@  discard block
 block discarded – undo
3053 3053
                 //%IPI
3054 3054
                 $x += $w14;
3055 3055
                 if (isset($IPI)) {
3056
-                    $texto = ! empty($IPI->getElementsByTagName("pIPI")->item(0)->nodeValue)
3056
+                    $texto = !empty($IPI->getElementsByTagName("pIPI")->item(0)->nodeValue)
3057 3057
                         ? number_format(
3058 3058
                             $IPI->getElementsByTagName("pIPI")->item(0)->nodeValue,
3059 3059
                             2,
@@ -3071,17 +3071,17 @@  discard block
 block discarded – undo
3071 3071
                 $veicProd = $prod->getElementsByTagName("veicProd")->item(0);
3072 3072
                 // Tag somente é gerada para veiculo 0k, e só é permitido um veiculo por NF-e por conta do detran
3073 3073
                 // Verifica se a Tag existe
3074
-                if (! empty($veicProd)) {
3074
+                if (!empty($veicProd)) {
3075 3075
                     $this->dadosItenVeiculoDANFE($oldX, $y, $nInicio, $h, $prod);
3076 3076
                 }
3077 3077
 
3078 3078
 
3079 3079
                 $y += $h;
3080
-                $i ++;
3080
+                $i++;
3081 3081
                 //incrementa o controle dos itens processados.
3082
-                $this->qtdeItensProc ++;
3082
+                $this->qtdeItensProc++;
3083 3083
             } else {
3084
-                $i ++;
3084
+                $i++;
3085 3085
             }
3086 3086
         }
3087 3087
 
@@ -3286,23 +3286,23 @@  discard block
 block discarded – undo
3286 3286
         $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B'];
3287 3287
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
3288 3288
         //INSCRIÇÃO MUNICIPAL
3289
-        $y     += 3;
3289
+        $y += 3;
3290 3290
         $w     = round($this->wPrint * 0.23, 0);
3291 3291
         $texto = 'INSCRIÇÃO MUNICIPAL';
3292 3292
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3293 3293
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3294 3294
         //inscrição municipal
3295
-        $texto = ! empty($this->emit->getElementsByTagName("IM")->item(0)->nodeValue) ?
3295
+        $texto = !empty($this->emit->getElementsByTagName("IM")->item(0)->nodeValue) ?
3296 3296
             $this->emit->getElementsByTagName("IM")->item(0)->nodeValue : '';
3297 3297
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
3298 3298
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
3299 3299
         //VALOR TOTAL DOS SERVIÇOS
3300
-        $x     += $w;
3300
+        $x += $w;
3301 3301
         $texto = 'VALOR TOTAL DOS SERVIÇOS';
3302 3302
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3303 3303
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3304 3304
         if (isset($this->ISSQNtot)) {
3305
-            $texto = ! empty($this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue) ?
3305
+            $texto = !empty($this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue) ?
3306 3306
                 $this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue : '';
3307 3307
             $texto = number_format($texto, 2, ",", ".");
3308 3308
         } else {
@@ -3311,14 +3311,14 @@  discard block
 block discarded – undo
3311 3311
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
3312 3312
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'R', 0, '');
3313 3313
         //BASE DE CÁLCULO DO ISSQN
3314
-        $x     += $w;
3314
+        $x += $w;
3315 3315
         $texto = 'BASE DE CÁLCULO DO ISSQN';
3316 3316
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3317 3317
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3318 3318
         if (isset($this->ISSQNtot)) {
3319
-            $texto = ! empty($this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue) ?
3319
+            $texto = !empty($this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue) ?
3320 3320
                 $this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue : '';
3321
-            $texto = ! empty($texto) ? number_format($texto, 2, ",", ".") : '';
3321
+            $texto = !empty($texto) ? number_format($texto, 2, ",", ".") : '';
3322 3322
         } else {
3323 3323
             $texto = '';
3324 3324
         }
@@ -3335,9 +3335,9 @@  discard block
 block discarded – undo
3335 3335
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3336 3336
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3337 3337
         if (isset($this->ISSQNtot)) {
3338
-            $texto = ! empty($this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue) ?
3338
+            $texto = !empty($this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue) ?
3339 3339
                 $this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue : '';
3340
-            $texto = ! empty($texto) ? number_format($texto, 2, ",", ".") : '';
3340
+            $texto = !empty($texto) ? number_format($texto, 2, ",", ".") : '';
3341 3341
         } else {
3342 3342
             $texto = '';
3343 3343
         }
@@ -3376,7 +3376,7 @@  discard block
 block discarded – undo
3376 3376
 
3377 3377
         //INFORMAÇÕES COMPLEMENTARES
3378 3378
         $texto = "INFORMAÇÕES COMPLEMENTARES";
3379
-        $y     += 3;
3379
+        $y += 3;
3380 3380
         $w     = $this->wAdic;
3381 3381
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => 'B'];
3382 3382
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -3386,7 +3386,7 @@  discard block
 block discarded – undo
3386 3386
         //$this->textoAdic com o texto completo do campo
3387 3387
         //echo str_replace("\n", "<br>",$this->textoAdic);
3388 3388
         //die;
3389
-        $y     += 1;
3389
+        $y += 1;
3390 3390
         $aFont = ['font' => $this->fontePadrao, 'size' => $this->textadicfontsize * $this->pdf->k, 'style' => ''];
3391 3391
         //$aFont = ['font'=>$this->fontePadrao, 'size'=> 5, 'style'=>''];
3392 3392
         $this->pdf->textBox($x, $y + 2, $w - 2, $h, $this->textoAdic, $aFont, 'T', 'L', 0, '', false);
@@ -3431,7 +3431,7 @@  discard block
 block discarded – undo
3431 3431
                 $texto = "CONTINGÊNCIA SVC-RS\n" . $dhCont . "\n" . $xJust;
3432 3432
                 break;
3433 3433
         }
3434
-        $y     += 2;
3434
+        $y += 2;
3435 3435
         $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => ''];
3436 3436
         $this->pdf->textBox($x, $y, $w - 2, $h, $texto, $aFont, 'T', 'L', 0, '', false);
3437 3437
 
@@ -3486,7 +3486,7 @@  discard block
 block discarded – undo
3486 3486
         $tpNF = $this->ide->getElementsByTagName('tpNF')->item(0)->nodeValue;
3487 3487
         if ($tpNF == '0') {
3488 3488
             //NFe de Entrada
3489
-            $emitente     = '';
3489
+            $emitente = '';
3490 3490
             $emitente     .= $this->dest->getElementsByTagName("xNome")->item(0)->nodeValue . " - ";
3491 3491
             $emitente     .= $this->enderDest->getElementsByTagName("xLgr")->item(0)->nodeValue . ", ";
3492 3492
             $emitente     .= $this->enderDest->getElementsByTagName("nro")->item(0)->nodeValue . " - ";
@@ -3539,10 +3539,10 @@  discard block
 block discarded – undo
3539 3539
             $texto .= "AO LADO";
3540 3540
         }
3541 3541
         $texto .= ". EMISSÃO: ";
3542
-        $dEmi  = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3542
+        $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3543 3543
             $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue : '';
3544 3544
         if ($dEmi == '') {
3545
-            $dEmi  = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3545
+            $dEmi  = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3546 3546
                 $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue : '';
3547 3547
             $aDemi = explode('T', $dEmi);
3548 3548
             $dEmi  = $aDemi[0];
@@ -3565,12 +3565,12 @@  discard block
 block discarded – undo
3565 3565
             $this->pdf->textBox($x1, $y, $w1, 18, $texto, $aFont, 'C', 'C', 1, '');
3566 3566
             //DATA DE RECEBIMENTO
3567 3567
             $texto = "DATA DE RECEBIMENTO";
3568
-            $y     += $h;
3568
+            $y += $h;
3569 3569
             $w2    = round($this->wPrint * 0.17, 0); //35;
3570 3570
             $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3571 3571
             $this->pdf->textBox($x, $y, $w2, 8, $texto, $aFont, 'T', 'L', 1, '');
3572 3572
             //IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR
3573
-            $x     += $w2;
3573
+            $x += $w2;
3574 3574
             $w3    = $w - $w2;
3575 3575
             $texto = "IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR";
3576 3576
             $this->pdf->textBox($x, $y, $w3, 8, $texto, $aFont, 'T', 'L', 1, '');
@@ -3581,7 +3581,7 @@  discard block
 block discarded – undo
3581 3581
 
3582 3582
             return $y;
3583 3583
         } else {
3584
-            $x --;
3584
+            $x--;
3585 3585
             $x = $this->pdf->textBox90($x, $y, $w - 1, $h, $texto, $aFontSmall, 'C', 'L', 0, '', false);
3586 3586
             //NUMERO DA NOTA FISCAL LOGO NFE
3587 3587
             $w1    = 18;
@@ -3602,7 +3602,7 @@  discard block
 block discarded – undo
3602 3602
             $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3603 3603
             $this->pdf->textBox90($x, $y, $w2, 8, $texto, $aFont, 'T', 'L', 1, '');
3604 3604
             //IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR
3605
-            $y     -= $w2;
3605
+            $y -= $w2;
3606 3606
             $w3    = $w - $w2;
3607 3607
             $texto = "IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR";
3608 3608
             $aFont = ['font' => $this->fontePadrao, 'size' => 5.7, 'style' => ''];
@@ -3623,18 +3623,18 @@  discard block
 block discarded – undo
3623 3623
      */
3624 3624
     protected function geraInformacoesDaTagCompra()
3625 3625
     {
3626
-        if (! $this->gerarInformacoesAutomaticas) {
3626
+        if (!$this->gerarInformacoesAutomaticas) {
3627 3627
             return '';
3628 3628
         }
3629 3629
         $saida = "";
3630 3630
         if (isset($this->compra)) {
3631
-            if (! empty($this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue)) {
3631
+            if (!empty($this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue)) {
3632 3632
                 $saida .= " Nota de Empenho: " . $this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue;
3633 3633
             }
3634
-            if (! empty($this->compra->getElementsByTagName("xPed")->item(0)->nodeValue)) {
3634
+            if (!empty($this->compra->getElementsByTagName("xPed")->item(0)->nodeValue)) {
3635 3635
                 $saida .= " Pedido: " . $this->compra->getElementsByTagName("xPed")->item(0)->nodeValue;
3636 3636
             }
3637
-            if (! empty($this->compra->getElementsByTagName("xCont")->item(0)->nodeValue)) {
3637
+            if (!empty($this->compra->getElementsByTagName("xCont")->item(0)->nodeValue)) {
3638 3638
                 $saida .= " Contrato: " . $this->compra->getElementsByTagName("xCont")->item(0)->nodeValue;
3639 3639
             }
3640 3640
         }
@@ -3665,10 +3665,10 @@  discard block
 block discarded – undo
3665 3665
         if ($icmss > 0) {
3666 3666
             $icmss = 1;
3667 3667
         }
3668
-        $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3668
+        $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3669 3669
             $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue : '';
3670 3670
         if ($dEmi == '') {
3671
-            $dEmi  = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3671
+            $dEmi  = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3672 3672
                 $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue : '';
3673 3673
             $aDemi = explode('T', $dEmi);
3674 3674
             $dEmi  = $aDemi[0];
@@ -3692,7 +3692,7 @@  discard block
 block discarded – undo
3692 3692
      */
3693 3693
     protected function geraInformacoesDasNotasReferenciadas()
3694 3694
     {
3695
-        if (! $this->gerarInformacoesAutomaticas) {
3695
+        if (!$this->gerarInformacoesAutomaticas) {
3696 3696
             return '';
3697 3697
         }
3698 3698
         $formaNfeRef = "\r\nNFe Ref.: série:%d número:%d emit:%s em %s [%s]";
@@ -3720,7 +3720,7 @@  discard block
 block discarded – undo
3720 3720
                 $cnpj          = $this->formatField(substr($chave_acesso, 6, 14), "##.###.###/####-##");
3721 3721
                 $serie         = substr($chave_acesso, 22, 3);
3722 3722
                 $numero        = substr($chave_acesso, 25, 9);
3723
-                $saida         .= sprintf($formaNfeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3723
+                $saida .= sprintf($formaNfeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3724 3724
             }
3725 3725
             $refNF = $nfRef->getElementsByTagName('refNF');
3726 3726
             foreach ($refNF as $umaRefNFe) {
@@ -3731,7 +3731,7 @@  discard block
 block discarded – undo
3731 3731
                 $numero = $umaRefNFe->getElementsByTagName('nNF')->item(0)->nodeValue;
3732 3732
                 $data   = substr($data, 2, 2) . "/20" . substr($data, 0, 2);
3733 3733
                 $cnpj   = $this->formatField($cnpj, "##.###.###/####-##");
3734
-                $saida  .= sprintf($formaNfRef, $serie, $numero, $cnpj, $data, $mod);
3734
+                $saida .= sprintf($formaNfRef, $serie, $numero, $cnpj, $data, $mod);
3735 3735
             }
3736 3736
             $refCTe = $nfRef->getElementsByTagName('refCTe');
3737 3737
             foreach ($refCTe as $chave_acessoRef) {
@@ -3741,7 +3741,7 @@  discard block
 block discarded – undo
3741 3741
                 $cnpj          = $this->formatField(substr($chave_acesso, 6, 14), "##.###.###/####-##");
3742 3742
                 $serie         = substr($chave_acesso, 22, 3);
3743 3743
                 $numero        = substr($chave_acesso, 25, 9);
3744
-                $saida         .= sprintf($formaCTeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3744
+                $saida .= sprintf($formaCTeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3745 3745
             }
3746 3746
             $refECF = $nfRef->getElementsByTagName('refECF');
3747 3747
             foreach ($refECF as $umaRefNFe) {
@@ -3753,10 +3753,9 @@  discard block
 block discarded – undo
3753 3753
             $refNFP = $nfRef->getElementsByTagName('refNFP');
3754 3754
             foreach ($refNFP as $umaRefNFe) {
3755 3755
                 $data   = $umaRefNFe->getElementsByTagName('AAMM')->item(0)->nodeValue;
3756
-                $cnpj   = ! empty($umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue) ?
3757
-                    $umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue :
3758
-                    '';
3759
-                $cpf    = ! empty($umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue) ?
3756
+                $cnpj   = !empty($umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue) ?
3757
+                    $umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue : '';
3758
+                $cpf    = !empty($umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue) ?
3760 3759
                     $umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue : '';
3761 3760
                 $mod    = $umaRefNFe->getElementsByTagName('mod')->item(0)->nodeValue;
3762 3761
                 $serie  = $umaRefNFe->getElementsByTagName('serie')->item(0)->nodeValue;
@@ -3778,7 +3777,7 @@  discard block
 block discarded – undo
3778 3777
     private function loadDoc($xml)
3779 3778
     {
3780 3779
         $this->xml = $xml;
3781
-        if (! empty($xml)) {
3780
+        if (!empty($xml)) {
3782 3781
             $this->dom = new Dom();
3783 3782
             $this->dom->loadXML($this->xml);
3784 3783
             if (empty($this->dom->getElementsByTagName("infNFe")->item(0))) {
@@ -3832,7 +3831,7 @@  discard block
 block discarded – undo
3832 3831
         $numlinhas    = $this->pdf->getNumLines($textoProduto, $w2, $aFont);
3833 3832
 
3834 3833
         if ($mostrarUnidadeTributavel && $numlinhas == 1) {
3835
-            $numlinhas ++;
3834
+            $numlinhas++;
3836 3835
         }
3837 3836
 
3838 3837
         return round(($numlinhas * $this->pdf->fontSize) + ($numlinhas * 0.5), 2);
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,11 +64,11 @@
 block discarded – undo
64 64
      * @var boolean
65 65
      */
66 66
     protected $descProdQuebraLinha = true;
67
-     /**
68
-     * Parâmetro para ocultar a unidade tributável nos itens
69
-     *
70
-     * @var boolean
71
-     */
67
+        /**
68
+         * Parâmetro para ocultar a unidade tributável nos itens
69
+         *
70
+         * @var boolean
71
+         */
72 72
     protected $ocultarUnidadeTributavel = false;
73 73
     /**
74 74
      * XML NFe
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
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
     protected $descPercent = 0.38;
29 29
     protected $xml; // string XML NFe
30 30
     protected $dom;
31
-    protected $logomarca=''; // path para logomarca em jpg
32
-    protected $formatoChave="#### #### #### #### #### #### #### #### #### #### ####";
31
+    protected $logomarca = ''; // path para logomarca em jpg
32
+    protected $formatoChave = "#### #### #### #### #### #### #### #### #### #### ####";
33 33
     protected $nfeProc;
34 34
     protected $nfe;
35 35
     protected $infNFe;
@@ -222,10 +222,10 @@  discard block
 block discarded – undo
222 222
         //total inicial de paginas
223 223
         $totPag = 1;
224 224
         //largura imprimivel em mm: largura da folha menos as margens esq/direita
225
-        $this->wPrint = $maxW-($margEsq*2);
225
+        $this->wPrint = $maxW - ($margEsq * 2);
226 226
         //comprimento (altura) imprimivel em mm: altura da folha menos as margens
227 227
         //superior e inferior
228
-        $this->hPrint = $maxH-$margSup-$margInf;
228
+        $this->hPrint = $maxH - $margSup - $margInf;
229 229
         // estabelece contagem de paginas
230 230
         $this->pdf->aliasNbPages();
231 231
         $this->pdf->setMargins($margEsq, $margSup); // fixa as margens
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
         $y = $this->blocoIX($y); //informações complementares e sobre tributos
250 250
         $y = $this->blocoX($y); //creditos
251 251
         
252
-        $ymark = $maxH/4;
252
+        $ymark = $maxH / 4;
253 253
         if ($this->tpAmb == 2) {
254 254
             $this->pdf->setTextColor(120, 120, 120);
255 255
             $texto = "SEM VALOR FISCAL\nEmitida em ambiente de homologacao";
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
                 $this->margem,
259 259
                 $ymark,
260 260
                 $this->wPrint,
261
-                $maxH/2,
261
+                $maxH / 2,
262 262
                 $texto,
263 263
                 $aFont,
264 264
                 'T',
@@ -275,9 +275,9 @@  discard block
 block discarded – undo
275 275
             $aFont = ['font' => $this->fontePadrao, 'size' => 24, 'style' => 'B'];
276 276
             $this->pdf->textBox(
277 277
                 $this->margem,
278
-                $ymark+4,
278
+                $ymark + 4,
279 279
                 $this->wPrint,
280
-                $maxH/2,
280
+                $maxH / 2,
281 281
                 $texto,
282 282
                 $aFont,
283 283
                 'T',
@@ -289,9 +289,9 @@  discard block
 block discarded – undo
289 289
             $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
290 290
             $this->pdf->textBox(
291 291
                 $this->margem,
292
-                $ymark+14,
292
+                $ymark + 14,
293 293
                 $this->wPrint,
294
-                $maxH/2,
294
+                $maxH / 2,
295 295
                 $this->submessage,
296 296
                 $aFont,
297 297
                 'T',
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
             $y = $this->blocoVIII($y); //QRCODE
320 320
             $y = $this->blocoIX($y); //informações sobre tributos
321 321
             $y = $this->blocoX($y); //creditos
322
-            $ymark = $maxH/4;
322
+            $ymark = $maxH / 4;
323 323
             if ($this->tpAmb == 2) {
324 324
                 $this->pdf->setTextColor(120, 120, 120);
325 325
                 $texto = "SEM VALOR FISCAL\nEmitida em ambiente de homologacao";
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
                     $this->margem,
329 329
                     $ymark,
330 330
                     $this->wPrint,
331
-                    $maxH/2,
331
+                    $maxH / 2,
332 332
                     $texto,
333 333
                     $aFont,
334 334
                     'T',
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
             } elseif (!empty($retEvento = $this->nfeProc->getElementsByTagName('retEvento')->item(0))) {
415 415
                 $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0);
416 416
                 $cStat = $this->getTagValue($infEvento, "cStat");
417
-                $tpEvento= $this->getTagValue($infEvento, "tpEvento");
417
+                $tpEvento = $this->getTagValue($infEvento, "tpEvento");
418 418
                 $dhEvento = date(
419 419
                     "d/m/Y H:i:s",
420 420
                     $this->toTimestamp(
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/TraitBlocoVIII.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
         */
20 20
         
21 21
         $maxW = $this->wPrint;
22
-        $w = ($maxW*1)+4;
22
+        $w = ($maxW * 1) + 4;
23 23
         $barcode = new Barcode();
24 24
         $bobj = $barcode->getBarcodeObj(
25 25
             'QRCODE,M',
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
         $wQr = 50;
34 34
         $hQr = 50;
35 35
         $yQr = ($y);
36
-        $xQr = ($w/2) - ($wQr/2);
36
+        $xQr = ($w / 2) - ($wQr / 2);
37 37
         $pic = 'data://text/plain;base64,' . base64_encode($qrcode);
38 38
         $info = getimagesize($pic);
39 39
         $this->pdf->image($pic, $xQr, $yQr, $wQr, $hQr, 'PNG');
40
-        return $this->bloco8H+$y;
40
+        return $this->bloco8H + $y;
41 41
     }
42 42
 }
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -8,6 +8,9 @@
 block discarded – undo
8 8
  */
9 9
 trait TraitBlocoVIII
10 10
 {
11
+    /**
12
+     * @param integer $y
13
+     */
11 14
     protected function blocoVIII($y)
12 15
     {
13 16
         //$this->bloco8H = 50;
Please login to merge, or discard this patch.