Completed
Push — master ( cc47ff...c36dee )
by Roberto
11:19 queued 07:30
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 2 patches
Doc Comments   +27 added lines, -19 removed lines patch added patch discarded remove patch
@@ -875,8 +875,8 @@  discard block
 block discarded – undo
875 875
      *header
876 876
      * Monta o cabelhalho da DANFE (retrato e paisagem)
877 877
      *
878
-     * @param number $x      Posição horizontal inicial, canto esquerdo
879
-     * @param number $y      Posição vertical inicial, canto superior
878
+     * @param integer $x      Posição horizontal inicial, canto esquerdo
879
+     * @param integer $y      Posição vertical inicial, canto superior
880 880
      * @param number $pag    Número da Página
881 881
      * @param number $totPag Total de páginas
882 882
      *
@@ -1265,8 +1265,8 @@  discard block
 block discarded – undo
1265 1265
      *
1266 1266
      * @name   destinatarioDANFE
1267 1267
      *
1268
-     * @param number $x Posição horizontal canto esquerdo
1269
-     * @param number $y Posição vertical canto superior
1268
+     * @param integer $x Posição horizontal canto esquerdo
1269
+     * @param integer $y Posição vertical canto superior
1270 1270
      *
1271 1271
      * @return number Posição vertical final
1272 1272
      */
@@ -1480,8 +1480,8 @@  discard block
 block discarded – undo
1480 1480
      *
1481 1481
      * @name   localEntregaDANFE
1482 1482
      *
1483
-     * @param number $x Posição horizontal canto esquerdo
1484
-     * @param number $y Posição vertical canto superior
1483
+     * @param integer $x Posição horizontal canto esquerdo
1484
+     * @param integer $y Posição vertical canto superior
1485 1485
      *
1486 1486
      * @return number Posição vertical final
1487 1487
      */
@@ -1633,8 +1633,8 @@  discard block
 block discarded – undo
1633 1633
      *
1634 1634
      * @name   localretiradaDANFE
1635 1635
      *
1636
-     * @param number $x Posição horizontal canto esquerdo
1637
-     * @param number $y Posição vertical canto superior
1636
+     * @param integer $x Posição horizontal canto esquerdo
1637
+     * @param integer $y Posição vertical canto superior
1638 1638
      *
1639 1639
      * @return number Posição vertical final
1640 1640
      */
@@ -1785,7 +1785,7 @@  discard block
 block discarded – undo
1785 1785
      * Gera a String do Texto da Fatura
1786 1786
      *
1787 1787
      * @name   getTextoFatura
1788
-     * @return uma String com o texto ou "";
1788
+     * @return string String com o texto ou "";
1789 1789
      */
1790 1790
     protected function getTextoFatura()
1791 1791
     {
@@ -1843,8 +1843,8 @@  discard block
 block discarded – undo
1843 1843
      *
1844 1844
      * @name   fatura
1845 1845
      *
1846
-     * @param number $x Posição horizontal canto esquerdo
1847
-     * @param number $y Posição vertical canto superior
1846
+     * @param integer $x Posição horizontal canto esquerdo
1847
+     * @param double $y Posição vertical canto superior
1848 1848
      *
1849 1849
      * @return number Posição vertical final
1850 1850
      */
@@ -1971,8 +1971,8 @@  discard block
 block discarded – undo
1971 1971
      *
1972 1972
      * @name   pagamento
1973 1973
      *
1974
-     * @param number $x Posição horizontal canto esquerdo
1975
-     * @param number $y Posição vertical canto superior
1974
+     * @param integer $x Posição horizontal canto esquerdo
1975
+     * @param double $y Posição vertical canto superior
1976 1976
      *
1977 1977
      * @return number Posição vertical final
1978 1978
      */
@@ -2105,6 +2105,8 @@  discard block
 block discarded – undo
2105 2105
      * @param float $h Altura do campo
2106 2106
      * @param float $h Título do campo
2107 2107
      * @param float $h Valor do imposto
2108
+     * @param string $titulo
2109
+     * @param string $campoImposto
2108 2110
      *
2109 2111
      * @return float Sugestão do $x do próximo imposto
2110 2112
      */
@@ -2133,10 +2135,10 @@  discard block
 block discarded – undo
2133 2135
      * imposto
2134 2136
      * Monta o campo de impostos e totais da DANFE (retrato e paisagem)
2135 2137
      *
2136
-     * @param number $x Posição horizontal canto esquerdo
2137
-     * @param number $y Posição vertical canto superior
2138
+     * @param integer $x Posição horizontal canto esquerdo
2139
+     * @param double $y Posição vertical canto superior
2138 2140
      *
2139
-     * @return number Posição vertical final
2141
+     * @return double Posição vertical final
2140 2142
      */
2141 2143
     protected function imposto($x, $y)
2142 2144
     {
@@ -2531,6 +2533,10 @@  discard block
 block discarded – undo
2531 2533
     } //fim transporte
2532 2534
 
2533 2535
 
2536
+    /**
2537
+     * @param string $campo
2538
+     * @param string $formato
2539
+     */
2534 2540
     protected function descricaoProdutoHelper($origem, $campo, $formato)
2535 2541
     {
2536 2542
         $valor_original = $origem->getElementsByTagName($campo)->item(0);
@@ -2640,7 +2646,6 @@  discard block
 block discarded – undo
2640 2646
      * @param float $x       Posição horizontal canto esquerdo
2641 2647
      * @param float $y       Posição vertical canto superior
2642 2648
      * @param float $nInicio Número do item inicial
2643
-     * @param float $max     Número do item final
2644 2649
      * @param float $hmax    Altura máxima do campo de itens em mm
2645 2650
      *
2646 2651
      * @return float Posição vertical final
@@ -3385,8 +3390,8 @@  discard block
 block discarded – undo
3385 3390
      *
3386 3391
      * @name   canhotoDANFE
3387 3392
      *
3388
-     * @param number $x Posição horizontal canto esquerdo
3389
-     * @param number $y Posição vertical canto superior
3393
+     * @param integer $x Posição horizontal canto esquerdo
3394
+     * @param integer $y Posição vertical canto superior
3390 3395
      *
3391 3396
      * @return number Posição vertical final
3392 3397
      *
@@ -3691,6 +3696,9 @@  discard block
 block discarded – undo
3691 3696
         return $saida;
3692 3697
     }
3693 3698
 
3699
+    /**
3700
+     * @param string $xml
3701
+     */
3694 3702
     private function loadDoc($xml)
3695 3703
     {
3696 3704
         $this->xml = $xml;
Please login to merge, or discard this patch.
Spacing   +227 added lines, -228 removed lines patch added patch discarded remove patch
@@ -326,39 +326,39 @@  discard block
 block discarded – undo
326 326
     {
327 327
         $this->textoAdic = '';
328 328
         //informações adicionais
329
-        $fontProduto            = [
329
+        $fontProduto = [
330 330
             'font'  => $this->fontePadrao,
331 331
             'size'  => 8,
332 332
             'style' => ''
333 333
         ];
334 334
         $k                      = $this->pdf->k;
335 335
         $this->textadicfontsize = $fontProduto['size'] / $k;
336
-        $this->textoAdic        .= $this->geraInformacoesDasNotasReferenciadas();
336
+        $this->textoAdic .= $this->geraInformacoesDasNotasReferenciadas();
337 337
         if (isset($this->infAdic)) {
338 338
             $i = 0;
339 339
             if ($this->textoAdic != '') {
340 340
                 $this->textoAdic .= ". \n";
341 341
             }
342
-            $this->textoAdic .= ! empty($this->getTagValue($this->infAdic, "infCpl"))
342
+            $this->textoAdic .= !empty($this->getTagValue($this->infAdic, "infCpl"))
343 343
                 ? 'Inf. Contribuinte: ' . $this->anfaveaDANFE($this->getTagValue($this->infAdic, "infCpl"))
344 344
                 : '';
345
-            $infPedido       = $this->geraInformacoesDaTagCompra();
345
+            $infPedido = $this->geraInformacoesDaTagCompra();
346 346
             if ($infPedido != "") {
347 347
                 $this->textoAdic .= $infPedido;
348 348
             }
349 349
             $this->textoAdic .= $this->getTagValue($this->dest, "email", ' Email do Destinatário: ');
350
-            $this->textoAdic .= ! empty($this->getTagValue($this->infAdic, "infAdFisco"))
350
+            $this->textoAdic .= !empty($this->getTagValue($this->infAdic, "infAdFisco"))
351 351
                 ? "\n Inf. fisco: " . $this->getTagValue($this->infAdic, "infAdFisco")
352 352
                 : '';
353
-            $obsCont         = $this->infAdic->getElementsByTagName("obsCont");
353
+            $obsCont = $this->infAdic->getElementsByTagName("obsCont");
354 354
             if (isset($obsCont)) {
355 355
                 foreach ($obsCont as $obs) {
356 356
                     $campo           = $obsCont->item($i)->getAttribute("xCampo");
357
-                    $xTexto          = ! empty($obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue)
357
+                    $xTexto          = !empty($obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue)
358 358
                         ? $obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue
359 359
                         : '';
360 360
                     $this->textoAdic .= "\n" . $campo . ':  ' . trim($xTexto);
361
-                    $i ++;
361
+                    $i++;
362 362
                 }
363 363
             }
364 364
         }
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
             $flagVTT  = $flagVTT && (strpos(strtolower(trim($this->textoAdic)), 'trib') ||
373 373
                     strpos(strtolower(trim($this->textoAdic)), 'imp'));
374 374
             $vTotTrib = $this->getTagValue($this->ICMSTot, 'vTotTrib');
375
-            if ($vTotTrib != '' && ! $flagVTT) {
375
+            if ($vTotTrib != '' && !$flagVTT) {
376 376
                 $this->textoAdic .= "\n Valor Aproximado dos Tributos : R$ "
377 377
                     . number_format($vTotTrib, 2, ",", ".");
378 378
             }
@@ -383,9 +383,9 @@  discard block
 block discarded – undo
383 383
         $this->textadicfontsize = $this->pdf->fontSize;
384 384
         $hdadosadic             = ceil($numlinhasdados * ($this->textadicfontsize));
385 385
         if ($hdadosadic > 70) {
386
-            for ($f = 8; $f > 3; $f --) {
386
+            for ($f = 8; $f > 3; $f--) {
387 387
                 $this->pdf->setFont($this->fontePadrao, '', $f);
388
-                $fontProduto            = [
388
+                $fontProduto = [
389 389
                     'font'  => $this->fontePadrao,
390 390
                     'size'  => $f,
391 391
                     'style' => ''
@@ -513,9 +513,9 @@  discard block
 block discarded – undo
513 513
         $this->hdadosadic = $this->calculoEspacoVericalDadosAdicionais();
514 514
 
515 515
         //altura disponivel para os campos da DANFE
516
-        $hcabecalho    = 47;//para cabeçalho
517
-        $hdestinatario = 25;//para destinatario
518
-        $hduplicatas   = 12;//para cada grupo de 7 duplicatas
516
+        $hcabecalho    = 47; //para cabeçalho
517
+        $hdestinatario = 25; //para destinatario
518
+        $hduplicatas   = 12; //para cada grupo de 7 duplicatas
519 519
         if (isset($this->entrega)) {
520 520
             $hlocalentrega = 25;
521 521
         } else {
@@ -526,11 +526,11 @@  discard block
 block discarded – undo
526 526
         } else {
527 527
             $hlocalretirada = 0;
528 528
         }
529
-        $himposto    = 18;// para imposto
530
-        $htransporte = 25;// para transporte
531
-        $hissqn      = 11;// para issqn
532
-        $hfooter     = 5;// para rodape
533
-        $hCabecItens = 4;//cabeçalho dos itens
529
+        $himposto    = 18; // para imposto
530
+        $htransporte = 25; // para transporte
531
+        $hissqn      = 11; // para issqn
532
+        $hfooter     = 5; // para rodape
533
+        $hCabecItens = 4; //cabeçalho dos itens
534 534
         $hOCUPADA    = $hcabecalho
535 535
             + $hdestinatario
536 536
             + $hlocalentrega
@@ -553,10 +553,10 @@  discard block
 block discarded – undo
553 553
         $this->sizeExtraTextoFatura());*/
554 554
 
555 555
         if ($this->orientacao == 'P') {
556
-            $hDispo1 -= 24 * $this->qCanhoto;//para canhoto
557
-            $w       = $this->wPrint;
556
+            $hDispo1 -= 24 * $this->qCanhoto; //para canhoto
557
+            $w = $this->wPrint;
558 558
         } else {
559
-            $hcanhoto = $this->hPrint;//para canhoto
559
+            $hcanhoto = $this->hPrint; //para canhoto
560 560
             $w        = $this->wPrint - $this->wCanhoto;
561 561
         }
562 562
         //$hDispo1 += 14;
@@ -577,18 +577,18 @@  discard block
 block discarded – undo
577 577
             $prod = $itemProd->getElementsByTagName('prod')->item(0);
578 578
             $uCom = $prod->getElementsByTagName("uCom")->item(0)->nodeValue;
579 579
             $uTrib = $prod->getElementsByTagName("uTrib")->item(0);
580
-            if (! empty($uTrib) && strcmp($uCom, $uTrib->nodeValue) != 0) {
580
+            if (!empty($uTrib) && strcmp($uCom, $uTrib->nodeValue) != 0) {
581 581
                 $mostrarUnidadeTributavel = true;
582 582
             }
583 583
 
584 584
             $hUsado += $this->calculeHeight($itemProd, $mostrarUnidadeTributavel);
585 585
             if ($hUsado > $hDispo) {
586
-                $totPag ++;
586
+                $totPag++;
587 587
                 $hDispo = $hDispo2;
588 588
                 $hUsado = $hCabecItens;
589
-                $i --; // decrementa para readicionar o item que não coube nessa pagina na outra.
589
+                $i--; // decrementa para readicionar o item que não coube nessa pagina na outra.
590 590
             }
591
-            $i ++;
591
+            $i++;
592 592
         } //fim da soma das areas de itens usadas
593 593
         $qtdeItens = $i; //controle da quantidade de itens no DANFE
594 594
         //montagem da primeira página
@@ -620,7 +620,7 @@  discard block
 block discarded – undo
620 620
         $formaPag = [];
621 621
         if (isset($this->detPag) && $this->detPag->length > 0) {
622 622
             foreach ($this->detPag as $k => $d) {
623
-                $fPag            = ! empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
623
+                $fPag            = !empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
624 624
                     ? $this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue
625 625
                     : '0';
626 626
                 $formaPag[$fPag] = $fPag;
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
         }
665 665
 
666 666
         //loop para páginas seguintes
667
-        for ($n = 2; $n <= $totPag; $n ++) {
667
+        for ($n = 2; $n <= $totPag; $n++) {
668 668
             // fixa as margens
669 669
             $this->pdf->setMargins($this->margesq, $this->margsup);
670 670
             //adiciona nova página
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
             }
689 689
             //se estiver na última página e ainda restar itens para inserir, adiciona mais uma página
690 690
             if ($n == $totPag && $this->qtdeItensProc < $qtdeItens) {
691
-                $totPag ++;
691
+                $totPag++;
692 692
             }
693 693
         }
694 694
     }
@@ -717,7 +717,7 @@  discard block
 block discarded – undo
717 717
         if ($startPos === false) {
718 718
             return $cdata;
719 719
         }
720
-        for ($x = $len; $x > 0; $x --) {
720
+        for ($x = $len; $x > 0; $x--) {
721 721
             if (substr($cdata, $x, 1) == '>') {
722 722
                 $endPos = $x;
723 723
                 break;
@@ -813,15 +813,15 @@  discard block
 block discarded – undo
813 813
         //grupo CADATA infCpl
814 814
         $t          = $dom->getElementsByTagName('transmissor')->item(0);
815 815
         $r          = $dom->getElementsByTagName('receptor')->item(0);
816
-        $versao     = ! empty($dom->getElementsByTagName('versao')->item(0)->nodeValue) ?
816
+        $versao     = !empty($dom->getElementsByTagName('versao')->item(0)->nodeValue) ?
817 817
             'Versao:' . $dom->getElementsByTagName('versao')->item(0)->nodeValue . ' ' : '';
818
-        $especieNF  = ! empty($dom->getElementsByTagName('especieNF')->item(0)->nodeValue) ?
818
+        $especieNF  = !empty($dom->getElementsByTagName('especieNF')->item(0)->nodeValue) ?
819 819
             'Especie:' . $dom->getElementsByTagName('especieNF')->item(0)->nodeValue . ' ' : '';
820
-        $fabEntrega = ! empty($dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue) ?
820
+        $fabEntrega = !empty($dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue) ?
821 821
             'Entrega:' . $dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue . ' ' : '';
822
-        $dca        = ! empty($dom->getElementsByTagName('dca')->item(0)->nodeValue) ?
822
+        $dca        = !empty($dom->getElementsByTagName('dca')->item(0)->nodeValue) ?
823 823
             'dca:' . $dom->getElementsByTagName('dca')->item(0)->nodeValue . ' ' : '';
824
-        $texto      .= "" . $versao . $especieNF . $fabEntrega . $dca;
824
+        $texto .= "" . $versao . $especieNF . $fabEntrega . $dca;
825 825
         if (isset($t)) {
826 826
             if ($t->hasAttributes()) {
827 827
                 $texto .= " Transmissor ";
@@ -867,7 +867,7 @@  discard block
 block discarded – undo
867 867
         } else {
868 868
             if ($this->getTagValue($this->ide, "tpAmb") == '2') {
869 869
                 $resp['status'] = false;
870
-                $resp['message'][] =  "NFe EMITIDA EM HOMOLOGAÇÃO";
870
+                $resp['message'][] = "NFe EMITIDA EM HOMOLOGAÇÃO";
871 871
             }
872 872
             $retEvento = $this->nfeProc->getElementsByTagName('retEvento')->item(0);
873 873
             $cStat = $this->getTagValue($this->nfeProc, "cStat");
@@ -888,7 +888,7 @@  discard block
 block discarded – undo
888 888
             } elseif (!empty($retEvento)) {
889 889
                 $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0);
890 890
                 $cStat = $this->getTagValue($infEvento, "cStat");
891
-                $tpEvento= $this->getTagValue($infEvento, "tpEvento");
891
+                $tpEvento = $this->getTagValue($infEvento, "tpEvento");
892 892
                 $dhEvento = date("d/m/Y H:i:s", $this->toTimestamp($this->getTagValue($infEvento, "dhRegEvento")));
893 893
                 $nProt = $this->getTagValue($infEvento, "nProt");
894 894
                 if ($tpEvento == '110111' &&
@@ -952,7 +952,7 @@  discard block
 block discarded – undo
952 952
         //se for right separa 2/3 para os dados e o terço seguinte para o logo
953 953
         //se não houver logo centraliza dos dados do emitente
954 954
         // coloca o logo
955
-        if (! empty($this->logomarca)) {
955
+        if (!empty($this->logomarca)) {
956 956
             $logoInfo = getimagesize($this->logomarca);
957 957
             //largura da imagem em mm
958 958
             $logoWmm = ($logoInfo[0] / 72) * 25.4;
@@ -1008,7 +1008,7 @@  discard block
 block discarded – undo
1008 1008
             //endereço
1009 1009
             $y1     = $y1 + 5;
1010 1010
             $aFont  = ['font' => $this->fontePadrao, 'size' => 8, 'style' => ''];
1011
-            $fone   = ! empty($this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue)
1011
+            $fone   = !empty($this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue)
1012 1012
                 ? $this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue
1013 1013
                 : '';
1014 1014
             $lgr    = $this->getTagValue($this->enderEmit, "xLgr");
@@ -1027,8 +1027,8 @@  discard block
 block discarded – undo
1027 1027
 
1028 1028
         //####################################################################################
1029 1029
         //coluna central Danfe
1030
-        $x  += $w;
1031
-        $w  = round($maxW * 0.17, 0);//35;
1030
+        $x += $w;
1031
+        $w  = round($maxW * 0.17, 0); //35;
1032 1032
         $w2 = $w;
1033 1033
         $h  = 32;
1034 1034
         $this->pdf->textBox($x, $y, $w, $h);
@@ -1085,8 +1085,8 @@  discard block
 block discarded – undo
1085 1085
 
1086 1086
         //####################################################################################
1087 1087
         //coluna codigo de barras
1088
-        $x  += $w;
1089
-        $w  = ($maxW - $w1 - $w2);//85;
1088
+        $x += $w;
1089
+        $w  = ($maxW - $w1 - $w2); //85;
1090 1090
         $w3 = $w;
1091 1091
         $h  = 32;
1092 1092
         $this->pdf->textBox($x, $y, $w, $h);
@@ -1148,7 +1148,7 @@  discard block
 block discarded – undo
1148 1148
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1149 1149
         $w     = $w1 + $w2;
1150 1150
         $y     = $oldY;
1151
-        $oldY  += $h;
1151
+        $oldY += $h;
1152 1152
         $x     = $oldX;
1153 1153
         $h     = 7;
1154 1154
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1179,7 +1179,7 @@  discard block
 block discarded – undo
1179 1179
                 $cStat = '';
1180 1180
             } else {
1181 1181
                 if (isset($this->nfeProc)) {
1182
-                    $texto  = ! empty($this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue)
1182
+                    $texto  = !empty($this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue)
1183 1183
                         ? $this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue
1184 1184
                         : '';
1185 1185
                     $tsHora = $this->toTimestamp(
@@ -1209,7 +1209,7 @@  discard block
 block discarded – undo
1209 1209
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1210 1210
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1211 1211
         //INSCRIÇÃO MUNICIPAL
1212
-        $x     += $w;
1212
+        $x += $w;
1213 1213
         $texto = 'INSCRIÇÃO MUNICIPAL';
1214 1214
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1215 1215
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1217,29 +1217,29 @@  discard block
 block discarded – undo
1217 1217
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1218 1218
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1219 1219
         //INSCRIÇÃO ESTADUAL DO SUBST. TRIBUT.
1220
-        $x     += $w;
1220
+        $x += $w;
1221 1221
         $texto = 'INSCRIÇÃO ESTADUAL DO SUBST. TRIBUT.';
1222 1222
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1223 1223
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1224
-        $texto = ! empty($this->emit->getElementsByTagName("IEST")->item(0)->nodeValue)
1224
+        $texto = !empty($this->emit->getElementsByTagName("IEST")->item(0)->nodeValue)
1225 1225
             ? $this->emit->getElementsByTagName("IEST")->item(0)->nodeValue
1226 1226
             : '';
1227 1227
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1228 1228
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1229 1229
         //CNPJ
1230
-        $x     += $w;
1230
+        $x += $w;
1231 1231
         $w     = ($maxW - (3 * $w));
1232 1232
         $texto = 'CNPJ';
1233 1233
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1234 1234
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1235 1235
         //Pegando valor do CPF/CNPJ
1236
-        if (! empty($this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1236
+        if (!empty($this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1237 1237
             $texto = $this->formatField(
1238 1238
                 $this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1239 1239
                 "###.###.###/####-##"
1240 1240
             );
1241 1241
         } else {
1242
-            $texto = ! empty($this->emit->getElementsByTagName("CPF")->item(0)->nodeValue)
1242
+            $texto = !empty($this->emit->getElementsByTagName("CPF")->item(0)->nodeValue)
1243 1243
                 ? $this->formatField(
1244 1244
                     $this->emit->getElementsByTagName("CPF")->item(0)->nodeValue,
1245 1245
                     "###.###.###-##"
@@ -1258,7 +1258,7 @@  discard block
 block discarded – undo
1258 1258
             $n = count($resp['message']);
1259 1259
             $alttot = $n * 15;
1260 1260
             $x = 10;
1261
-            $y = $this->hPrint/2 - $alttot/2;
1261
+            $y = $this->hPrint / 2 - $alttot / 2;
1262 1262
             $h = 15;
1263 1263
             $w = $maxW - (2 * $x);
1264 1264
             $this->pdf->settextcolor(90, 90, 90);
@@ -1331,7 +1331,7 @@  discard block
 block discarded – undo
1331 1331
         //NOME / RAZÃO SOCIAL
1332 1332
         $w     = round($maxW * 0.61, 0);
1333 1333
         $w1    = $w;
1334
-        $y     += 3;
1334
+        $y += 3;
1335 1335
         $texto = 'NOME / RAZÃO SOCIAL';
1336 1336
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1337 1337
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1343,20 +1343,20 @@  discard block
 block discarded – undo
1343 1343
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, '');
1344 1344
         }
1345 1345
         //CNPJ / CPF
1346
-        $x     += $w;
1346
+        $x += $w;
1347 1347
         $w     = round($maxW * 0.23, 0);
1348 1348
         $w2    = $w;
1349 1349
         $texto = 'CNPJ / CPF';
1350 1350
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1351 1351
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1352 1352
         //Pegando valor do CPF/CNPJ
1353
-        if (! empty($this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1353
+        if (!empty($this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1354 1354
             $texto = $this->formatField(
1355 1355
                 $this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1356 1356
                 "###.###.###/####-##"
1357 1357
             );
1358 1358
         } else {
1359
-            $texto = ! empty($this->dest->getElementsByTagName("CPF")->item(0)->nodeValue)
1359
+            $texto = !empty($this->dest->getElementsByTagName("CPF")->item(0)->nodeValue)
1360 1360
                 ? $this->formatField(
1361 1361
                     $this->dest->getElementsByTagName("CPF")->item(0)->nodeValue,
1362 1362
                     "###.###.###-##"
@@ -1366,17 +1366,17 @@  discard block
 block discarded – undo
1366 1366
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1367 1367
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1368 1368
         //DATA DA EMISSÃO
1369
-        $x     += $w;
1369
+        $x += $w;
1370 1370
         $w     = $maxW - ($w1 + $w2);
1371 1371
         $wx    = $w;
1372 1372
         $texto = 'DATA DA EMISSÃO';
1373 1373
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1374 1374
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1375
-        $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue)
1375
+        $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue)
1376 1376
             ? $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue
1377 1377
             : '';
1378 1378
         if ($dEmi == '') {
1379
-            $dEmi  = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue)
1379
+            $dEmi  = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue)
1380 1380
                 ? $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue
1381 1381
                 : '';
1382 1382
             $aDemi = explode('T', $dEmi);
@@ -1392,7 +1392,7 @@  discard block
 block discarded – undo
1392 1392
         //ENDEREÇO
1393 1393
         $w     = round($maxW * 0.47, 0);
1394 1394
         $w1    = $w;
1395
-        $y     += $h;
1395
+        $y += $h;
1396 1396
         $x     = $oldX;
1397 1397
         $texto = 'ENDEREÇO';
1398 1398
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1404,7 +1404,7 @@  discard block
 block discarded – undo
1404 1404
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1405 1405
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true);
1406 1406
         //BAIRRO / DISTRITO
1407
-        $x     += $w;
1407
+        $x += $w;
1408 1408
         $w     = round($maxW * 0.21, 0);
1409 1409
         $w2    = $w;
1410 1410
         $texto = 'BAIRRO / DISTRITO';
@@ -1414,29 +1414,29 @@  discard block
 block discarded – undo
1414 1414
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1415 1415
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1416 1416
         //CEP
1417
-        $x     += $w;
1417
+        $x += $w;
1418 1418
         $w     = $maxW - $w1 - $w2 - $wx;
1419 1419
         $w2    = $w;
1420 1420
         $texto = 'CEP';
1421 1421
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1422 1422
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1423
-        $texto = ! empty($this->dest->getElementsByTagName("CEP")->item(0)->nodeValue)
1423
+        $texto = !empty($this->dest->getElementsByTagName("CEP")->item(0)->nodeValue)
1424 1424
             ? $this->dest->getElementsByTagName("CEP")->item(0)->nodeValue
1425 1425
             : '';
1426 1426
         $texto = $this->formatField($texto, "#####-###");
1427 1427
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1428 1428
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1429 1429
         //DATA DA SAÍDA
1430
-        $x     += $w;
1430
+        $x += $w;
1431 1431
         $w     = $wx;
1432 1432
         $texto = 'DATA DA SAÍDA/ENTRADA';
1433 1433
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1434 1434
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1435
-        $dSaiEnt = ! empty($this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue)
1435
+        $dSaiEnt = !empty($this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue)
1436 1436
             ? $this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue
1437 1437
             : '';
1438 1438
         if ($dSaiEnt == '') {
1439
-            $dSaiEnt  = ! empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1439
+            $dSaiEnt  = !empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1440 1440
                 ? $this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue
1441 1441
                 : '';
1442 1442
             $aDsaient = explode('T', $dSaiEnt);
@@ -1447,7 +1447,7 @@  discard block
 block discarded – undo
1447 1447
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1448 1448
         //MUNICÍPIO
1449 1449
         $w     = $w1;
1450
-        $y     += $h;
1450
+        $y += $h;
1451 1451
         $x     = $oldX;
1452 1452
         $texto = 'MUNICÍPIO';
1453 1453
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1461,7 +1461,7 @@  discard block
 block discarded – undo
1461 1461
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1462 1462
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
1463 1463
         //UF
1464
-        $x     += $w;
1464
+        $x += $w;
1465 1465
         $w     = 8;
1466 1466
         $texto = 'UF';
1467 1467
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1470,19 +1470,19 @@  discard block
 block discarded – undo
1470 1470
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1471 1471
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1472 1472
         //FONE / FAX
1473
-        $x     += $w;
1473
+        $x += $w;
1474 1474
         $w     = round(($maxW - $w1 - $wx - 8) / 2, 0);
1475 1475
         $w3    = $w;
1476 1476
         $texto = 'FONE / FAX';
1477 1477
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1478 1478
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1479
-        $texto = ! empty($this->dest->getElementsByTagName("fone")->item(0)->nodeValue)
1479
+        $texto = !empty($this->dest->getElementsByTagName("fone")->item(0)->nodeValue)
1480 1480
             ? $this->dest->getElementsByTagName("fone")->item(0)->nodeValue
1481 1481
             : '';
1482 1482
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1483 1483
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1484 1484
         //INSCRIÇÃO ESTADUAL
1485
-        $x     += $w;
1485
+        $x += $w;
1486 1486
         $w     = $maxW - $w1 - $wx - 8 - $w3;
1487 1487
         $texto = 'INSCRIÇÃO ESTADUAL';
1488 1488
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1492,16 +1492,16 @@  discard block
 block discarded – undo
1492 1492
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1493 1493
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1494 1494
         //HORA DA SAÍDA
1495
-        $x     += $w;
1495
+        $x += $w;
1496 1496
         $w     = $wx;
1497 1497
         $texto = 'HORA DA SAÍDA/ENTRADA';
1498 1498
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1499 1499
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1500
-        $hSaiEnt = ! empty($this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue)
1500
+        $hSaiEnt = !empty($this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue)
1501 1501
             ? $this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue
1502 1502
             : '';
1503 1503
         if ($hSaiEnt == '') {
1504
-            $dhSaiEnt   = ! empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1504
+            $dhSaiEnt   = !empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1505 1505
                 ? $this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue
1506 1506
                 : '';
1507 1507
             $tsDhSaiEnt = $this->toTimestamp($dhSaiEnt);
@@ -1545,7 +1545,7 @@  discard block
 block discarded – undo
1545 1545
         //NOME / RAZÃO SOCIAL
1546 1546
         $w     = round($maxW * 0.61, 0);
1547 1547
         $w1    = $w;
1548
-        $y     += 3;
1548
+        $y += 3;
1549 1549
         $texto = 'NOME / RAZÃO SOCIAL';
1550 1550
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1551 1551
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1560,20 +1560,20 @@  discard block
 block discarded – undo
1560 1560
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, '');
1561 1561
         }
1562 1562
         //CNPJ / CPF
1563
-        $x     += $w;
1563
+        $x += $w;
1564 1564
         $w     = round($maxW * 0.23, 0);
1565 1565
         $w2    = $w;
1566 1566
         $texto = 'CNPJ / CPF';
1567 1567
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1568 1568
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1569 1569
         //Pegando valor do CPF/CNPJ
1570
-        if (! empty($this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1570
+        if (!empty($this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1571 1571
             $texto = $this->formatField(
1572 1572
                 $this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1573 1573
                 "###.###.###/####-##"
1574 1574
             );
1575 1575
         } else {
1576
-            $texto = ! empty($this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1576
+            $texto = !empty($this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1577 1577
                 $this->formatField(
1578 1578
                     $this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue,
1579 1579
                     "###.###.###-##"
@@ -1582,7 +1582,7 @@  discard block
 block discarded – undo
1582 1582
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1583 1583
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1584 1584
         //INSCRIÇÃO ESTADUAL
1585
-        $x     += $w;
1585
+        $x += $w;
1586 1586
         $w     = $maxW - ($w1 + $w2);
1587 1587
         $wx    = $w;
1588 1588
         $texto = 'INSCRIÇÃO ESTADUAL';
@@ -1601,7 +1601,7 @@  discard block
 block discarded – undo
1601 1601
         //ENDEREÇO
1602 1602
         $w     = round($maxW * 0.355, 0) + $wx;
1603 1603
         $w1    = $w;
1604
-        $y     += $h;
1604
+        $y += $h;
1605 1605
         $x     = $oldX;
1606 1606
         $texto = 'ENDEREÇO';
1607 1607
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1612,7 +1612,7 @@  discard block
 block discarded – undo
1612 1612
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1613 1613
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true);
1614 1614
         //BAIRRO / DISTRITO
1615
-        $x     += $w;
1615
+        $x += $w;
1616 1616
         $w     = round($maxW * 0.335, 0);
1617 1617
         $w2    = $w;
1618 1618
         $texto = 'BAIRRO / DISTRITO';
@@ -1622,12 +1622,12 @@  discard block
 block discarded – undo
1622 1622
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1623 1623
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1624 1624
         //CEP
1625
-        $x     += $w;
1625
+        $x += $w;
1626 1626
         $w     = $maxW - ($w1 + $w2);
1627 1627
         $texto = 'CEP';
1628 1628
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1629 1629
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1630
-        $texto = ! empty($this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1630
+        $texto = !empty($this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1631 1631
             $this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue : '';
1632 1632
         $texto = $this->formatField($texto, "#####-###");
1633 1633
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
@@ -1635,7 +1635,7 @@  discard block
 block discarded – undo
1635 1635
         //MUNICÍPIO
1636 1636
         $w     = round($maxW * 0.805, 0);
1637 1637
         $w1    = $w;
1638
-        $y     += $h;
1638
+        $y += $h;
1639 1639
         $x     = $oldX;
1640 1640
         $texto = 'MUNICÍPIO';
1641 1641
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1647,7 +1647,7 @@  discard block
 block discarded – undo
1647 1647
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1648 1648
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
1649 1649
         //UF
1650
-        $x     += $w;
1650
+        $x += $w;
1651 1651
         $w     = 8;
1652 1652
         $texto = 'UF';
1653 1653
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1656,12 +1656,12 @@  discard block
 block discarded – undo
1656 1656
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1657 1657
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1658 1658
         //FONE / FAX
1659
-        $x     += $w;
1659
+        $x += $w;
1660 1660
         $w     = $maxW - $w - $w1;
1661 1661
         $texto = 'FONE / FAX';
1662 1662
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1663 1663
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1664
-        $texto = ! empty($this->entrega->getElementsByTagName("fone")->item(0)->nodeValue) ?
1664
+        $texto = !empty($this->entrega->getElementsByTagName("fone")->item(0)->nodeValue) ?
1665 1665
             $this->entrega->getElementsByTagName("fone")->item(0)->nodeValue : '';
1666 1666
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1667 1667
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
@@ -1698,7 +1698,7 @@  discard block
 block discarded – undo
1698 1698
         //NOME / RAZÃO SOCIAL
1699 1699
         $w     = round($maxW * 0.61, 0);
1700 1700
         $w1    = $w;
1701
-        $y     += 3;
1701
+        $y += 3;
1702 1702
         $texto = 'NOME / RAZÃO SOCIAL';
1703 1703
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1704 1704
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1713,20 +1713,20 @@  discard block
 block discarded – undo
1713 1713
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, '');
1714 1714
         }
1715 1715
         //CNPJ / CPF
1716
-        $x     += $w;
1716
+        $x += $w;
1717 1717
         $w     = round($maxW * 0.23, 0);
1718 1718
         $w2    = $w;
1719 1719
         $texto = 'CNPJ / CPF';
1720 1720
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1721 1721
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1722 1722
         //Pegando valor do CPF/CNPJ
1723
-        if (! empty($this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1723
+        if (!empty($this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1724 1724
             $texto = $this->formatField(
1725 1725
                 $this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1726 1726
                 "###.###.###/####-##"
1727 1727
             );
1728 1728
         } else {
1729
-            $texto = ! empty($this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1729
+            $texto = !empty($this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1730 1730
                 $this->formatField(
1731 1731
                     $this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue,
1732 1732
                     "###.###.###-##"
@@ -1735,7 +1735,7 @@  discard block
 block discarded – undo
1735 1735
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1736 1736
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1737 1737
         //INSCRIÇÃO ESTADUAL
1738
-        $x     += $w;
1738
+        $x += $w;
1739 1739
         $w     = $maxW - ($w1 + $w2);
1740 1740
         $wx    = $w;
1741 1741
         $texto = 'INSCRIÇÃO ESTADUAL';
@@ -1754,7 +1754,7 @@  discard block
 block discarded – undo
1754 1754
         //ENDEREÇO
1755 1755
         $w     = round($maxW * 0.355, 0) + $wx;
1756 1756
         $w1    = $w;
1757
-        $y     += $h;
1757
+        $y += $h;
1758 1758
         $x     = $oldX;
1759 1759
         $texto = 'ENDEREÇO';
1760 1760
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1765,7 +1765,7 @@  discard block
 block discarded – undo
1765 1765
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1766 1766
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true);
1767 1767
         //BAIRRO / DISTRITO
1768
-        $x     += $w;
1768
+        $x += $w;
1769 1769
         $w     = round($maxW * 0.335, 0);
1770 1770
         $w2    = $w;
1771 1771
         $texto = 'BAIRRO / DISTRITO';
@@ -1775,12 +1775,12 @@  discard block
 block discarded – undo
1775 1775
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1776 1776
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1777 1777
         //CEP
1778
-        $x     += $w;
1778
+        $x += $w;
1779 1779
         $w     = $maxW - ($w1 + $w2);
1780 1780
         $texto = 'CEP';
1781 1781
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1782 1782
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1783
-        $texto = ! empty($this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1783
+        $texto = !empty($this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1784 1784
             $this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue : '';
1785 1785
         $texto = $this->formatField($texto, "#####-###");
1786 1786
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
@@ -1788,7 +1788,7 @@  discard block
 block discarded – undo
1788 1788
         //MUNICÍPIO
1789 1789
         $w     = round($maxW * 0.805, 0);
1790 1790
         $w1    = $w;
1791
-        $y     += $h;
1791
+        $y += $h;
1792 1792
         $x     = $oldX;
1793 1793
         $texto = 'MUNICÍPIO';
1794 1794
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1800,7 +1800,7 @@  discard block
 block discarded – undo
1800 1800
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1801 1801
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
1802 1802
         //UF
1803
-        $x     += $w;
1803
+        $x += $w;
1804 1804
         $w     = 8;
1805 1805
         $texto = 'UF';
1806 1806
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1809,12 +1809,12 @@  discard block
 block discarded – undo
1809 1809
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1810 1810
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1811 1811
         //FONE / FAX
1812
-        $x     += $w;
1812
+        $x += $w;
1813 1813
         $w     = $maxW - $w - $w1;
1814 1814
         $texto = 'FONE / FAX';
1815 1815
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1816 1816
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1817
-        $texto = ! empty($this->retirada->getElementsByTagName("fone")->item(0)->nodeValue) ?
1817
+        $texto = !empty($this->retirada->getElementsByTagName("fone")->item(0)->nodeValue) ?
1818 1818
             $this->retirada->getElementsByTagName("fone")->item(0)->nodeValue : '';
1819 1819
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1820 1820
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
@@ -1834,7 +1834,7 @@  discard block
 block discarded – undo
1834 1834
         if (isset($this->cobr)) {
1835 1835
             $fat = $this->cobr->getElementsByTagName("fat")->item(0);
1836 1836
             if (isset($fat)) {
1837
-                if (! empty($this->getTagValue($this->ide, "indPag"))) {
1837
+                if (!empty($this->getTagValue($this->ide, "indPag"))) {
1838 1838
                     $textoIndPag = "";
1839 1839
                     $indPag      = $this->getTagValue($this->ide, "indPag");
1840 1840
                     if ($indPag === "0") {
@@ -1908,7 +1908,7 @@  discard block
 block discarded – undo
1908 1908
             $h     = 8;
1909 1909
             $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B'];
1910 1910
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1911
-            $y       += 3;
1911
+            $y += 3;
1912 1912
             $dups    = "";
1913 1913
             $dupcont = 0;
1914 1914
             $nFat    = $this->dup->length;
@@ -1942,13 +1942,13 @@  discard block
 block discarded – undo
1942 1942
             }
1943 1943
             $increm = 1;
1944 1944
             foreach ($this->dup as $k => $d) {
1945
-                $nDup  = ! empty($this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue)
1945
+                $nDup  = !empty($this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue)
1946 1946
                     ? $this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue
1947 1947
                     : '';
1948
-                $dDup  = ! empty($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue)
1948
+                $dDup  = !empty($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue)
1949 1949
                     ? $this->ymdTodmy($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue)
1950 1950
                     : '';
1951
-                $vDup  = ! empty($this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue)
1951
+                $vDup  = !empty($this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue)
1952 1952
                     ? 'R$ ' . number_format(
1953 1953
                         $this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue,
1954 1954
                         2,
@@ -1995,7 +1995,7 @@  discard block
 block discarded – undo
1995 1995
             }
1996 1996
             if ($dupcont == 0) {
1997 1997
                 $y -= 9;
1998
-                $linha --;
1998
+                $linha--;
1999 1999
             }
2000 2000
 
2001 2001
             return ($y + $h);
@@ -2035,7 +2035,7 @@  discard block
 block discarded – undo
2035 2035
             $h     = 8;
2036 2036
             $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B'];
2037 2037
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
2038
-            $y       += 3;
2038
+            $y += 3;
2039 2039
             $dups    = "";
2040 2040
             $dupcont = 0;
2041 2041
             if ($this->orientacao == 'P') {
@@ -2068,7 +2068,7 @@  discard block
 block discarded – undo
2068 2068
                 '90' => 'Sem pagamento',
2069 2069
                 '99' => 'Outros'
2070 2070
             ];
2071
-            $bandeira       = [
2071
+            $bandeira = [
2072 2072
                 '01' => 'Visa',
2073 2073
                 '02' => 'Mastercard',
2074 2074
                 '03' => 'American',
@@ -2081,10 +2081,10 @@  discard block
 block discarded – undo
2081 2081
                 '99' => 'Outros'
2082 2082
             ];
2083 2083
             foreach ($this->detPag as $k => $d) {
2084
-                $fPag  = ! empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
2084
+                $fPag  = !empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
2085 2085
                     ? $this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue
2086 2086
                     : '0';
2087
-                $vPag  = ! empty($this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue)
2087
+                $vPag  = !empty($this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue)
2088 2088
                     ? 'R$ ' . number_format(
2089 2089
                         $this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue,
2090 2090
                         2,
@@ -2127,7 +2127,7 @@  discard block
 block discarded – undo
2127 2127
             }
2128 2128
             if ($dupcont == 0) {
2129 2129
                 $y -= 9;
2130
-                $linha --;
2130
+                $linha--;
2131 2131
             }
2132 2132
 
2133 2133
             return ($y + $h);
@@ -2159,7 +2159,7 @@  discard block
 block discarded – undo
2159 2159
         $the_field    = $this->ICMSTot->getElementsByTagName($campoImposto)->item(0);
2160 2160
         if (isset($the_field)) {
2161 2161
             $the_value = $the_field->nodeValue;
2162
-            if (! empty($the_value)) {
2162
+            if (!empty($the_value)) {
2163 2163
                 $valorImposto = number_format($the_value, 2, ",", ".");
2164 2164
             }
2165 2165
         }
@@ -2188,10 +2188,10 @@  discard block
 block discarded – undo
2188 2188
         $x_inicial = $x;
2189 2189
         //#####################################################################
2190 2190
         $campos_por_linha = 9;
2191
-        if (! $this->exibirPIS) {
2192
-            $campos_por_linha --;
2191
+        if (!$this->exibirPIS) {
2192
+            $campos_por_linha--;
2193 2193
         }
2194
-        if (! $this->exibirIcmsInterestadual) {
2194
+        if (!$this->exibirIcmsInterestadual) {
2195 2195
             $campos_por_linha -= 2;
2196 2196
         }
2197 2197
 
@@ -2278,12 +2278,12 @@  discard block
 block discarded – undo
2278 2278
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
2279 2279
         //NOME / RAZÃO SOCIAL
2280 2280
         $w1    = $maxW * 0.29;
2281
-        $y     += 3;
2281
+        $y += 3;
2282 2282
         $texto = 'NOME / RAZÃO SOCIAL';
2283 2283
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2284 2284
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, '');
2285 2285
         if (isset($this->transporta)) {
2286
-            $texto = ! empty($this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue)
2286
+            $texto = !empty($this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue)
2287 2287
                 ? $this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue
2288 2288
                 : '';
2289 2289
         } else {
@@ -2292,12 +2292,12 @@  discard block
 block discarded – undo
2292 2292
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2293 2293
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'L', 0, '');
2294 2294
         //FRETE POR CONTA
2295
-        $x     += $w1;
2295
+        $x += $w1;
2296 2296
         $w2    = $maxW * 0.15;
2297 2297
         $texto = 'FRETE';
2298 2298
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2299 2299
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2300
-        $tipoFrete = ! empty($this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue)
2300
+        $tipoFrete = !empty($this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue)
2301 2301
             ? $this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue
2302 2302
             : '0';
2303 2303
         switch ($tipoFrete) {
@@ -2323,12 +2323,12 @@  discard block
 block discarded – undo
2323 2323
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2324 2324
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'C', 'C', 1, '');
2325 2325
         //CÓDIGO ANTT
2326
-        $x     += $w2;
2326
+        $x += $w2;
2327 2327
         $texto = 'CÓDIGO ANTT';
2328 2328
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2329 2329
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2330 2330
         if (isset($this->veicTransp)) {
2331
-            $texto = ! empty($this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue)
2331
+            $texto = !empty($this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue)
2332 2332
                 ? $this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue
2333 2333
                 : '';
2334 2334
         } else {
@@ -2337,16 +2337,16 @@  discard block
 block discarded – undo
2337 2337
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2338 2338
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2339 2339
         //PLACA DO VEÍC
2340
-        $x     += $w2;
2340
+        $x += $w2;
2341 2341
         $texto = 'PLACA DO VEÍCULO';
2342 2342
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2343 2343
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2344 2344
         if (isset($this->veicTransp)) {
2345
-            $texto = ! empty($this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue)
2345
+            $texto = !empty($this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue)
2346 2346
                 ? $this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue
2347 2347
                 : '';
2348 2348
         } elseif (isset($this->reboque)) {
2349
-            $texto = ! empty($this->reboque->getElementsByTagName("placa")->item(0)->nodeValue)
2349
+            $texto = !empty($this->reboque->getElementsByTagName("placa")->item(0)->nodeValue)
2350 2350
                 ? $this->reboque->getElementsByTagName("placa")->item(0)->nodeValue
2351 2351
                 : '';
2352 2352
         } else {
@@ -2355,17 +2355,17 @@  discard block
 block discarded – undo
2355 2355
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2356 2356
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2357 2357
         //UF
2358
-        $x     += $w2;
2358
+        $x += $w2;
2359 2359
         $w3    = round($maxW * 0.04, 0);
2360 2360
         $texto = 'UF';
2361 2361
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2362 2362
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'L', 1, '');
2363 2363
         if (isset($this->veicTransp)) {
2364
-            $texto = ! empty($this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue)
2364
+            $texto = !empty($this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue)
2365 2365
                 ? $this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue
2366 2366
                 : '';
2367 2367
         } elseif (isset($this->reboque)) {
2368
-            $texto = ! empty($this->reboque->getElementsByTagName("UF")->item(0)->nodeValue)
2368
+            $texto = !empty($this->reboque->getElementsByTagName("UF")->item(0)->nodeValue)
2369 2369
                 ? $this->reboque->getElementsByTagName("UF")->item(0)->nodeValue
2370 2370
                 : '';
2371 2371
         } else {
@@ -2374,20 +2374,20 @@  discard block
 block discarded – undo
2374 2374
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2375 2375
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'C', 0, '');
2376 2376
         //CNPJ / CPF
2377
-        $x     += $w3;
2377
+        $x += $w3;
2378 2378
         $w     = $maxW - ($w1 + 3 * $w2 + $w3);
2379 2379
         $texto = 'CNPJ / CPF';
2380 2380
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2381 2381
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
2382 2382
         if (isset($this->transporta)) {
2383
-            $texto = ! empty($this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue)
2383
+            $texto = !empty($this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue)
2384 2384
                 ? $this->formatField(
2385 2385
                     $this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue,
2386 2386
                     "##.###.###/####-##"
2387 2387
                 )
2388 2388
                 : '';
2389 2389
             if ($texto == '') {
2390
-                $texto = ! empty($this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue)
2390
+                $texto = !empty($this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue)
2391 2391
                     ? $this->formatField(
2392 2392
                         $this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue,
2393 2393
                         "###.###.###-##"
@@ -2401,7 +2401,7 @@  discard block
 block discarded – undo
2401 2401
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
2402 2402
         //#####################################################################
2403 2403
         //ENDEREÇO
2404
-        $y     += $h;
2404
+        $y += $h;
2405 2405
         $x     = $oldX;
2406 2406
         $h     = 7;
2407 2407
         $w1    = $maxW * 0.44;
@@ -2409,7 +2409,7 @@  discard block
 block discarded – undo
2409 2409
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2410 2410
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, '');
2411 2411
         if (isset($this->transporta)) {
2412
-            $texto = ! empty($this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue)
2412
+            $texto = !empty($this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue)
2413 2413
                 ? $this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue
2414 2414
                 : '';
2415 2415
         } else {
@@ -2418,13 +2418,13 @@  discard block
 block discarded – undo
2418 2418
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2419 2419
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'L', 0, '');
2420 2420
         //MUNICÍPIO
2421
-        $x     += $w1;
2421
+        $x += $w1;
2422 2422
         $w2    = round($maxW * 0.30, 0);
2423 2423
         $texto = 'MUNICÍPIO';
2424 2424
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2425 2425
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2426 2426
         if (isset($this->transporta)) {
2427
-            $texto = ! empty($this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue)
2427
+            $texto = !empty($this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue)
2428 2428
                 ? $this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue
2429 2429
                 : '';
2430 2430
         } else {
@@ -2433,13 +2433,13 @@  discard block
 block discarded – undo
2433 2433
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2434 2434
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2435 2435
         //UF
2436
-        $x     += $w2;
2436
+        $x += $w2;
2437 2437
         $w3    = round($maxW * 0.04, 0);
2438 2438
         $texto = 'UF';
2439 2439
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2440 2440
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'L', 1, '');
2441 2441
         if (isset($this->transporta)) {
2442
-            $texto = ! empty($this->transporta->getElementsByTagName("UF")->item(0)->nodeValue)
2442
+            $texto = !empty($this->transporta->getElementsByTagName("UF")->item(0)->nodeValue)
2443 2443
                 ? $this->transporta->getElementsByTagName("UF")->item(0)->nodeValue
2444 2444
                 : '';
2445 2445
         } else {
@@ -2448,14 +2448,14 @@  discard block
 block discarded – undo
2448 2448
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2449 2449
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'C', 0, '');
2450 2450
         //INSCRIÇÃO ESTADUAL
2451
-        $x     += $w3;
2451
+        $x += $w3;
2452 2452
         $w     = $maxW - ($w1 + $w2 + $w3);
2453 2453
         $texto = 'INSCRIÇÃO ESTADUAL';
2454 2454
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2455 2455
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
2456 2456
         $texto = '';
2457 2457
         if (isset($this->transporta)) {
2458
-            if (! empty($this->transporta->getElementsByTagName("IE")->item(0)->nodeValue)) {
2458
+            if (!empty($this->transporta->getElementsByTagName("IE")->item(0)->nodeValue)) {
2459 2459
                 $texto = $this->transporta->getElementsByTagName("IE")->item(0)->nodeValue;
2460 2460
             }
2461 2461
         }
@@ -2471,13 +2471,13 @@  discard block
 block discarded – undo
2471 2471
         $pesoBruto   = 0;
2472 2472
         $pesoLiquido = 0;
2473 2473
         foreach ($volumes as $volume) {
2474
-            $quantidade  += ! empty($volume->getElementsByTagName("qVol")->item(0)->nodeValue) ?
2474
+            $quantidade  += !empty($volume->getElementsByTagName("qVol")->item(0)->nodeValue) ?
2475 2475
                 $volume->getElementsByTagName("qVol")->item(0)->nodeValue : 0;
2476
-            $pesoBruto   += ! empty($volume->getElementsByTagName("pesoB")->item(0)->nodeValue) ?
2476
+            $pesoBruto   += !empty($volume->getElementsByTagName("pesoB")->item(0)->nodeValue) ?
2477 2477
                 $volume->getElementsByTagName("pesoB")->item(0)->nodeValue : 0;
2478
-            $pesoLiquido += ! empty($volume->getElementsByTagName("pesoL")->item(0)->nodeValue) ?
2478
+            $pesoLiquido += !empty($volume->getElementsByTagName("pesoL")->item(0)->nodeValue) ?
2479 2479
                 $volume->getElementsByTagName("pesoL")->item(0)->nodeValue : 0;
2480
-            $texto       = ! empty($this->transp->getElementsByTagName("esp")->item(0)->nodeValue) ?
2480
+            $texto = !empty($this->transp->getElementsByTagName("esp")->item(0)->nodeValue) ?
2481 2481
                 $this->transp->getElementsByTagName("esp")->item(0)->nodeValue : '';
2482 2482
             if ($texto != $especie && $especie != '') {
2483 2483
                 //tem várias especies
@@ -2485,7 +2485,7 @@  discard block
 block discarded – undo
2485 2485
             } else {
2486 2486
                 $especie = $texto;
2487 2487
             }
2488
-            $texto = ! empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue)
2488
+            $texto = !empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue)
2489 2489
                 ? $this->transp->getElementsByTagName("marca")->item(0)->nodeValue
2490 2490
                 : '';
2491 2491
             if ($texto != $marca && $marca != '') {
@@ -2494,7 +2494,7 @@  discard block
 block discarded – undo
2494 2494
             } else {
2495 2495
                 $marca = $texto;
2496 2496
             }
2497
-            $texto = ! empty($this->transp->getElementsByTagName("nVol")->item(0)->nodeValue)
2497
+            $texto = !empty($this->transp->getElementsByTagName("nVol")->item(0)->nodeValue)
2498 2498
                 ? $this->transp->getElementsByTagName("nVol")->item(0)->nodeValue
2499 2499
                 : '';
2500 2500
             if ($texto != $numero && $numero != '') {
@@ -2507,20 +2507,20 @@  discard block
 block discarded – undo
2507 2507
 
2508 2508
         //#####################################################################
2509 2509
         //QUANTIDADE
2510
-        $y     += $h;
2510
+        $y += $h;
2511 2511
         $x     = $oldX;
2512 2512
         $h     = 7;
2513 2513
         $w1    = round($maxW * 0.10, 0);
2514 2514
         $texto = 'QUANTIDADE';
2515 2515
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2516 2516
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, '');
2517
-        if (! empty($quantidade)) {
2517
+        if (!empty($quantidade)) {
2518 2518
             $texto = $quantidade;
2519 2519
             $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2520 2520
             $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'C', 0, '');
2521 2521
         }
2522 2522
         //ESPÉCIE
2523
-        $x     += $w1;
2523
+        $x += $w1;
2524 2524
         $w2    = round($maxW * 0.17, 0);
2525 2525
         $texto = 'ESPÉCIE';
2526 2526
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -2529,16 +2529,16 @@  discard block
 block discarded – undo
2529 2529
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2530 2530
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2531 2531
         //MARCA
2532
-        $x     += $w2;
2532
+        $x += $w2;
2533 2533
         $texto = 'MARCA';
2534 2534
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2535 2535
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2536
-        $texto = ! empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) ?
2536
+        $texto = !empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) ?
2537 2537
             $this->transp->getElementsByTagName("marca")->item(0)->nodeValue : '';
2538 2538
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2539 2539
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2540 2540
         //NUMERAÇÃO
2541
-        $x     += $w2;
2541
+        $x += $w2;
2542 2542
         $texto = 'NUMERAÇÃO';
2543 2543
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2544 2544
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -2546,7 +2546,7 @@  discard block
 block discarded – undo
2546 2546
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2547 2547
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2548 2548
         //PESO BRUTO
2549
-        $x     += $w2;
2549
+        $x += $w2;
2550 2550
         $w3    = round($maxW * 0.20, 0);
2551 2551
         $texto = 'PESO BRUTO';
2552 2552
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -2559,7 +2559,7 @@  discard block
 block discarded – undo
2559 2559
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2560 2560
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'R', 0, '');
2561 2561
         //PESO LÍQUIDO
2562
-        $x     += $w3;
2562
+        $x += $w3;
2563 2563
         $w     = $maxW - ($w1 + 3 * $w2 + $w3);
2564 2564
         $texto = 'PESO LÍQUIDO';
2565 2565
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -2579,11 +2579,11 @@  discard block
 block discarded – undo
2579 2579
     protected function descricaoProdutoHelper($origem, $campo, $formato)
2580 2580
     {
2581 2581
         $valor_original = $origem->getElementsByTagName($campo)->item(0);
2582
-        if (! isset($valor_original)) {
2582
+        if (!isset($valor_original)) {
2583 2583
             return "";
2584 2584
         }
2585 2585
         $valor_original = $valor_original->nodeValue;
2586
-        $valor          = ! empty($valor_original) ? number_format($valor_original, 2, ",", ".") : '';
2586
+        $valor          = !empty($valor_original) ? number_format($valor_original, 2, ",", ".") : '';
2587 2587
 
2588 2588
         if ($valor != "") {
2589 2589
             return sprintf($formato, $valor);
@@ -2609,7 +2609,7 @@  discard block
 block discarded – undo
2609 2609
         $ICMSUFDest = $itemProd->getElementsByTagName("ICMSUFDest")->item(0);
2610 2610
         $impostos   = '';
2611 2611
 
2612
-        if (! empty($ICMS)) {
2612
+        if (!empty($ICMS)) {
2613 2613
             $impostos .= $this->descricaoProdutoHelper($ICMS, "vBCFCP", " BcFcp=%s");
2614 2614
             $impostos .= $this->descricaoProdutoHelper($ICMS, "pFCP", " pFcp=%s%%");
2615 2615
             $impostos .= $this->descricaoProdutoHelper($ICMS, "vFCP", " vFcp=%s");
@@ -2625,7 +2625,7 @@  discard block
 block discarded – undo
2625 2625
             $impostos .= $this->descricaoProdutoHelper($ICMS, "pST", " pSt=%s");
2626 2626
             $impostos .= $this->descricaoProdutoHelper($ICMS, "vICMSSTRet", " VALOR ICMS ST=%s");
2627 2627
         }
2628
-        if (! empty($ICMSUFDest)) {
2628
+        if (!empty($ICMSUFDest)) {
2629 2629
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pFCPUFDest", " pFCPUFDest=%s%%");
2630 2630
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pICMSUFDest", " pICMSUFDest=%s%%");
2631 2631
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pICMSInterPart", " pICMSInterPart=%s%%");
@@ -2633,20 +2633,20 @@  discard block
 block discarded – undo
2633 2633
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "vICMSUFDest", " vICMSUFDest=%s");
2634 2634
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "vICMSUFRemet", " vICMSUFRemet=%s");
2635 2635
         }
2636
-        $infAdProd = ! empty($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue)
2636
+        $infAdProd = !empty($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue)
2637 2637
             ? substr(
2638 2638
                 $this->anfaveaDANFE($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue),
2639 2639
                 0,
2640 2640
                 500
2641 2641
             )
2642 2642
             : '';
2643
-        if (! empty($infAdProd)) {
2643
+        if (!empty($infAdProd)) {
2644 2644
             $infAdProd = trim($infAdProd);
2645 2645
             $infAdProd .= ' ';
2646 2646
         }
2647 2647
         $loteTxt = '';
2648 2648
         $rastro  = $prod->getElementsByTagName("med");
2649
-        if (! empty($prod->getElementsByTagName("rastro"))) {
2649
+        if (!empty($prod->getElementsByTagName("rastro"))) {
2650 2650
             $rastro = $prod->getElementsByTagName("rastro");
2651 2651
             $i      = 0;
2652 2652
             while ($i < $rastro->length) {
@@ -2655,14 +2655,14 @@  discard block
 block discarded – undo
2655 2655
                 $loteTxt .= $this->getTagDate($rastro->item($i), 'dFab', ' Fab: ');
2656 2656
                 $loteTxt .= $this->getTagDate($rastro->item($i), 'dVal', ' Val: ');
2657 2657
                 $loteTxt .= $this->getTagValue($rastro->item($i), 'vPMC', ' PMC: ');
2658
-                $i ++;
2658
+                $i++;
2659 2659
             }
2660 2660
             if ($loteTxt != '') {
2661 2661
                 $loteTxt .= ' ';
2662 2662
             }
2663 2663
         }
2664 2664
         //NT2013.006 FCI
2665
-        $nFCI   = (! empty($itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue)) ?
2665
+        $nFCI   = (!empty($itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue)) ?
2666 2666
             ' FCI:' . $itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue : '';
2667 2667
         $tmp_ad = $infAdProd . ($this->descProdInfoComplemento ? $loteTxt . $impostos . $nFCI : '');
2668 2668
         $texto  = $prod->getElementsByTagName("xProd")->item(0)->nodeValue
@@ -2712,7 +2712,7 @@  discard block
 block discarded – undo
2712 2712
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
2713 2713
         $y += 3;
2714 2714
         //desenha a caixa dos dados dos itens da NF
2715
-        $hmax  += 1;
2715
+        $hmax += 1;
2716 2716
         $texto = '';
2717 2717
         $this->pdf->textBox($x, $y, $w, $hmax);
2718 2718
         //##################################################################################
@@ -2725,101 +2725,101 @@  discard block
 block discarded – undo
2725 2725
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2726 2726
         $this->pdf->line($x + $w1, $y, $x + $w1, $y + $hmax);
2727 2727
         //DESCRIÇÃO DO PRODUTO / SERVIÇO
2728
-        $x     += $w1;
2728
+        $x += $w1;
2729 2729
         $w2    = round($w * 0.25, 0);
2730 2730
         $texto = 'DESCRIÇÃO DO PRODUTO / SERVIÇO';
2731 2731
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2732 2732
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2733 2733
         $this->pdf->line($x + $w2, $y, $x + $w2, $y + $hmax);
2734 2734
         //NCM/SH
2735
-        $x     += $w2;
2735
+        $x += $w2;
2736 2736
         $w3    = round($w * 0.06, 0);
2737 2737
         $texto = 'NCM/SH';
2738 2738
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2739 2739
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2740 2740
         $this->pdf->line($x + $w3, $y, $x + $w3, $y + $hmax);
2741 2741
         //O/CST ou O/CSOSN
2742
-        $x     += $w3;
2742
+        $x += $w3;
2743 2743
         $w4    = round($w * 0.05, 0);
2744 2744
         $texto = 'O/CST'; // CRT = 2 ou CRT = 3
2745 2745
         if ($this->getTagValue($this->emit, 'CRT') == '1') {
2746
-            $texto = 'O/CSOSN';//Regime do Simples CRT = 1
2746
+            $texto = 'O/CSOSN'; //Regime do Simples CRT = 1
2747 2747
         }
2748 2748
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2749 2749
         $this->pdf->textBox($x, $y, $w4, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2750 2750
         $this->pdf->line($x + $w4, $y, $x + $w4, $y + $hmax);
2751 2751
         //CFOP
2752
-        $x     += $w4;
2752
+        $x += $w4;
2753 2753
         $w5    = round($w * 0.04, 0);
2754 2754
         $texto = 'CFOP';
2755 2755
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2756 2756
         $this->pdf->textBox($x, $y, $w5, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2757 2757
         $this->pdf->line($x + $w5, $y, $x + $w5, $y + $hmax);
2758 2758
         //UN
2759
-        $x     += $w5;
2759
+        $x += $w5;
2760 2760
         $w6    = round($w * 0.03, 0);
2761 2761
         $texto = 'UN';
2762 2762
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2763 2763
         $this->pdf->textBox($x, $y, $w6, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2764 2764
         $this->pdf->line($x + $w6, $y, $x + $w6, $y + $hmax);
2765 2765
         //QUANT
2766
-        $x     += $w6;
2766
+        $x += $w6;
2767 2767
         $w7    = round($w * 0.08, 0);
2768 2768
         $texto = 'QUANT';
2769 2769
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2770 2770
         $this->pdf->textBox($x, $y, $w7, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2771 2771
         $this->pdf->line($x + $w7, $y, $x + $w7, $y + $hmax);
2772 2772
         //VALOR UNIT
2773
-        $x     += $w7;
2773
+        $x += $w7;
2774 2774
         $w8    = round($w * 0.06, 0);
2775 2775
         $texto = 'VALOR UNIT';
2776 2776
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2777 2777
         $this->pdf->textBox($x, $y, $w8, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2778 2778
         $this->pdf->line($x + $w8, $y, $x + $w8, $y + $hmax);
2779 2779
         //VALOR TOTAL
2780
-        $x     += $w8;
2780
+        $x += $w8;
2781 2781
         $w9    = round($w * 0.06, 0);
2782 2782
         $texto = 'VALOR TOTAL';
2783 2783
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2784 2784
         $this->pdf->textBox($x, $y, $w9, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2785 2785
         $this->pdf->line($x + $w9, $y, $x + $w9, $y + $hmax);
2786 2786
         //VALOR DESCONTO
2787
-        $x     += $w9;
2787
+        $x += $w9;
2788 2788
         $w10   = round($w * 0.05, 0);
2789 2789
         $texto = 'VALOR DESC';
2790 2790
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2791 2791
         $this->pdf->textBox($x, $y, $w10, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2792 2792
         $this->pdf->line($x + $w10, $y, $x + $w10, $y + $hmax);
2793 2793
         //B.CÁLC ICMS
2794
-        $x     += $w10;
2794
+        $x += $w10;
2795 2795
         $w11   = round($w * 0.06, 0);
2796 2796
         $texto = 'B.CÁLC ICMS';
2797 2797
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2798 2798
         $this->pdf->textBox($x, $y, $w11, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2799 2799
         $this->pdf->line($x + $w11, $y, $x + $w11, $y + $hmax);
2800 2800
         //VALOR ICMS
2801
-        $x     += $w11;
2801
+        $x += $w11;
2802 2802
         $w12   = round($w * 0.06, 0);
2803 2803
         $texto = 'VALOR ICMS';
2804 2804
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2805 2805
         $this->pdf->textBox($x, $y, $w12, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2806 2806
         $this->pdf->line($x + $w12, $y, $x + $w12, $y + $hmax);
2807 2807
         //VALOR IPI
2808
-        $x     += $w12;
2808
+        $x += $w12;
2809 2809
         $w13   = round($w * 0.05, 0);
2810 2810
         $texto = 'VALOR IPI';
2811 2811
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2812 2812
         $this->pdf->textBox($x, $y, $w13, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2813 2813
         $this->pdf->line($x + $w13, $y, $x + $w13, $y + $hmax);
2814 2814
         //ALÍQ. ICMS
2815
-        $x     += $w13;
2815
+        $x += $w13;
2816 2816
         $w14   = round($w * 0.04, 0);
2817 2817
         $texto = 'ALÍQ. ICMS';
2818 2818
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2819 2819
         $this->pdf->textBox($x, $y, $w14, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2820 2820
         $this->pdf->line($x + $w14, $y, $x + $w14, $y + $hmax);
2821 2821
         //ALÍQ. IPI
2822
-        $x     += $w14;
2822
+        $x += $w14;
2823 2823
         $w15   = $w - ($w1 + $w2 + $w3 + $w4 + $w5 + $w6 + $w7 + $w8 + $w9 + $w10 + $w11 + $w12 + $w13 + $w14);
2824 2824
         $texto = 'ALÍQ. IPI';
2825 2825
         $this->pdf->textBox($x, $y, $w15, $h, $texto, $aFont, 'C', 'C', 0, '', false);
@@ -2864,7 +2864,7 @@  discard block
 block discarded – undo
2864 2864
                 // Informação sobre unidade de medida tributavel.
2865 2865
                 // Se não for para exibir a unidade de medida tributavel, então
2866 2866
                 // A Escrita irá começar em 0.
2867
-                if (! $mostrarUnidadeTributavel) {
2867
+                if (!$mostrarUnidadeTributavel) {
2868 2868
                     $yTrib = 0;
2869 2869
                 }
2870 2870
                 $h = $this->calculeHeight($thisItem, $mostrarUnidadeTributavel);
@@ -2899,7 +2899,7 @@  discard block
 block discarded – undo
2899 2899
                 }
2900 2900
                 $x += $w2;
2901 2901
                 //NCM
2902
-                $texto = ! empty($prod->getElementsByTagName("NCM")->item(0)->nodeValue) ?
2902
+                $texto = !empty($prod->getElementsByTagName("NCM")->item(0)->nodeValue) ?
2903 2903
                     $prod->getElementsByTagName("NCM")->item(0)->nodeValue : '';
2904 2904
                 $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'C', 0, '');
2905 2905
                 $x += $w3;
@@ -2912,11 +2912,11 @@  discard block
 block discarded – undo
2912 2912
                     $this->pdf->textBox($x, $y, $w4, $h, $texto, $aFont, 'T', 'C', 0, '');
2913 2913
                 }
2914 2914
                 //CFOP
2915
-                $x     += $w4;
2915
+                $x += $w4;
2916 2916
                 $texto = $prod->getElementsByTagName("CFOP")->item(0)->nodeValue;
2917 2917
                 $this->pdf->textBox($x, $y, $w5, $h, $texto, $aFont, 'T', 'C', 0, '');
2918 2918
                 //Unidade
2919
-                $x     += $w5;
2919
+                $x += $w5;
2920 2920
                 $texto = $uCom;
2921 2921
                 $this->pdf->textBox($x, $y, $w6, $h, $texto, $aFont, 'T', 'C', 0, '');
2922 2922
                 //Unidade de medida tributável
@@ -2937,7 +2937,7 @@  discard block
 block discarded – undo
2937 2937
                 // QTDADE Tributável
2938 2938
                 if ($mostrarUnidadeTributavel) {
2939 2939
                     $qTrib = $prod->getElementsByTagName("qTrib")->item(0);
2940
-                    if (! empty($qTrib)) {
2940
+                    if (!empty($qTrib)) {
2941 2941
                         $texto = number_format($qTrib->nodeValue, $this->qComCasasDec, ",", ".");
2942 2942
                         $this->pdf->textBox($x, $yTrib, $w7, $h, $texto, $aFont, 'T', $alinhamento, 0, '');
2943 2943
                     }
@@ -2950,7 +2950,7 @@  discard block
 block discarded – undo
2950 2950
                 // Valor Unitário Tributável
2951 2951
                 if ($mostrarUnidadeTributavel) {
2952 2952
                     $vUnTrib = $prod->getElementsByTagName("vUnTrib")->item(0);
2953
-                    if (! empty($vUnTrib)) {
2953
+                    if (!empty($vUnTrib)) {
2954 2954
                         $texto = number_format($vUnTrib->nodeValue, $this->vUnComCasasDec, ",", ".");
2955 2955
                         $this->pdf->textBox($x, $yTrib, $w8, $h, $texto, $aFont, 'T', $alinhamento, 0, '');
2956 2956
                     }
@@ -2964,7 +2964,7 @@  discard block
 block discarded – undo
2964 2964
                 $this->pdf->textBox($x, $y, $w9, $h, $texto, $aFont, 'T', $alinhamento, 0, '');
2965 2965
                 $x += $w9;
2966 2966
                 //Valor do Desconto
2967
-                $vdesc = ! empty($prod->getElementsByTagName("vDesc")->item(0)->nodeValue)
2967
+                $vdesc = !empty($prod->getElementsByTagName("vDesc")->item(0)->nodeValue)
2968 2968
                     ? $prod->getElementsByTagName("vDesc")->item(0)->nodeValue : 0;
2969 2969
 
2970 2970
                 $texto = number_format($vdesc, 2, ",", ".");
@@ -2972,7 +2972,7 @@  discard block
 block discarded – undo
2972 2972
                 //Valor da Base de calculo
2973 2973
                 $x += $w10;
2974 2974
                 if (isset($ICMS)) {
2975
-                    $texto = ! empty($ICMS->getElementsByTagName("vBC")->item(0)->nodeValue)
2975
+                    $texto = !empty($ICMS->getElementsByTagName("vBC")->item(0)->nodeValue)
2976 2976
                         ? number_format(
2977 2977
                             $ICMS->getElementsByTagName("vBC")->item(0)->nodeValue,
2978 2978
                             2,
@@ -2985,7 +2985,7 @@  discard block
 block discarded – undo
2985 2985
                 //Valor do ICMS
2986 2986
                 $x += $w11;
2987 2987
                 if (isset($ICMS)) {
2988
-                    $texto = ! empty($ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue)
2988
+                    $texto = !empty($ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue)
2989 2989
                         ? number_format(
2990 2990
                             $ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue,
2991 2991
                             2,
@@ -2998,7 +2998,7 @@  discard block
 block discarded – undo
2998 2998
                 //Valor do IPI
2999 2999
                 $x += $w12;
3000 3000
                 if (isset($IPI)) {
3001
-                    $texto = ! empty($IPI->getElementsByTagName("vIPI")->item(0)->nodeValue)
3001
+                    $texto = !empty($IPI->getElementsByTagName("vIPI")->item(0)->nodeValue)
3002 3002
                         ? number_format(
3003 3003
                             $IPI->getElementsByTagName("vIPI")->item(0)->nodeValue,
3004 3004
                             2,
@@ -3013,7 +3013,7 @@  discard block
 block discarded – undo
3013 3013
                 // %ICMS
3014 3014
                 $x += $w13;
3015 3015
                 if (isset($ICMS)) {
3016
-                    $texto = ! empty($ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue)
3016
+                    $texto = !empty($ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue)
3017 3017
                         ? number_format(
3018 3018
                             $ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue,
3019 3019
                             2,
@@ -3026,7 +3026,7 @@  discard block
 block discarded – undo
3026 3026
                 //%IPI
3027 3027
                 $x += $w14;
3028 3028
                 if (isset($IPI)) {
3029
-                    $texto = ! empty($IPI->getElementsByTagName("pIPI")->item(0)->nodeValue)
3029
+                    $texto = !empty($IPI->getElementsByTagName("pIPI")->item(0)->nodeValue)
3030 3030
                         ? number_format(
3031 3031
                             $IPI->getElementsByTagName("pIPI")->item(0)->nodeValue,
3032 3032
                             2,
@@ -3044,17 +3044,17 @@  discard block
 block discarded – undo
3044 3044
                 $veicProd = $prod->getElementsByTagName("veicProd")->item(0);
3045 3045
                 // Tag somente é gerada para veiculo 0k, e só é permitido um veiculo por NF-e por conta do detran
3046 3046
                 // Verifica se a Tag existe
3047
-                if (! empty($veicProd)) {
3047
+                if (!empty($veicProd)) {
3048 3048
                     $this->dadosItenVeiculoDANFE($oldX, $y, $nInicio, $h, $prod);
3049 3049
                 }
3050 3050
 
3051 3051
 
3052 3052
                 $y += $h;
3053
-                $i ++;
3053
+                $i++;
3054 3054
                 //incrementa o controle dos itens processados.
3055
-                $this->qtdeItensProc ++;
3055
+                $this->qtdeItensProc++;
3056 3056
             } else {
3057
-                $i ++;
3057
+                $i++;
3058 3058
             }
3059 3059
         }
3060 3060
 
@@ -3259,23 +3259,23 @@  discard block
 block discarded – undo
3259 3259
         $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B'];
3260 3260
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
3261 3261
         //INSCRIÇÃO MUNICIPAL
3262
-        $y     += 3;
3262
+        $y += 3;
3263 3263
         $w     = round($this->wPrint * 0.23, 0);
3264 3264
         $texto = 'INSCRIÇÃO MUNICIPAL';
3265 3265
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3266 3266
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3267 3267
         //inscrição municipal
3268
-        $texto = ! empty($this->emit->getElementsByTagName("IM")->item(0)->nodeValue) ?
3268
+        $texto = !empty($this->emit->getElementsByTagName("IM")->item(0)->nodeValue) ?
3269 3269
             $this->emit->getElementsByTagName("IM")->item(0)->nodeValue : '';
3270 3270
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
3271 3271
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
3272 3272
         //VALOR TOTAL DOS SERVIÇOS
3273
-        $x     += $w;
3273
+        $x += $w;
3274 3274
         $texto = 'VALOR TOTAL DOS SERVIÇOS';
3275 3275
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3276 3276
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3277 3277
         if (isset($this->ISSQNtot)) {
3278
-            $texto = ! empty($this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue) ?
3278
+            $texto = !empty($this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue) ?
3279 3279
                 $this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue : '';
3280 3280
             $texto = number_format($texto, 2, ",", ".");
3281 3281
         } else {
@@ -3284,14 +3284,14 @@  discard block
 block discarded – undo
3284 3284
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
3285 3285
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'R', 0, '');
3286 3286
         //BASE DE CÁLCULO DO ISSQN
3287
-        $x     += $w;
3287
+        $x += $w;
3288 3288
         $texto = 'BASE DE CÁLCULO DO ISSQN';
3289 3289
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3290 3290
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3291 3291
         if (isset($this->ISSQNtot)) {
3292
-            $texto = ! empty($this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue) ?
3292
+            $texto = !empty($this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue) ?
3293 3293
                 $this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue : '';
3294
-            $texto = ! empty($texto) ? number_format($texto, 2, ",", ".") : '';
3294
+            $texto = !empty($texto) ? number_format($texto, 2, ",", ".") : '';
3295 3295
         } else {
3296 3296
             $texto = '';
3297 3297
         }
@@ -3308,9 +3308,9 @@  discard block
 block discarded – undo
3308 3308
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3309 3309
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3310 3310
         if (isset($this->ISSQNtot)) {
3311
-            $texto = ! empty($this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue) ?
3311
+            $texto = !empty($this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue) ?
3312 3312
                 $this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue : '';
3313
-            $texto = ! empty($texto) ? number_format($texto, 2, ",", ".") : '';
3313
+            $texto = !empty($texto) ? number_format($texto, 2, ",", ".") : '';
3314 3314
         } else {
3315 3315
             $texto = '';
3316 3316
         }
@@ -3349,7 +3349,7 @@  discard block
 block discarded – undo
3349 3349
 
3350 3350
         //INFORMAÇÕES COMPLEMENTARES
3351 3351
         $texto = "INFORMAÇÕES COMPLEMENTARES";
3352
-        $y     += 3;
3352
+        $y += 3;
3353 3353
         $w     = $this->wAdic;
3354 3354
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => 'B'];
3355 3355
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -3359,7 +3359,7 @@  discard block
 block discarded – undo
3359 3359
         //$this->textoAdic com o texto completo do campo
3360 3360
         //echo str_replace("\n", "<br>",$this->textoAdic);
3361 3361
         //die;
3362
-        $y     += 1;
3362
+        $y += 1;
3363 3363
         $aFont = ['font' => $this->fontePadrao, 'size' => $this->textadicfontsize * $this->pdf->k, 'style' => ''];
3364 3364
         //$aFont = ['font'=>$this->fontePadrao, 'size'=> 5, 'style'=>''];
3365 3365
         $this->pdf->textBox($x, $y + 2, $w - 2, $h, $this->textoAdic, $aFont, 'T', 'L', 0, '', false);
@@ -3404,7 +3404,7 @@  discard block
 block discarded – undo
3404 3404
                 $texto = "CONTINGÊNCIA SVC-RS\n" . $dhCont . "\n" . $xJust;
3405 3405
                 break;
3406 3406
         }
3407
-        $y     += 2;
3407
+        $y += 2;
3408 3408
         $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => ''];
3409 3409
         $this->pdf->textBox($x, $y, $w - 2, $h, $texto, $aFont, 'T', 'L', 0, '', false);
3410 3410
 
@@ -3459,7 +3459,7 @@  discard block
 block discarded – undo
3459 3459
         $tpNF = $this->ide->getElementsByTagName('tpNF')->item(0)->nodeValue;
3460 3460
         if ($tpNF == '0') {
3461 3461
             //NFe de Entrada
3462
-            $emitente     = '';
3462
+            $emitente = '';
3463 3463
             $emitente     .= $this->dest->getElementsByTagName("xNome")->item(0)->nodeValue . " - ";
3464 3464
             $emitente     .= $this->enderDest->getElementsByTagName("xLgr")->item(0)->nodeValue . ", ";
3465 3465
             $emitente     .= $this->enderDest->getElementsByTagName("nro")->item(0)->nodeValue . " - ";
@@ -3512,10 +3512,10 @@  discard block
 block discarded – undo
3512 3512
             $texto .= "AO LADO";
3513 3513
         }
3514 3514
         $texto .= ". EMISSÃO: ";
3515
-        $dEmi  = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3515
+        $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3516 3516
             $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue : '';
3517 3517
         if ($dEmi == '') {
3518
-            $dEmi  = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3518
+            $dEmi  = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3519 3519
                 $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue : '';
3520 3520
             $aDemi = explode('T', $dEmi);
3521 3521
             $dEmi  = $aDemi[0];
@@ -3538,12 +3538,12 @@  discard block
 block discarded – undo
3538 3538
             $this->pdf->textBox($x1, $y, $w1, 18, $texto, $aFont, 'C', 'C', 1, '');
3539 3539
             //DATA DE RECEBIMENTO
3540 3540
             $texto = "DATA DE RECEBIMENTO";
3541
-            $y     += $h;
3541
+            $y += $h;
3542 3542
             $w2    = round($this->wPrint * 0.17, 0); //35;
3543 3543
             $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3544 3544
             $this->pdf->textBox($x, $y, $w2, 8, $texto, $aFont, 'T', 'L', 1, '');
3545 3545
             //IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR
3546
-            $x     += $w2;
3546
+            $x += $w2;
3547 3547
             $w3    = $w - $w2;
3548 3548
             $texto = "IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR";
3549 3549
             $this->pdf->textBox($x, $y, $w3, 8, $texto, $aFont, 'T', 'L', 1, '');
@@ -3554,7 +3554,7 @@  discard block
 block discarded – undo
3554 3554
 
3555 3555
             return $y;
3556 3556
         } else {
3557
-            $x --;
3557
+            $x--;
3558 3558
             $x = $this->pdf->textBox90($x, $y, $w - 1, $h, $texto, $aFontSmall, 'C', 'L', 0, '', false);
3559 3559
             //NUMERO DA NOTA FISCAL LOGO NFE
3560 3560
             $w1    = 18;
@@ -3575,7 +3575,7 @@  discard block
 block discarded – undo
3575 3575
             $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3576 3576
             $this->pdf->textBox90($x, $y, $w2, 8, $texto, $aFont, 'T', 'L', 1, '');
3577 3577
             //IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR
3578
-            $y     -= $w2;
3578
+            $y -= $w2;
3579 3579
             $w3    = $w - $w2;
3580 3580
             $texto = "IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR";
3581 3581
             $aFont = ['font' => $this->fontePadrao, 'size' => 5.7, 'style' => ''];
@@ -3596,18 +3596,18 @@  discard block
 block discarded – undo
3596 3596
      */
3597 3597
     protected function geraInformacoesDaTagCompra()
3598 3598
     {
3599
-        if (! $this->gerarInformacoesAutomaticas) {
3599
+        if (!$this->gerarInformacoesAutomaticas) {
3600 3600
             return '';
3601 3601
         }
3602 3602
         $saida = "";
3603 3603
         if (isset($this->compra)) {
3604
-            if (! empty($this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue)) {
3604
+            if (!empty($this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue)) {
3605 3605
                 $saida .= " Nota de Empenho: " . $this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue;
3606 3606
             }
3607
-            if (! empty($this->compra->getElementsByTagName("xPed")->item(0)->nodeValue)) {
3607
+            if (!empty($this->compra->getElementsByTagName("xPed")->item(0)->nodeValue)) {
3608 3608
                 $saida .= " Pedido: " . $this->compra->getElementsByTagName("xPed")->item(0)->nodeValue;
3609 3609
             }
3610
-            if (! empty($this->compra->getElementsByTagName("xCont")->item(0)->nodeValue)) {
3610
+            if (!empty($this->compra->getElementsByTagName("xCont")->item(0)->nodeValue)) {
3611 3611
                 $saida .= " Contrato: " . $this->compra->getElementsByTagName("xCont")->item(0)->nodeValue;
3612 3612
             }
3613 3613
         }
@@ -3638,10 +3638,10 @@  discard block
 block discarded – undo
3638 3638
         if ($icmss > 0) {
3639 3639
             $icmss = 1;
3640 3640
         }
3641
-        $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3641
+        $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3642 3642
             $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue : '';
3643 3643
         if ($dEmi == '') {
3644
-            $dEmi  = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3644
+            $dEmi  = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3645 3645
                 $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue : '';
3646 3646
             $aDemi = explode('T', $dEmi);
3647 3647
             $dEmi  = $aDemi[0];
@@ -3665,7 +3665,7 @@  discard block
 block discarded – undo
3665 3665
      */
3666 3666
     protected function geraInformacoesDasNotasReferenciadas()
3667 3667
     {
3668
-        if (! $this->gerarInformacoesAutomaticas) {
3668
+        if (!$this->gerarInformacoesAutomaticas) {
3669 3669
             return '';
3670 3670
         }
3671 3671
         $formaNfeRef = "\r\nNFe Ref.: série:%d número:%d emit:%s em %s [%s]";
@@ -3693,7 +3693,7 @@  discard block
 block discarded – undo
3693 3693
                 $cnpj          = $this->formatField(substr($chave_acesso, 6, 14), "##.###.###/####-##");
3694 3694
                 $serie         = substr($chave_acesso, 22, 3);
3695 3695
                 $numero        = substr($chave_acesso, 25, 9);
3696
-                $saida         .= sprintf($formaNfeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3696
+                $saida .= sprintf($formaNfeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3697 3697
             }
3698 3698
             $refNF = $nfRef->getElementsByTagName('refNF');
3699 3699
             foreach ($refNF as $umaRefNFe) {
@@ -3704,7 +3704,7 @@  discard block
 block discarded – undo
3704 3704
                 $numero = $umaRefNFe->getElementsByTagName('nNF')->item(0)->nodeValue;
3705 3705
                 $data   = substr($data, 2, 2) . "/20" . substr($data, 0, 2);
3706 3706
                 $cnpj   = $this->formatField($cnpj, "##.###.###/####-##");
3707
-                $saida  .= sprintf($formaNfRef, $serie, $numero, $cnpj, $data, $mod);
3707
+                $saida .= sprintf($formaNfRef, $serie, $numero, $cnpj, $data, $mod);
3708 3708
             }
3709 3709
             $refCTe = $nfRef->getElementsByTagName('refCTe');
3710 3710
             foreach ($refCTe as $chave_acessoRef) {
@@ -3714,7 +3714,7 @@  discard block
 block discarded – undo
3714 3714
                 $cnpj          = $this->formatField(substr($chave_acesso, 6, 14), "##.###.###/####-##");
3715 3715
                 $serie         = substr($chave_acesso, 22, 3);
3716 3716
                 $numero        = substr($chave_acesso, 25, 9);
3717
-                $saida         .= sprintf($formaCTeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3717
+                $saida .= sprintf($formaCTeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3718 3718
             }
3719 3719
             $refECF = $nfRef->getElementsByTagName('refECF');
3720 3720
             foreach ($refECF as $umaRefNFe) {
@@ -3726,10 +3726,9 @@  discard block
 block discarded – undo
3726 3726
             $refNFP = $nfRef->getElementsByTagName('refNFP');
3727 3727
             foreach ($refNFP as $umaRefNFe) {
3728 3728
                 $data   = $umaRefNFe->getElementsByTagName('AAMM')->item(0)->nodeValue;
3729
-                $cnpj   = ! empty($umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue) ?
3730
-                    $umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue :
3731
-                    '';
3732
-                $cpf    = ! empty($umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue) ?
3729
+                $cnpj   = !empty($umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue) ?
3730
+                    $umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue : '';
3731
+                $cpf    = !empty($umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue) ?
3733 3732
                     $umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue : '';
3734 3733
                 $mod    = $umaRefNFe->getElementsByTagName('mod')->item(0)->nodeValue;
3735 3734
                 $serie  = $umaRefNFe->getElementsByTagName('serie')->item(0)->nodeValue;
@@ -3751,7 +3750,7 @@  discard block
 block discarded – undo
3751 3750
     private function loadDoc($xml)
3752 3751
     {
3753 3752
         $this->xml = $xml;
3754
-        if (! empty($xml)) {
3753
+        if (!empty($xml)) {
3755 3754
             $this->dom = new Dom();
3756 3755
             $this->dom->loadXML($this->xml);
3757 3756
             if (empty($this->dom->getElementsByTagName("infNFe")->item(0))) {
@@ -3805,7 +3804,7 @@  discard block
 block discarded – undo
3805 3804
         $numlinhas    = $this->pdf->getNumLines($textoProduto, $w2, $aFont);
3806 3805
 
3807 3806
         if ($mostrarUnidadeTributavel && $numlinhas == 1) {
3808
-            $numlinhas ++;
3807
+            $numlinhas++;
3809 3808
         }
3810 3809
 
3811 3810
         return round(($numlinhas * $this->pdf->fontSize) + ($numlinhas * 0.5), 2);
Please login to merge, or discard this patch.
src/Legacy/FPDF/Fpdf181.php 2 patches
Spacing   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -7,64 +7,64 @@  discard block
 block discarded – undo
7 7
     const FPDF_VERSION = '1.81';
8 8
     const FPDF_FONTPATH = 'font/';
9 9
 
10
-    protected $page;               // current page number
11
-    protected $n;                  // current object number
12
-    protected $offsets;            // array of object offsets
13
-    protected $buffer;             // buffer holding in-memory PDF
14
-    protected $pages;              // array containing pages
15
-    protected $state;              // current document state
16
-    protected $compress;           // compression flag
17
-    public $k;                  // scale factor (number of points in user unit)
18
-    protected $defOrientation;     // default orientation
19
-    protected $curOrientation;     // current orientation
20
-    protected $stdPageSizes;       // standard page sizes
21
-    protected $defPageSize;        // default page size
22
-    protected $curPageSize;        // current page size
23
-    protected $curRotation;        // current page rotation
24
-    protected $pageInfo;           // page-related data
10
+    protected $page; // current page number
11
+    protected $n; // current object number
12
+    protected $offsets; // array of object offsets
13
+    protected $buffer; // buffer holding in-memory PDF
14
+    protected $pages; // array containing pages
15
+    protected $state; // current document state
16
+    protected $compress; // compression flag
17
+    public $k; // scale factor (number of points in user unit)
18
+    protected $defOrientation; // default orientation
19
+    protected $curOrientation; // current orientation
20
+    protected $stdPageSizes; // standard page sizes
21
+    protected $defPageSize; // default page size
22
+    protected $curPageSize; // current page size
23
+    protected $curRotation; // current page rotation
24
+    protected $pageInfo; // page-related data
25 25
     protected $wPt;
26
-    protected $hPt;          // dimensions of current page in points
26
+    protected $hPt; // dimensions of current page in points
27 27
     protected $w;
28
-    protected $h;              // dimensions of current page in user unit
29
-    protected $lMargin;            // left margin
30
-    protected $tMargin;            // top margin
31
-    protected $rMargin;            // right margin
32
-    protected $bMargin;            // page break margin
33
-    protected $cMargin;            // cell margin
28
+    protected $h; // dimensions of current page in user unit
29
+    protected $lMargin; // left margin
30
+    protected $tMargin; // top margin
31
+    protected $rMargin; // right margin
32
+    protected $bMargin; // page break margin
33
+    protected $cMargin; // cell margin
34 34
     protected $x;
35
-    protected $y;              // current position in user unit
36
-    protected $lasth;              // height of last printed cell
37
-    protected $lineWidth;          // line width in user unit
38
-    protected $fontpath;           // path containing fonts
39
-    protected $coreFonts;          // array of core font names
40
-    protected $fonts;              // array of used fonts
41
-    protected $fontFiles;          // array of font files
42
-    protected $encodings;          // array of encodings
43
-    protected $cmaps;              // array of ToUnicode CMaps
44
-    protected $fontFamily;         // current font family
45
-    protected $fontStyle;          // current font style
46
-    protected $underline;          // underlining flag
47
-    protected $currentFont;        // current font info
48
-    protected $fontSizePt;         // current font size in points
49
-    public $fontSize;           // current font size in user unit
50
-    protected $drawColor;          // commands for drawing color
51
-    protected $fillColor;          // commands for filling color
52
-    protected $textColor;          // commands for text color
53
-    protected $colorFlag;          // indicates whether fill and text colors are different
54
-    protected $withAlpha;          // indicates whether alpha channel is used
55
-    protected $ws;                 // word spacing
56
-    protected $images;             // array of used images
57
-    protected $pageLinks;          // array of links in pages
58
-    protected $links;              // array of internal links
59
-    protected $autoPageBreak;      // automatic page breaking
60
-    protected $pageBreakTrigger;   // threshold used to trigger page breaks
61
-    protected $inHeader;           // flag set when processing header
62
-    protected $infooter;           // flag set when processing footer
63
-    protected $aliasNbPages;       // alias for total number of pages
64
-    protected $zoomMode;           // zoom display mode
65
-    protected $layoutMode;         // layout display mode
66
-    protected $metadata;           // document properties
67
-    protected $pdfVersion;         // PDF version number
35
+    protected $y; // current position in user unit
36
+    protected $lasth; // height of last printed cell
37
+    protected $lineWidth; // line width in user unit
38
+    protected $fontpath; // path containing fonts
39
+    protected $coreFonts; // array of core font names
40
+    protected $fonts; // array of used fonts
41
+    protected $fontFiles; // array of font files
42
+    protected $encodings; // array of encodings
43
+    protected $cmaps; // array of ToUnicode CMaps
44
+    protected $fontFamily; // current font family
45
+    protected $fontStyle; // current font style
46
+    protected $underline; // underlining flag
47
+    protected $currentFont; // current font info
48
+    protected $fontSizePt; // current font size in points
49
+    public $fontSize; // current font size in user unit
50
+    protected $drawColor; // commands for drawing color
51
+    protected $fillColor; // commands for filling color
52
+    protected $textColor; // commands for text color
53
+    protected $colorFlag; // indicates whether fill and text colors are different
54
+    protected $withAlpha; // indicates whether alpha channel is used
55
+    protected $ws; // word spacing
56
+    protected $images; // array of used images
57
+    protected $pageLinks; // array of links in pages
58
+    protected $links; // array of internal links
59
+    protected $autoPageBreak; // automatic page breaking
60
+    protected $pageBreakTrigger; // threshold used to trigger page breaks
61
+    protected $inHeader; // flag set when processing header
62
+    protected $infooter; // flag set when processing footer
63
+    protected $aliasNbPages; // alias for total number of pages
64
+    protected $zoomMode; // zoom display mode
65
+    protected $layoutMode; // layout display mode
66
+    protected $metadata; // document properties
67
+    protected $pdfVersion; // PDF version number
68 68
 
69 69
     public function __construct($orientation = 'P', $unit = 'mm', $size = 'A4')
70 70
     {
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $this->withAlpha = false;
98 98
         $this->ws = 0;
99 99
 
100
-        $this->fontpath = __DIR__. FPDF_FONTPATH;
100
+        $this->fontpath = __DIR__ . FPDF_FONTPATH;
101 101
 
102 102
         // Core fonts
103 103
         $this->coreFonts = [
Please login to merge, or discard this patch.
Doc Comments   +56 added lines patch added patch discarded remove patch
@@ -172,6 +172,9 @@  discard block
 block discarded – undo
172 172
         $this->pdfVersion = '1.3';
173 173
     }
174 174
 
175
+    /**
176
+     * @param integer $right
177
+     */
175 178
     public function setMargins($left, $top, $right = null)
176 179
     {
177 180
         // Set left, top and right margins
@@ -204,6 +207,9 @@  discard block
 block discarded – undo
204 207
         $this->rMargin = $margin;
205 208
     }
206 209
 
210
+    /**
211
+     * @param boolean $auto
212
+     */
207 213
     public function setautoPageBreak($auto, $margin = 0)
208 214
     {
209 215
         // Set auto page break mode and triggering margin
@@ -211,6 +217,10 @@  discard block
 block discarded – undo
211 217
         $this->bMargin = $margin;
212 218
         $this->pageBreakTrigger = $this->h - $margin;
213 219
     }
220
+
221
+    /**
222
+     * @param string $zoom
223
+     */
214 224
     public function setDisplayMode($zoom, $layout = 'default')
215 225
     {
216 226
         // Set display mode in viewer
@@ -226,6 +236,9 @@  discard block
 block discarded – undo
226 236
         }
227 237
     }
228 238
 
239
+    /**
240
+     * @param boolean $compress
241
+     */
229 242
     public function setCompression($compress)
230 243
     {
231 244
         // Set page compression
@@ -272,6 +285,9 @@  discard block
 block discarded – undo
272 285
         $this->aliasNbPages = $alias;
273 286
     }
274 287
 
288
+    /**
289
+     * @param string $msg
290
+     */
275 291
     public function error($msg)
276 292
     {
277 293
         // Fatal error
@@ -382,6 +398,12 @@  discard block
 block discarded – undo
382 398
         // Get current page number
383 399
         return $this->page;
384 400
     }
401
+
402
+    /**
403
+     * @param integer $r
404
+     * @param integer $g
405
+     * @param integer $b
406
+     */
385 407
     public function setdrawColor($r, $g = null, $b = null)
386 408
     {
387 409
         // Set color for all stroking operations
@@ -395,6 +417,11 @@  discard block
 block discarded – undo
395 417
         }
396 418
     }
397 419
 
420
+    /**
421
+     * @param integer $r
422
+     * @param integer $g
423
+     * @param integer $b
424
+     */
398 425
     public function setfillColor($r, $g = null, $b = null)
399 426
     {
400 427
         // Set color for all filling operations
@@ -409,6 +436,11 @@  discard block
 block discarded – undo
409 436
         }
410 437
     }
411 438
 
439
+    /**
440
+     * @param integer $r
441
+     * @param integer $g
442
+     * @param integer $b
443
+     */
412 444
     public function settextColor($r, $g = null, $b = null)
413 445
     {
414 446
         // Set color for text
@@ -478,6 +510,9 @@  discard block
 block discarded – undo
478 510
         );
479 511
     }
480 512
 
513
+    /**
514
+     * @param string $family
515
+     */
481 516
     public function addFont($family, $style = '', $file = '')
482 517
     {
483 518
         // Add a TrueType, OpenType or Type1 font
@@ -594,6 +629,10 @@  discard block
 block discarded – undo
594 629
         $this->links[$link] = [$page, $y];
595 630
     }
596 631
 
632
+    /**
633
+     * @param double $y
634
+     * @param string $link
635
+     */
597 636
     public function link($x, $y, $w, $h, $link)
598 637
     {
599 638
         // Put a link on the page
@@ -606,6 +645,10 @@  discard block
 block discarded – undo
606 645
         ];
607 646
     }
608 647
 
648
+    /**
649
+     * @param double $y
650
+     * @param string $txt
651
+     */
609 652
     public function text($x, $y, $txt)
610 653
     {
611 654
         // output a string
@@ -770,6 +813,9 @@  discard block
 block discarded – undo
770 813
         }
771 814
     }
772 815
 
816
+    /**
817
+     * @param integer $h
818
+     */
773 819
     public function multiCell($w, $h, $txt, $border = 0, $align = 'J', $fill = false)
774 820
     {
775 821
         // output text with automatic or explicit line breaks
@@ -970,6 +1016,9 @@  discard block
 block discarded – undo
970 1016
         }
971 1017
     }
972 1018
 
1019
+    /**
1020
+     * @param string $file
1021
+     */
973 1022
     public function image($file, $x = null, $y = null, $w = 0, $h = 0, $type = '', $link = '')
974 1023
     {
975 1024
         // Put an image on the page
@@ -1214,6 +1263,10 @@  discard block
 block discarded – undo
1214 1263
         }
1215 1264
     }
1216 1265
 
1266
+    /**
1267
+     * @param string $orientation
1268
+     * @param string $size
1269
+     */
1217 1270
     protected function beginPage($orientation, $size, $rotation)
1218 1271
     {
1219 1272
         $this->page++;
@@ -1416,6 +1469,9 @@  discard block
 block discarded – undo
1416 1469
         ];
1417 1470
     }
1418 1471
 
1472
+    /**
1473
+     * @param string $file
1474
+     */
1419 1475
     protected function parsePng($file)
1420 1476
     {
1421 1477
         // Extract info from a PNG file
Please login to merge, or discard this patch.
src/NFe/Danfce.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -279,7 +279,6 @@
 block discarded – undo
279 279
 
280 280
     /**
281 281
      * Carrega os dados do xml na classe
282
-     * @param string $xml
283 282
      *
284 283
      * @throws InvalidArgumentException
285 284
      */
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -13,13 +13,11 @@
 block discarded – undo
13 13
  * @link      http://github.com/nfephp-org/sped-da for the canonical source repository
14 14
  */
15 15
 
16
-use DateTime;
17 16
 use Exception;
18 17
 use InvalidArgumentException;
19 18
 use NFePHP\DA\Legacy\Dom;
20 19
 use NFePHP\DA\Legacy\Pdf;
21 20
 use NFePHP\DA\Common\DaCommon;
22
-use Com\Tecnick\Barcode\Barcode;
23 21
 
24 22
 class Danfce extends DaCommon
25 23
 {
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
     protected $paperwidth = 80;
28 28
     protected $descPercent = 0.38;
29 29
     protected $xml; // string XML NFe
30
-    protected $logomarca=''; // path para logomarca em jpg
31
-    protected $formatoChave="#### #### #### #### #### #### #### #### #### #### ####";
30
+    protected $logomarca = ''; // path para logomarca em jpg
31
+    protected $formatoChave = "#### #### #### #### #### #### #### #### #### #### ####";
32 32
     protected $nfeProc;
33 33
     protected $nfe;
34 34
     protected $infNFe;
@@ -220,10 +220,10 @@  discard block
 block discarded – undo
220 220
         //total inicial de paginas
221 221
         $totPag = 1;
222 222
         //largura imprimivel em mm: largura da folha menos as margens esq/direita
223
-        $this->wPrint = $maxW-($margEsq*2);
223
+        $this->wPrint = $maxW - ($margEsq * 2);
224 224
         //comprimento (altura) imprimivel em mm: altura da folha menos as margens
225 225
         //superior e inferior
226
-        $this->hPrint = $maxH-$margSup-$margInf;
226
+        $this->hPrint = $maxH - $margSup - $margInf;
227 227
         // estabelece contagem de paginas
228 228
         $this->pdf->aliasNbPages();
229 229
         $this->pdf->setMargins($margEsq, $margSup); // fixa as margens
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
         $y = $this->blocoIX($y); //informações sobre tributos
248 248
         $y = $this->blocoX($y); //creditos
249 249
         
250
-        $ymark = $maxH/4;
250
+        $ymark = $maxH / 4;
251 251
         if ($this->tpAmb == 2) {
252 252
             $this->pdf->setTextColor(120, 120, 120);
253 253
             $texto = "SEM VALOR FISCAL\nEmitida em ambiente de homologacao";
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
                 $this->margem,
257 257
                 $ymark,
258 258
                 $this->wPrint,
259
-                $maxH/2,
259
+                $maxH / 2,
260 260
                 $texto,
261 261
                 $aFont,
262 262
                 'T',
@@ -273,9 +273,9 @@  discard block
 block discarded – undo
273 273
             $aFont = ['font' => $this->fontePadrao, 'size' => 24, 'style' => 'B'];
274 274
             $this->pdf->textBox(
275 275
                 $this->margem,
276
-                $ymark+4,
276
+                $ymark + 4,
277 277
                 $this->wPrint,
278
-                $maxH/2,
278
+                $maxH / 2,
279 279
                 $texto,
280 280
                 $aFont,
281 281
                 'T',
@@ -287,9 +287,9 @@  discard block
 block discarded – undo
287 287
             $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
288 288
             $this->pdf->textBox(
289 289
                 $this->margem,
290
-                $ymark+14,
290
+                $ymark + 14,
291 291
                 $this->wPrint,
292
-                $maxH/2,
292
+                $maxH / 2,
293 293
                 $this->submessage,
294 294
                 $aFont,
295 295
                 'T',
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
             $y = $this->blocoVIII($y); //QRCODE
318 318
             $y = $this->blocoIX($y); //informações sobre tributos
319 319
             $y = $this->blocoX($y); //creditos
320
-            $ymark = $maxH/4;
320
+            $ymark = $maxH / 4;
321 321
             if ($this->tpAmb == 2) {
322 322
                 $this->pdf->setTextColor(120, 120, 120);
323 323
                 $texto = "SEM VALOR FISCAL\nEmitida em ambiente de homologacao";
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
                     $this->margem,
327 327
                     $ymark,
328 328
                     $this->wPrint,
329
-                    $maxH/2,
329
+                    $maxH / 2,
330 330
                     $texto,
331 331
                     $aFont,
332 332
                     'T',
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
             } elseif (!empty($retEvento = $this->nfeProc->getElementsByTagName('retEvento')->item(0))) {
411 411
                 $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0);
412 412
                 $cStat = $this->getTagValue($infEvento, "cStat");
413
-                $tpEvento= $this->getTagValue($infEvento, "tpEvento");
413
+                $tpEvento = $this->getTagValue($infEvento, "tpEvento");
414 414
                 $dhEvento = date(
415 415
                     "d/m/Y H:i:s",
416 416
                     $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.