Completed
Push — master ( 289bf4...88f9c6 )
by Roberto
06:18 queued 03:34
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   +9 added lines, -11 removed lines patch added patch discarded remove patch
@@ -945,7 +945,7 @@  discard block
 block discarded – undo
945 945
             $n = count($resp['message']);
946 946
             $alttot = $n * 15;
947 947
             $x = 10;
948
-            $y = $this->hPrint/2 - $alttot/2;
948
+            $y = $this->hPrint / 2 - $alttot / 2;
949 949
             $h = 15;
950 950
             $w = $maxW - (2 * $x);
951 951
             $this->pdf->settextcolor(90, 90, 90);
@@ -989,10 +989,10 @@  discard block
 block discarded – undo
989 989
             $resp['message'][] = 'CTe NÃO PROTOCOLADO';
990 990
         } elseif ($this->getTagValue($this->ide, "tpAmb") == '2' && $this->preVisualizar == '0') {
991 991
             $resp['status'] = false;
992
-            $resp['message'][] =  "CTe EMITIDO EM HOMOLOGAÇÃO";
992
+            $resp['message'][] = "CTe EMITIDO EM HOMOLOGAÇÃO";
993 993
         } elseif ($this->preVisualizar == '1') {
994 994
             $resp['status'] = false;
995
-            $resp['message'][] =  "PRÉ-VISUALIZAÇÃO";
995
+            $resp['message'][] = "PRÉ-VISUALIZAÇÃO";
996 996
         }
997 997
         $retEvento = $this->cteProc->getElementsByTagName('retEventoCTe')->item(0);
998 998
         $cStat = $this->getTagValue($this->cteProc, "cStat");
@@ -1013,7 +1013,7 @@  discard block
 block discarded – undo
1013 1013
         } elseif (!empty($retEvento)) {
1014 1014
             $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0);
1015 1015
             $cStat = $this->getTagValue($infEvento, "cStat");
1016
-            $tpEvento= $this->getTagValue($infEvento, "tpEvento");
1016
+            $tpEvento = $this->getTagValue($infEvento, "tpEvento");
1017 1017
             $dhEvento = date("d/m/Y H:i:s", $this->toTimestamp($this->getTagValue($infEvento, "dhRegEvento")));
1018 1018
             $nProt = $this->getTagValue($infEvento, "nProt");
1019 1019
             if ($tpEvento == '110111' && ($cStat == '101' || $cStat == '151' || $cStat == '135' || $cStat == '155')) {
@@ -1269,8 +1269,7 @@  discard block
 block discarded – undo
1269 1269
             $texto = $this->getTagValue($this->enderExped, "xLgr") . ', ';
1270 1270
             $texto .= $this->getTagValue($this->enderExped, "nro");
1271 1271
             $texto .= $this->getTagValue($this->enderExped, "xCpl") != "" ?
1272
-                ' - ' . $this->getTagValue($this->enderExped, "xCpl") :
1273
-                '';
1272
+                ' - ' . $this->getTagValue($this->enderExped, "xCpl") : '';
1274 1273
         } else {
1275 1274
             $texto = '';
1276 1275
         }
@@ -1366,8 +1365,7 @@  discard block
 block discarded – undo
1366 1365
             $texto = $this->getTagValue($this->enderReceb, "xLgr") . ', ';
1367 1366
             $texto .= $this->getTagValue($this->enderReceb, "nro");
1368 1367
             $texto .= ($this->getTagValue($this->enderReceb, "xCpl") != "") ?
1369
-                ' - ' . $this->getTagValue($this->enderReceb, "xCpl") :
1370
-                '';
1368
+                ' - ' . $this->getTagValue($this->enderReceb, "xCpl") : '';
1371 1369
         } else {
1372 1370
             $texto = '';
1373 1371
         }
@@ -1623,7 +1621,7 @@  discard block
 block discarded – undo
1623 1621
         $qCarga = 0;
1624 1622
         foreach ($this->infQ as $infQ) {
1625 1623
             if ($this->getTagValue($infQ, "cUnid") == '00') {
1626
-                $qCarga += (float)$this->getTagValue($infQ, "qCarga");
1624
+                $qCarga += (float) $this->getTagValue($infQ, "qCarga");
1627 1625
             }
1628 1626
         }
1629 1627
         $texto = !empty($qCarga) ? number_format($qCarga, 3, ",", ".") : '';
@@ -1640,7 +1638,7 @@  discard block
 block discarded – undo
1640 1638
         $qCarga = 0;
1641 1639
         foreach ($this->infQ as $infQ) {
1642 1640
             if ($this->getTagValue($infQ, "cUnid") == '03') {
1643
-                $qCarga += (float)$this->getTagValue($infQ, "qCarga");
1641
+                $qCarga += (float) $this->getTagValue($infQ, "qCarga");
1644 1642
             }
1645 1643
         }
1646 1644
         $texto = !empty($qCarga) ? number_format($qCarga, 3, ",", ".") : '';
@@ -3570,7 +3568,7 @@  discard block
 block discarded – undo
3570 3568
         $y = $y + 5;
3571 3569
         $this->pdf->line($x, $y + 3, $w * 0.255, $y + 3); // LINHA HORIZONTAL ACIMA DO RG ABAIXO DO NOME
3572 3570
         $texto = 'RG';
3573
-        $aFont = ['font' => $this->fontePadrao,'size' => 6,'style' => ''];
3571
+        $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3574 3572
         $this->pdf->textBox($x, $y + 3, $w * 0.33, $h, $texto, $aFont, 'T', 'L', 0, '');
3575 3573
         $x += $w * 0.85;
3576 3574
         $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   +230 added lines, -231 removed lines patch added patch discarded remove patch
@@ -310,39 +310,39 @@  discard block
 block discarded – undo
310 310
     {
311 311
         $this->textoAdic = '';
312 312
         //informações adicionais
313
-        $fontProduto            = [
313
+        $fontProduto = [
314 314
             'font'  => $this->fontePadrao,
315 315
             'size'  => 8,
316 316
             'style' => ''
317 317
         ];
318 318
         $k                      = $this->pdf->k;
319 319
         $this->textadicfontsize = $fontProduto['size'] / $k;
320
-        $this->textoAdic        .= $this->geraInformacoesDasNotasReferenciadas();
320
+        $this->textoAdic .= $this->geraInformacoesDasNotasReferenciadas();
321 321
         if (isset($this->infAdic)) {
322 322
             $i = 0;
323 323
             if ($this->textoAdic != '') {
324 324
                 $this->textoAdic .= ". \n";
325 325
             }
326
-            $this->textoAdic .= ! empty($this->getTagValue($this->infAdic, "infCpl"))
326
+            $this->textoAdic .= !empty($this->getTagValue($this->infAdic, "infCpl"))
327 327
                 ? 'Inf. Contribuinte: ' . $this->anfaveaDANFE($this->getTagValue($this->infAdic, "infCpl"))
328 328
                 : '';
329
-            $infPedido       = $this->geraInformacoesDaTagCompra();
329
+            $infPedido = $this->geraInformacoesDaTagCompra();
330 330
             if ($infPedido != "") {
331 331
                 $this->textoAdic .= $infPedido;
332 332
             }
333 333
             $this->textoAdic .= $this->getTagValue($this->dest, "email", ' Email do Destinatário: ');
334
-            $this->textoAdic .= ! empty($this->getTagValue($this->infAdic, "infAdFisco"))
334
+            $this->textoAdic .= !empty($this->getTagValue($this->infAdic, "infAdFisco"))
335 335
                 ? "\n Inf. fisco: " . $this->getTagValue($this->infAdic, "infAdFisco")
336 336
                 : '';
337
-            $obsCont         = $this->infAdic->getElementsByTagName("obsCont");
337
+            $obsCont = $this->infAdic->getElementsByTagName("obsCont");
338 338
             if (isset($obsCont)) {
339 339
                 foreach ($obsCont as $obs) {
340 340
                     $campo           = $obsCont->item($i)->getAttribute("xCampo");
341
-                    $xTexto          = ! empty($obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue)
341
+                    $xTexto          = !empty($obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue)
342 342
                         ? $obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue
343 343
                         : '';
344 344
                     $this->textoAdic .= "\n" . $campo . ':  ' . trim($xTexto);
345
-                    $i ++;
345
+                    $i++;
346 346
                 }
347 347
             }
348 348
         }
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
             $flagVTT  = $flagVTT && (strpos(strtolower(trim($this->textoAdic)), 'trib') ||
357 357
                     strpos(strtolower(trim($this->textoAdic)), 'imp'));
358 358
             $vTotTrib = $this->getTagValue($this->ICMSTot, 'vTotTrib');
359
-            if ($vTotTrib != '' && ! $flagVTT) {
359
+            if ($vTotTrib != '' && !$flagVTT) {
360 360
                 $this->textoAdic .= "\n Valor Aproximado dos Tributos : R$ "
361 361
                     . number_format($vTotTrib, 2, ",", ".");
362 362
             }
@@ -367,9 +367,9 @@  discard block
 block discarded – undo
367 367
         $this->textadicfontsize = $this->pdf->fontSize;
368 368
         $hdadosadic             = ceil($numlinhasdados * ($this->textadicfontsize));
369 369
         if ($hdadosadic > 70) {
370
-            for ($f = 8; $f > 3; $f --) {
370
+            for ($f = 8; $f > 3; $f--) {
371 371
                 $this->pdf->setFont($this->fontePadrao, '', $f);
372
-                $fontProduto            = [
372
+                $fontProduto = [
373 373
                     'font'  => $this->fontePadrao,
374 374
                     'size'  => $f,
375 375
                     'style' => ''
@@ -497,9 +497,9 @@  discard block
 block discarded – undo
497 497
         $this->hdadosadic = $this->calculoEspacoVericalDadosAdicionais();
498 498
 
499 499
         //altura disponivel para os campos da DANFE
500
-        $hcabecalho    = 47;//para cabeçalho
501
-        $hdestinatario = 25;//para destinatario
502
-        $hduplicatas   = 12;//para cada grupo de 7 duplicatas
500
+        $hcabecalho    = 47; //para cabeçalho
501
+        $hdestinatario = 25; //para destinatario
502
+        $hduplicatas   = 12; //para cada grupo de 7 duplicatas
503 503
         if (isset($this->entrega)) {
504 504
             $hlocalentrega = 25;
505 505
         } else {
@@ -510,11 +510,11 @@  discard block
 block discarded – undo
510 510
         } else {
511 511
             $hlocalretirada = 0;
512 512
         }
513
-        $himposto    = 18;// para imposto
514
-        $htransporte = 25;// para transporte
515
-        $hissqn      = 11;// para issqn
516
-        $hfooter     = 5;// para rodape
517
-        $hCabecItens = 4;//cabeçalho dos itens
513
+        $himposto    = 18; // para imposto
514
+        $htransporte = 25; // para transporte
515
+        $hissqn      = 11; // para issqn
516
+        $hfooter     = 5; // para rodape
517
+        $hCabecItens = 4; //cabeçalho dos itens
518 518
         $hOCUPADA    = $hcabecalho
519 519
             + $hdestinatario
520 520
             + $hlocalentrega
@@ -537,10 +537,10 @@  discard block
 block discarded – undo
537 537
         $this->sizeExtraTextoFatura());*/
538 538
 
539 539
         if ($this->orientacao == 'P') {
540
-            $hDispo1 -= 24 * $this->qCanhoto;//para canhoto
541
-            $w       = $this->wPrint;
540
+            $hDispo1 -= 24 * $this->qCanhoto; //para canhoto
541
+            $w = $this->wPrint;
542 542
         } else {
543
-            $hcanhoto = $this->hPrint;//para canhoto
543
+            $hcanhoto = $this->hPrint; //para canhoto
544 544
             $w        = $this->wPrint - $this->wCanhoto;
545 545
         }
546 546
         //$hDispo1 += 14;
@@ -561,18 +561,18 @@  discard block
 block discarded – undo
561 561
             $prod = $itemProd->getElementsByTagName('prod')->item(0);
562 562
             $uCom = $prod->getElementsByTagName("uCom")->item(0)->nodeValue;
563 563
             $uTrib = $prod->getElementsByTagName("uTrib")->item(0);
564
-            if (! empty($uTrib) && strcmp($uCom, $uTrib->nodeValue) != 0) {
564
+            if (!empty($uTrib) && strcmp($uCom, $uTrib->nodeValue) != 0) {
565 565
                 $mostrarUnidadeTributavel = true;
566 566
             }
567 567
 
568 568
             $hUsado += $this->calculeHeight($itemProd, $mostrarUnidadeTributavel);
569 569
             if ($hUsado > $hDispo) {
570
-                $totPag ++;
570
+                $totPag++;
571 571
                 $hDispo = $hDispo2;
572 572
                 $hUsado = $hCabecItens;
573
-                $i --; // decrementa para readicionar o item que não coube nessa pagina na outra.
573
+                $i--; // decrementa para readicionar o item que não coube nessa pagina na outra.
574 574
             }
575
-            $i ++;
575
+            $i++;
576 576
         } //fim da soma das areas de itens usadas
577 577
         $qtdeItens = $i; //controle da quantidade de itens no DANFE
578 578
         //montagem da primeira página
@@ -604,7 +604,7 @@  discard block
 block discarded – undo
604 604
         $formaPag = [];
605 605
         if (isset($this->detPag) && $this->detPag->length > 0) {
606 606
             foreach ($this->detPag as $k => $d) {
607
-                $fPag            = ! empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
607
+                $fPag            = !empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
608 608
                     ? $this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue
609 609
                     : '0';
610 610
                 $formaPag[$fPag] = $fPag;
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
         }
649 649
 
650 650
         //loop para páginas seguintes
651
-        for ($n = 2; $n <= $totPag; $n ++) {
651
+        for ($n = 2; $n <= $totPag; $n++) {
652 652
             // fixa as margens
653 653
             $this->pdf->setMargins($this->margesq, $this->margsup);
654 654
             //adiciona nova página
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
             }
673 673
             //se estiver na última página e ainda restar itens para inserir, adiciona mais uma página
674 674
             if ($n == $totPag && $this->qtdeItensProc < $qtdeItens) {
675
-                $totPag ++;
675
+                $totPag++;
676 676
             }
677 677
         }
678 678
     }
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
         if ($startPos === false) {
702 702
             return $cdata;
703 703
         }
704
-        for ($x = $len; $x > 0; $x --) {
704
+        for ($x = $len; $x > 0; $x--) {
705 705
             if (substr($cdata, $x, 1) == '>') {
706 706
                 $endPos = $x;
707 707
                 break;
@@ -797,15 +797,15 @@  discard block
 block discarded – undo
797 797
         //grupo CADATA infCpl
798 798
         $t          = $dom->getElementsByTagName('transmissor')->item(0);
799 799
         $r          = $dom->getElementsByTagName('receptor')->item(0);
800
-        $versao     = ! empty($dom->getElementsByTagName('versao')->item(0)->nodeValue) ?
800
+        $versao     = !empty($dom->getElementsByTagName('versao')->item(0)->nodeValue) ?
801 801
             'Versao:' . $dom->getElementsByTagName('versao')->item(0)->nodeValue . ' ' : '';
802
-        $especieNF  = ! empty($dom->getElementsByTagName('especieNF')->item(0)->nodeValue) ?
802
+        $especieNF  = !empty($dom->getElementsByTagName('especieNF')->item(0)->nodeValue) ?
803 803
             'Especie:' . $dom->getElementsByTagName('especieNF')->item(0)->nodeValue . ' ' : '';
804
-        $fabEntrega = ! empty($dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue) ?
804
+        $fabEntrega = !empty($dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue) ?
805 805
             'Entrega:' . $dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue . ' ' : '';
806
-        $dca        = ! empty($dom->getElementsByTagName('dca')->item(0)->nodeValue) ?
806
+        $dca        = !empty($dom->getElementsByTagName('dca')->item(0)->nodeValue) ?
807 807
             'dca:' . $dom->getElementsByTagName('dca')->item(0)->nodeValue . ' ' : '';
808
-        $texto      .= "" . $versao . $especieNF . $fabEntrega . $dca;
808
+        $texto .= "" . $versao . $especieNF . $fabEntrega . $dca;
809 809
         if (isset($t)) {
810 810
             if ($t->hasAttributes()) {
811 811
                 $texto .= " Transmissor ";
@@ -848,7 +848,7 @@  discard block
 block discarded – undo
848 848
         } else {
849 849
             if ($this->getTagValue($this->ide, "tpAmb") == '2') {
850 850
                 $resp['status'] = false;
851
-                $resp['message'][] =  "NFe EMITIDA EM HOMOLOGAÇÃO";
851
+                $resp['message'][] = "NFe EMITIDA EM HOMOLOGAÇÃO";
852 852
             }
853 853
             $retEvento = $this->nfeProc->getElementsByTagName('retEvento')->item(0);
854 854
             $cStat = $this->getTagValue($this->nfeProc, "cStat");
@@ -869,7 +869,7 @@  discard block
 block discarded – undo
869 869
             } elseif (!empty($retEvento)) {
870 870
                 $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0);
871 871
                 $cStat = $this->getTagValue($infEvento, "cStat");
872
-                $tpEvento= $this->getTagValue($infEvento, "tpEvento");
872
+                $tpEvento = $this->getTagValue($infEvento, "tpEvento");
873 873
                 $dhEvento = date("d/m/Y H:i:s", $this->toTimestamp($this->getTagValue($infEvento, "dhRegEvento")));
874 874
                 $nProt = $this->getTagValue($infEvento, "nProt");
875 875
                 if ($tpEvento == '110111' &&
@@ -889,7 +889,7 @@  discard block
 block discarded – undo
889 889
 
890 890
     protected function notaDPEC()
891 891
     {
892
-        return ! empty($this->numdepec);
892
+        return !empty($this->numdepec);
893 893
     }
894 894
 
895 895
     /**
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
         //se for right separa 2/3 para os dados e o terço seguinte para o logo
939 939
         //se não houver logo centraliza dos dados do emitente
940 940
         // coloca o logo
941
-        if (! empty($this->logomarca)) {
941
+        if (!empty($this->logomarca)) {
942 942
             $logoInfo = getimagesize($this->logomarca);
943 943
             //largura da imagem em mm
944 944
             $logoWmm = ($logoInfo[0] / 72) * 25.4;
@@ -994,7 +994,7 @@  discard block
 block discarded – undo
994 994
             //endereço
995 995
             $y1     = $y1 + 5;
996 996
             $aFont  = ['font' => $this->fontePadrao, 'size' => 8, 'style' => ''];
997
-            $fone   = ! empty($this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue)
997
+            $fone   = !empty($this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue)
998 998
                 ? $this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue
999 999
                 : '';
1000 1000
             $lgr    = $this->getTagValue($this->enderEmit, "xLgr");
@@ -1013,8 +1013,8 @@  discard block
 block discarded – undo
1013 1013
 
1014 1014
         //####################################################################################
1015 1015
         //coluna central Danfe
1016
-        $x  += $w;
1017
-        $w  = round($maxW * 0.17, 0);//35;
1016
+        $x += $w;
1017
+        $w  = round($maxW * 0.17, 0); //35;
1018 1018
         $w2 = $w;
1019 1019
         $h  = 32;
1020 1020
         $this->pdf->textBox($x, $y, $w, $h);
@@ -1071,8 +1071,8 @@  discard block
 block discarded – undo
1071 1071
 
1072 1072
         //####################################################################################
1073 1073
         //coluna codigo de barras
1074
-        $x  += $w;
1075
-        $w  = ($maxW - $w1 - $w2);//85;
1074
+        $x += $w;
1075
+        $w  = ($maxW - $w1 - $w2); //85;
1076 1076
         $w3 = $w;
1077 1077
         $h  = 32;
1078 1078
         $this->pdf->textBox($x, $y, $w, $h);
@@ -1102,7 +1102,7 @@  discard block
 block discarded – undo
1102 1102
         } else {
1103 1103
             $cabecalhoProtoAutorizacao = 'PROTOCOLO DE AUTORIZAÇÃO DE USO';
1104 1104
         }
1105
-        if (($this->tpEmis == 2 || $this->tpEmis == 5) && ! $this->notaDpec()) {
1105
+        if (($this->tpEmis == 2 || $this->tpEmis == 5) && !$this->notaDpec()) {
1106 1106
             $cabecalhoProtoAutorizacao = "DADOS DA NF-E";
1107 1107
             $chaveContingencia         = $this->geraChaveAdicionalDeContingencia();
1108 1108
             $this->pdf->setFillColor(0, 0, 0);
@@ -1134,7 +1134,7 @@  discard block
 block discarded – undo
1134 1134
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1135 1135
         $w     = $w1 + $w2;
1136 1136
         $y     = $oldY;
1137
-        $oldY  += $h;
1137
+        $oldY += $h;
1138 1138
         $x     = $oldX;
1139 1139
         $h     = 7;
1140 1140
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1151,7 +1151,7 @@  discard block
 block discarded – undo
1151 1151
         // NOTA : DANFE sem protocolo deve existir somente no caso de contingência !!!
1152 1152
         // Além disso, existem várias NFes em contingência que eu recebo com protocolo de autorização.
1153 1153
         // Na minha opinião, deveríamos mostra-lo, mas o  manual  da NFe v4.01 diz outra coisa...
1154
-        if (($this->tpEmis == 2 || $this->tpEmis == 5) && ! $this->notaDpec()) {
1154
+        if (($this->tpEmis == 2 || $this->tpEmis == 5) && !$this->notaDpec()) {
1155 1155
             $aFont = ['font' => $this->fontePadrao, 'size' => 8, 'style' => 'B'];
1156 1156
             $texto = $this->formatField(
1157 1157
                 $chaveContingencia,
@@ -1165,7 +1165,7 @@  discard block
 block discarded – undo
1165 1165
                 $cStat = '';
1166 1166
             } else {
1167 1167
                 if (isset($this->nfeProc)) {
1168
-                    $texto  = ! empty($this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue)
1168
+                    $texto  = !empty($this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue)
1169 1169
                         ? $this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue
1170 1170
                         : '';
1171 1171
                     $tsHora = $this->toTimestamp(
@@ -1195,7 +1195,7 @@  discard block
 block discarded – undo
1195 1195
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1196 1196
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1197 1197
         //INSCRIÇÃO MUNICIPAL
1198
-        $x     += $w;
1198
+        $x += $w;
1199 1199
         $texto = 'INSCRIÇÃO MUNICIPAL';
1200 1200
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1201 1201
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1203,29 +1203,29 @@  discard block
 block discarded – undo
1203 1203
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1204 1204
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1205 1205
         //INSCRIÇÃO ESTADUAL DO SUBST. TRIBUT.
1206
-        $x     += $w;
1206
+        $x += $w;
1207 1207
         $texto = 'INSCRIÇÃO ESTADUAL DO SUBST. TRIBUT.';
1208 1208
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1209 1209
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1210
-        $texto = ! empty($this->emit->getElementsByTagName("IEST")->item(0)->nodeValue)
1210
+        $texto = !empty($this->emit->getElementsByTagName("IEST")->item(0)->nodeValue)
1211 1211
             ? $this->emit->getElementsByTagName("IEST")->item(0)->nodeValue
1212 1212
             : '';
1213 1213
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1214 1214
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1215 1215
         //CNPJ
1216
-        $x     += $w;
1216
+        $x += $w;
1217 1217
         $w     = ($maxW - (3 * $w));
1218 1218
         $texto = 'CNPJ';
1219 1219
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1220 1220
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1221 1221
         //Pegando valor do CPF/CNPJ
1222
-        if (! empty($this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1222
+        if (!empty($this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1223 1223
             $texto = $this->formatField(
1224 1224
                 $this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1225 1225
                 "###.###.###/####-##"
1226 1226
             );
1227 1227
         } else {
1228
-            $texto = ! empty($this->emit->getElementsByTagName("CPF")->item(0)->nodeValue)
1228
+            $texto = !empty($this->emit->getElementsByTagName("CPF")->item(0)->nodeValue)
1229 1229
                 ? $this->formatField(
1230 1230
                     $this->emit->getElementsByTagName("CPF")->item(0)->nodeValue,
1231 1231
                     "###.###.###-##"
@@ -1244,7 +1244,7 @@  discard block
 block discarded – undo
1244 1244
             $n = count($resp['message']);
1245 1245
             $alttot = $n * 15;
1246 1246
             $x = 10;
1247
-            $y = $this->hPrint/2 - $alttot/2;
1247
+            $y = $this->hPrint / 2 - $alttot / 2;
1248 1248
             $h = 15;
1249 1249
             $w = $maxW - (2 * $x);
1250 1250
             $this->pdf->settextcolor(90, 90, 90);
@@ -1317,7 +1317,7 @@  discard block
 block discarded – undo
1317 1317
         //NOME / RAZÃO SOCIAL
1318 1318
         $w     = round($maxW * 0.61, 0);
1319 1319
         $w1    = $w;
1320
-        $y     += 3;
1320
+        $y += 3;
1321 1321
         $texto = 'NOME / RAZÃO SOCIAL';
1322 1322
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1323 1323
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1329,20 +1329,20 @@  discard block
 block discarded – undo
1329 1329
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, '');
1330 1330
         }
1331 1331
         //CNPJ / CPF
1332
-        $x     += $w;
1332
+        $x += $w;
1333 1333
         $w     = round($maxW * 0.23, 0);
1334 1334
         $w2    = $w;
1335 1335
         $texto = 'CNPJ / CPF';
1336 1336
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1337 1337
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1338 1338
         //Pegando valor do CPF/CNPJ
1339
-        if (! empty($this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1339
+        if (!empty($this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1340 1340
             $texto = $this->formatField(
1341 1341
                 $this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1342 1342
                 "###.###.###/####-##"
1343 1343
             );
1344 1344
         } else {
1345
-            $texto = ! empty($this->dest->getElementsByTagName("CPF")->item(0)->nodeValue)
1345
+            $texto = !empty($this->dest->getElementsByTagName("CPF")->item(0)->nodeValue)
1346 1346
                 ? $this->formatField(
1347 1347
                     $this->dest->getElementsByTagName("CPF")->item(0)->nodeValue,
1348 1348
                     "###.###.###-##"
@@ -1352,17 +1352,17 @@  discard block
 block discarded – undo
1352 1352
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1353 1353
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1354 1354
         //DATA DA EMISSÃO
1355
-        $x     += $w;
1355
+        $x += $w;
1356 1356
         $w     = $maxW - ($w1 + $w2);
1357 1357
         $wx    = $w;
1358 1358
         $texto = 'DATA DA EMISSÃO';
1359 1359
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1360 1360
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1361
-        $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue)
1361
+        $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue)
1362 1362
             ? $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue
1363 1363
             : '';
1364 1364
         if ($dEmi == '') {
1365
-            $dEmi  = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue)
1365
+            $dEmi  = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue)
1366 1366
                 ? $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue
1367 1367
                 : '';
1368 1368
             $aDemi = explode('T', $dEmi);
@@ -1378,7 +1378,7 @@  discard block
 block discarded – undo
1378 1378
         //ENDEREÇO
1379 1379
         $w     = round($maxW * 0.47, 0);
1380 1380
         $w1    = $w;
1381
-        $y     += $h;
1381
+        $y += $h;
1382 1382
         $x     = $oldX;
1383 1383
         $texto = 'ENDEREÇO';
1384 1384
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1390,7 +1390,7 @@  discard block
 block discarded – undo
1390 1390
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1391 1391
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true);
1392 1392
         //BAIRRO / DISTRITO
1393
-        $x     += $w;
1393
+        $x += $w;
1394 1394
         $w     = round($maxW * 0.21, 0);
1395 1395
         $w2    = $w;
1396 1396
         $texto = 'BAIRRO / DISTRITO';
@@ -1400,29 +1400,29 @@  discard block
 block discarded – undo
1400 1400
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1401 1401
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1402 1402
         //CEP
1403
-        $x     += $w;
1403
+        $x += $w;
1404 1404
         $w     = $maxW - $w1 - $w2 - $wx;
1405 1405
         $w2    = $w;
1406 1406
         $texto = 'CEP';
1407 1407
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1408 1408
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1409
-        $texto = ! empty($this->dest->getElementsByTagName("CEP")->item(0)->nodeValue)
1409
+        $texto = !empty($this->dest->getElementsByTagName("CEP")->item(0)->nodeValue)
1410 1410
             ? $this->dest->getElementsByTagName("CEP")->item(0)->nodeValue
1411 1411
             : '';
1412 1412
         $texto = $this->formatField($texto, "#####-###");
1413 1413
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1414 1414
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1415 1415
         //DATA DA SAÍDA
1416
-        $x     += $w;
1416
+        $x += $w;
1417 1417
         $w     = $wx;
1418 1418
         $texto = 'DATA DA SAÍDA/ENTRADA';
1419 1419
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1420 1420
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1421
-        $dSaiEnt = ! empty($this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue)
1421
+        $dSaiEnt = !empty($this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue)
1422 1422
             ? $this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue
1423 1423
             : '';
1424 1424
         if ($dSaiEnt == '') {
1425
-            $dSaiEnt  = ! empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1425
+            $dSaiEnt  = !empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1426 1426
                 ? $this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue
1427 1427
                 : '';
1428 1428
             $aDsaient = explode('T', $dSaiEnt);
@@ -1433,7 +1433,7 @@  discard block
 block discarded – undo
1433 1433
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1434 1434
         //MUNICÍPIO
1435 1435
         $w     = $w1;
1436
-        $y     += $h;
1436
+        $y += $h;
1437 1437
         $x     = $oldX;
1438 1438
         $texto = 'MUNICÍPIO';
1439 1439
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1447,7 +1447,7 @@  discard block
 block discarded – undo
1447 1447
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1448 1448
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
1449 1449
         //UF
1450
-        $x     += $w;
1450
+        $x += $w;
1451 1451
         $w     = 8;
1452 1452
         $texto = 'UF';
1453 1453
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1456,19 +1456,19 @@  discard block
 block discarded – undo
1456 1456
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1457 1457
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1458 1458
         //FONE / FAX
1459
-        $x     += $w;
1459
+        $x += $w;
1460 1460
         $w     = round(($maxW - $w1 - $wx - 8) / 2, 0);
1461 1461
         $w3    = $w;
1462 1462
         $texto = 'FONE / FAX';
1463 1463
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1464 1464
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1465
-        $texto = ! empty($this->dest->getElementsByTagName("fone")->item(0)->nodeValue)
1465
+        $texto = !empty($this->dest->getElementsByTagName("fone")->item(0)->nodeValue)
1466 1466
             ? $this->dest->getElementsByTagName("fone")->item(0)->nodeValue
1467 1467
             : '';
1468 1468
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1469 1469
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1470 1470
         //INSCRIÇÃO ESTADUAL
1471
-        $x     += $w;
1471
+        $x += $w;
1472 1472
         $w     = $maxW - $w1 - $wx - 8 - $w3;
1473 1473
         $texto = 'INSCRIÇÃO ESTADUAL';
1474 1474
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1478,16 +1478,16 @@  discard block
 block discarded – undo
1478 1478
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1479 1479
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1480 1480
         //HORA DA SAÍDA
1481
-        $x     += $w;
1481
+        $x += $w;
1482 1482
         $w     = $wx;
1483 1483
         $texto = 'HORA DA SAÍDA/ENTRADA';
1484 1484
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1485 1485
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1486
-        $hSaiEnt = ! empty($this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue)
1486
+        $hSaiEnt = !empty($this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue)
1487 1487
             ? $this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue
1488 1488
             : '';
1489 1489
         if ($hSaiEnt == '') {
1490
-            $dhSaiEnt   = ! empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1490
+            $dhSaiEnt   = !empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1491 1491
                 ? $this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue
1492 1492
                 : '';
1493 1493
             $tsDhSaiEnt = $this->toTimestamp($dhSaiEnt);
@@ -1531,7 +1531,7 @@  discard block
 block discarded – undo
1531 1531
         //NOME / RAZÃO SOCIAL
1532 1532
         $w     = round($maxW * 0.61, 0);
1533 1533
         $w1    = $w;
1534
-        $y     += 3;
1534
+        $y += 3;
1535 1535
         $texto = 'NOME / RAZÃO SOCIAL';
1536 1536
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1537 1537
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1546,20 +1546,20 @@  discard block
 block discarded – undo
1546 1546
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, '');
1547 1547
         }
1548 1548
         //CNPJ / CPF
1549
-        $x     += $w;
1549
+        $x += $w;
1550 1550
         $w     = round($maxW * 0.23, 0);
1551 1551
         $w2    = $w;
1552 1552
         $texto = 'CNPJ / CPF';
1553 1553
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1554 1554
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1555 1555
         //Pegando valor do CPF/CNPJ
1556
-        if (! empty($this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1556
+        if (!empty($this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1557 1557
             $texto = $this->formatField(
1558 1558
                 $this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1559 1559
                 "###.###.###/####-##"
1560 1560
             );
1561 1561
         } else {
1562
-            $texto = ! empty($this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1562
+            $texto = !empty($this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1563 1563
                 $this->formatField(
1564 1564
                     $this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue,
1565 1565
                     "###.###.###-##"
@@ -1568,7 +1568,7 @@  discard block
 block discarded – undo
1568 1568
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1569 1569
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1570 1570
         //INSCRIÇÃO ESTADUAL
1571
-        $x     += $w;
1571
+        $x += $w;
1572 1572
         $w     = $maxW - ($w1 + $w2);
1573 1573
         $wx    = $w;
1574 1574
         $texto = 'INSCRIÇÃO ESTADUAL';
@@ -1587,7 +1587,7 @@  discard block
 block discarded – undo
1587 1587
         //ENDEREÇO
1588 1588
         $w     = round($maxW * 0.355, 0) + $wx;
1589 1589
         $w1    = $w;
1590
-        $y     += $h;
1590
+        $y += $h;
1591 1591
         $x     = $oldX;
1592 1592
         $texto = 'ENDEREÇO';
1593 1593
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1598,7 +1598,7 @@  discard block
 block discarded – undo
1598 1598
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1599 1599
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true);
1600 1600
         //BAIRRO / DISTRITO
1601
-        $x     += $w;
1601
+        $x += $w;
1602 1602
         $w     = round($maxW * 0.335, 0);
1603 1603
         $w2    = $w;
1604 1604
         $texto = 'BAIRRO / DISTRITO';
@@ -1608,12 +1608,12 @@  discard block
 block discarded – undo
1608 1608
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1609 1609
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1610 1610
         //CEP
1611
-        $x     += $w;
1611
+        $x += $w;
1612 1612
         $w     = $maxW - ($w1 + $w2);
1613 1613
         $texto = 'CEP';
1614 1614
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1615 1615
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1616
-        $texto = ! empty($this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1616
+        $texto = !empty($this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1617 1617
             $this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue : '';
1618 1618
         $texto = $this->formatField($texto, "#####-###");
1619 1619
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
@@ -1621,7 +1621,7 @@  discard block
 block discarded – undo
1621 1621
         //MUNICÍPIO
1622 1622
         $w     = round($maxW * 0.805, 0);
1623 1623
         $w1    = $w;
1624
-        $y     += $h;
1624
+        $y += $h;
1625 1625
         $x     = $oldX;
1626 1626
         $texto = 'MUNICÍPIO';
1627 1627
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1633,7 +1633,7 @@  discard block
 block discarded – undo
1633 1633
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1634 1634
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
1635 1635
         //UF
1636
-        $x     += $w;
1636
+        $x += $w;
1637 1637
         $w     = 8;
1638 1638
         $texto = 'UF';
1639 1639
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1642,12 +1642,12 @@  discard block
 block discarded – undo
1642 1642
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1643 1643
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1644 1644
         //FONE / FAX
1645
-        $x     += $w;
1645
+        $x += $w;
1646 1646
         $w     = $maxW - $w - $w1;
1647 1647
         $texto = 'FONE / FAX';
1648 1648
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1649 1649
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1650
-        $texto = ! empty($this->entrega->getElementsByTagName("fone")->item(0)->nodeValue) ?
1650
+        $texto = !empty($this->entrega->getElementsByTagName("fone")->item(0)->nodeValue) ?
1651 1651
             $this->entrega->getElementsByTagName("fone")->item(0)->nodeValue : '';
1652 1652
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1653 1653
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
@@ -1684,7 +1684,7 @@  discard block
 block discarded – undo
1684 1684
         //NOME / RAZÃO SOCIAL
1685 1685
         $w     = round($maxW * 0.61, 0);
1686 1686
         $w1    = $w;
1687
-        $y     += 3;
1687
+        $y += 3;
1688 1688
         $texto = 'NOME / RAZÃO SOCIAL';
1689 1689
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1690 1690
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1699,20 +1699,20 @@  discard block
 block discarded – undo
1699 1699
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, '');
1700 1700
         }
1701 1701
         //CNPJ / CPF
1702
-        $x     += $w;
1702
+        $x += $w;
1703 1703
         $w     = round($maxW * 0.23, 0);
1704 1704
         $w2    = $w;
1705 1705
         $texto = 'CNPJ / CPF';
1706 1706
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1707 1707
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1708 1708
         //Pegando valor do CPF/CNPJ
1709
-        if (! empty($this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1709
+        if (!empty($this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1710 1710
             $texto = $this->formatField(
1711 1711
                 $this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1712 1712
                 "###.###.###/####-##"
1713 1713
             );
1714 1714
         } else {
1715
-            $texto = ! empty($this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1715
+            $texto = !empty($this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1716 1716
                 $this->formatField(
1717 1717
                     $this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue,
1718 1718
                     "###.###.###-##"
@@ -1721,7 +1721,7 @@  discard block
 block discarded – undo
1721 1721
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1722 1722
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1723 1723
         //INSCRIÇÃO ESTADUAL
1724
-        $x     += $w;
1724
+        $x += $w;
1725 1725
         $w     = $maxW - ($w1 + $w2);
1726 1726
         $wx    = $w;
1727 1727
         $texto = 'INSCRIÇÃO ESTADUAL';
@@ -1740,7 +1740,7 @@  discard block
 block discarded – undo
1740 1740
         //ENDEREÇO
1741 1741
         $w     = round($maxW * 0.355, 0) + $wx;
1742 1742
         $w1    = $w;
1743
-        $y     += $h;
1743
+        $y += $h;
1744 1744
         $x     = $oldX;
1745 1745
         $texto = 'ENDEREÇO';
1746 1746
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1751,7 +1751,7 @@  discard block
 block discarded – undo
1751 1751
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1752 1752
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true);
1753 1753
         //BAIRRO / DISTRITO
1754
-        $x     += $w;
1754
+        $x += $w;
1755 1755
         $w     = round($maxW * 0.335, 0);
1756 1756
         $w2    = $w;
1757 1757
         $texto = 'BAIRRO / DISTRITO';
@@ -1761,12 +1761,12 @@  discard block
 block discarded – undo
1761 1761
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1762 1762
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1763 1763
         //CEP
1764
-        $x     += $w;
1764
+        $x += $w;
1765 1765
         $w     = $maxW - ($w1 + $w2);
1766 1766
         $texto = 'CEP';
1767 1767
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1768 1768
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1769
-        $texto = ! empty($this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1769
+        $texto = !empty($this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1770 1770
             $this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue : '';
1771 1771
         $texto = $this->formatField($texto, "#####-###");
1772 1772
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
@@ -1774,7 +1774,7 @@  discard block
 block discarded – undo
1774 1774
         //MUNICÍPIO
1775 1775
         $w     = round($maxW * 0.805, 0);
1776 1776
         $w1    = $w;
1777
-        $y     += $h;
1777
+        $y += $h;
1778 1778
         $x     = $oldX;
1779 1779
         $texto = 'MUNICÍPIO';
1780 1780
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1786,7 +1786,7 @@  discard block
 block discarded – undo
1786 1786
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1787 1787
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
1788 1788
         //UF
1789
-        $x     += $w;
1789
+        $x += $w;
1790 1790
         $w     = 8;
1791 1791
         $texto = 'UF';
1792 1792
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1795,12 +1795,12 @@  discard block
 block discarded – undo
1795 1795
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1796 1796
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1797 1797
         //FONE / FAX
1798
-        $x     += $w;
1798
+        $x += $w;
1799 1799
         $w     = $maxW - $w - $w1;
1800 1800
         $texto = 'FONE / FAX';
1801 1801
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1802 1802
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1803
-        $texto = ! empty($this->retirada->getElementsByTagName("fone")->item(0)->nodeValue) ?
1803
+        $texto = !empty($this->retirada->getElementsByTagName("fone")->item(0)->nodeValue) ?
1804 1804
             $this->retirada->getElementsByTagName("fone")->item(0)->nodeValue : '';
1805 1805
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1806 1806
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
@@ -1820,7 +1820,7 @@  discard block
 block discarded – undo
1820 1820
         if (isset($this->cobr)) {
1821 1821
             $fat = $this->cobr->getElementsByTagName("fat")->item(0);
1822 1822
             if (isset($fat)) {
1823
-                if (! empty($this->getTagValue($this->ide, "indPag"))) {
1823
+                if (!empty($this->getTagValue($this->ide, "indPag"))) {
1824 1824
                     $textoIndPag = "";
1825 1825
                     $indPag      = $this->getTagValue($this->ide, "indPag");
1826 1826
                     if ($indPag === "0") {
@@ -1895,7 +1895,7 @@  discard block
 block discarded – undo
1895 1895
             $h     = 8;
1896 1896
             $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B'];
1897 1897
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1898
-            $y       += 3;
1898
+            $y += 3;
1899 1899
             $dups    = "";
1900 1900
             $dupcont = 0;
1901 1901
             $nFat    = $this->dup->length;
@@ -1929,13 +1929,13 @@  discard block
 block discarded – undo
1929 1929
             }
1930 1930
             $increm = 1;
1931 1931
             foreach ($this->dup as $k => $d) {
1932
-                $nDup  = ! empty($this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue)
1932
+                $nDup  = !empty($this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue)
1933 1933
                     ? $this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue
1934 1934
                     : '';
1935
-                $dDup  = ! empty($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue)
1935
+                $dDup  = !empty($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue)
1936 1936
                     ? $this->ymdTodmy($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue)
1937 1937
                     : '';
1938
-                $vDup  = ! empty($this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue)
1938
+                $vDup  = !empty($this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue)
1939 1939
                     ? 'R$ ' . number_format(
1940 1940
                         $this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue,
1941 1941
                         2,
@@ -1982,7 +1982,7 @@  discard block
 block discarded – undo
1982 1982
             }
1983 1983
             if ($dupcont == 0) {
1984 1984
                 $y -= 9;
1985
-                $linha --;
1985
+                $linha--;
1986 1986
             }
1987 1987
 
1988 1988
             return ($y + $h);
@@ -2022,7 +2022,7 @@  discard block
 block discarded – undo
2022 2022
             $h     = 8;
2023 2023
             $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B'];
2024 2024
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
2025
-            $y       += 3;
2025
+            $y += 3;
2026 2026
             $dups    = "";
2027 2027
             $dupcont = 0;
2028 2028
             if ($this->orientacao == 'P') {
@@ -2051,7 +2051,7 @@  discard block
 block discarded – undo
2051 2051
                 '90' => 'Sem pagamento',
2052 2052
                 '99' => 'Outros'
2053 2053
             ];
2054
-            $bandeira       = [
2054
+            $bandeira = [
2055 2055
                 '01' => 'Visa',
2056 2056
                 '02' => 'Mastercard',
2057 2057
                 '03' => 'American',
@@ -2064,10 +2064,10 @@  discard block
 block discarded – undo
2064 2064
                 '99' => 'Outros'
2065 2065
             ];
2066 2066
             foreach ($this->detPag as $k => $d) {
2067
-                $fPag  = ! empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
2067
+                $fPag  = !empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
2068 2068
                     ? $this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue
2069 2069
                     : '0';
2070
-                $vPag  = ! empty($this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue)
2070
+                $vPag  = !empty($this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue)
2071 2071
                     ? 'R$ ' . number_format(
2072 2072
                         $this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue,
2073 2073
                         2,
@@ -2110,7 +2110,7 @@  discard block
 block discarded – undo
2110 2110
             }
2111 2111
             if ($dupcont == 0) {
2112 2112
                 $y -= 9;
2113
-                $linha --;
2113
+                $linha--;
2114 2114
             }
2115 2115
 
2116 2116
             return ($y + $h);
@@ -2142,7 +2142,7 @@  discard block
 block discarded – undo
2142 2142
         $the_field    = $this->ICMSTot->getElementsByTagName($campoImposto)->item(0);
2143 2143
         if (isset($the_field)) {
2144 2144
             $the_value = $the_field->nodeValue;
2145
-            if (! empty($the_value)) {
2145
+            if (!empty($the_value)) {
2146 2146
                 $valorImposto = number_format($the_value, 2, ",", ".");
2147 2147
             }
2148 2148
         }
@@ -2171,10 +2171,10 @@  discard block
 block discarded – undo
2171 2171
         $x_inicial = $x;
2172 2172
         //#####################################################################
2173 2173
         $campos_por_linha = 9;
2174
-        if (! $this->exibirPIS) {
2175
-            $campos_por_linha --;
2174
+        if (!$this->exibirPIS) {
2175
+            $campos_por_linha--;
2176 2176
         }
2177
-        if (! $this->exibirIcmsInterestadual) {
2177
+        if (!$this->exibirIcmsInterestadual) {
2178 2178
             $campos_por_linha -= 2;
2179 2179
         }
2180 2180
 
@@ -2261,12 +2261,12 @@  discard block
 block discarded – undo
2261 2261
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
2262 2262
         //NOME / RAZÃO SOCIAL
2263 2263
         $w1    = $maxW * 0.29;
2264
-        $y     += 3;
2264
+        $y += 3;
2265 2265
         $texto = 'NOME / RAZÃO SOCIAL';
2266 2266
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2267 2267
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, '');
2268 2268
         if (isset($this->transporta)) {
2269
-            $texto = ! empty($this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue)
2269
+            $texto = !empty($this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue)
2270 2270
                 ? $this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue
2271 2271
                 : '';
2272 2272
         } else {
@@ -2275,12 +2275,12 @@  discard block
 block discarded – undo
2275 2275
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2276 2276
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'L', 0, '');
2277 2277
         //FRETE POR CONTA
2278
-        $x     += $w1;
2278
+        $x += $w1;
2279 2279
         $w2    = $maxW * 0.15;
2280 2280
         $texto = 'FRETE';
2281 2281
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2282 2282
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2283
-        $tipoFrete = ! empty($this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue)
2283
+        $tipoFrete = !empty($this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue)
2284 2284
             ? $this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue
2285 2285
             : '0';
2286 2286
         switch ($tipoFrete) {
@@ -2306,12 +2306,12 @@  discard block
 block discarded – undo
2306 2306
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2307 2307
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'C', 'C', 1, '');
2308 2308
         //CÓDIGO ANTT
2309
-        $x     += $w2;
2309
+        $x += $w2;
2310 2310
         $texto = 'CÓDIGO ANTT';
2311 2311
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2312 2312
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2313 2313
         if (isset($this->veicTransp)) {
2314
-            $texto = ! empty($this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue)
2314
+            $texto = !empty($this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue)
2315 2315
                 ? $this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue
2316 2316
                 : '';
2317 2317
         } else {
@@ -2320,16 +2320,16 @@  discard block
 block discarded – undo
2320 2320
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2321 2321
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2322 2322
         //PLACA DO VEÍC
2323
-        $x     += $w2;
2323
+        $x += $w2;
2324 2324
         $texto = 'PLACA DO VEÍCULO';
2325 2325
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2326 2326
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2327 2327
         if (isset($this->veicTransp)) {
2328
-            $texto = ! empty($this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue)
2328
+            $texto = !empty($this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue)
2329 2329
                 ? $this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue
2330 2330
                 : '';
2331 2331
         } elseif (isset($this->reboque)) {
2332
-            $texto = ! empty($this->reboque->getElementsByTagName("placa")->item(0)->nodeValue)
2332
+            $texto = !empty($this->reboque->getElementsByTagName("placa")->item(0)->nodeValue)
2333 2333
                 ? $this->reboque->getElementsByTagName("placa")->item(0)->nodeValue
2334 2334
                 : '';
2335 2335
         } else {
@@ -2338,17 +2338,17 @@  discard block
 block discarded – undo
2338 2338
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2339 2339
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2340 2340
         //UF
2341
-        $x     += $w2;
2341
+        $x += $w2;
2342 2342
         $w3    = round($maxW * 0.04, 0);
2343 2343
         $texto = 'UF';
2344 2344
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2345 2345
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'L', 1, '');
2346 2346
         if (isset($this->veicTransp)) {
2347
-            $texto = ! empty($this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue)
2347
+            $texto = !empty($this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue)
2348 2348
                 ? $this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue
2349 2349
                 : '';
2350 2350
         } elseif (isset($this->reboque)) {
2351
-            $texto = ! empty($this->reboque->getElementsByTagName("UF")->item(0)->nodeValue)
2351
+            $texto = !empty($this->reboque->getElementsByTagName("UF")->item(0)->nodeValue)
2352 2352
                 ? $this->reboque->getElementsByTagName("UF")->item(0)->nodeValue
2353 2353
                 : '';
2354 2354
         } else {
@@ -2357,20 +2357,20 @@  discard block
 block discarded – undo
2357 2357
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2358 2358
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'C', 0, '');
2359 2359
         //CNPJ / CPF
2360
-        $x     += $w3;
2360
+        $x += $w3;
2361 2361
         $w     = $maxW - ($w1 + 3 * $w2 + $w3);
2362 2362
         $texto = 'CNPJ / CPF';
2363 2363
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2364 2364
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
2365 2365
         if (isset($this->transporta)) {
2366
-            $texto = ! empty($this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue)
2366
+            $texto = !empty($this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue)
2367 2367
                 ? $this->formatField(
2368 2368
                     $this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue,
2369 2369
                     "##.###.###/####-##"
2370 2370
                 )
2371 2371
                 : '';
2372 2372
             if ($texto == '') {
2373
-                $texto = ! empty($this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue)
2373
+                $texto = !empty($this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue)
2374 2374
                     ? $this->formatField(
2375 2375
                         $this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue,
2376 2376
                         "###.###.###-##"
@@ -2384,7 +2384,7 @@  discard block
 block discarded – undo
2384 2384
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
2385 2385
         //#####################################################################
2386 2386
         //ENDEREÇO
2387
-        $y     += $h;
2387
+        $y += $h;
2388 2388
         $x     = $oldX;
2389 2389
         $h     = 7;
2390 2390
         $w1    = $maxW * 0.44;
@@ -2392,7 +2392,7 @@  discard block
 block discarded – undo
2392 2392
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2393 2393
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, '');
2394 2394
         if (isset($this->transporta)) {
2395
-            $texto = ! empty($this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue)
2395
+            $texto = !empty($this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue)
2396 2396
                 ? $this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue
2397 2397
                 : '';
2398 2398
         } else {
@@ -2401,13 +2401,13 @@  discard block
 block discarded – undo
2401 2401
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2402 2402
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'L', 0, '');
2403 2403
         //MUNICÍPIO
2404
-        $x     += $w1;
2404
+        $x += $w1;
2405 2405
         $w2    = round($maxW * 0.30, 0);
2406 2406
         $texto = 'MUNICÍPIO';
2407 2407
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2408 2408
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2409 2409
         if (isset($this->transporta)) {
2410
-            $texto = ! empty($this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue)
2410
+            $texto = !empty($this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue)
2411 2411
                 ? $this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue
2412 2412
                 : '';
2413 2413
         } else {
@@ -2416,13 +2416,13 @@  discard block
 block discarded – undo
2416 2416
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2417 2417
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2418 2418
         //UF
2419
-        $x     += $w2;
2419
+        $x += $w2;
2420 2420
         $w3    = round($maxW * 0.04, 0);
2421 2421
         $texto = 'UF';
2422 2422
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2423 2423
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'L', 1, '');
2424 2424
         if (isset($this->transporta)) {
2425
-            $texto = ! empty($this->transporta->getElementsByTagName("UF")->item(0)->nodeValue)
2425
+            $texto = !empty($this->transporta->getElementsByTagName("UF")->item(0)->nodeValue)
2426 2426
                 ? $this->transporta->getElementsByTagName("UF")->item(0)->nodeValue
2427 2427
                 : '';
2428 2428
         } else {
@@ -2431,14 +2431,14 @@  discard block
 block discarded – undo
2431 2431
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2432 2432
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'C', 0, '');
2433 2433
         //INSCRIÇÃO ESTADUAL
2434
-        $x     += $w3;
2434
+        $x += $w3;
2435 2435
         $w     = $maxW - ($w1 + $w2 + $w3);
2436 2436
         $texto = 'INSCRIÇÃO ESTADUAL';
2437 2437
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2438 2438
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
2439 2439
         $texto = '';
2440 2440
         if (isset($this->transporta)) {
2441
-            if (! empty($this->transporta->getElementsByTagName("IE")->item(0)->nodeValue)) {
2441
+            if (!empty($this->transporta->getElementsByTagName("IE")->item(0)->nodeValue)) {
2442 2442
                 $texto = $this->transporta->getElementsByTagName("IE")->item(0)->nodeValue;
2443 2443
             }
2444 2444
         }
@@ -2454,13 +2454,13 @@  discard block
 block discarded – undo
2454 2454
         $pesoBruto   = 0;
2455 2455
         $pesoLiquido = 0;
2456 2456
         foreach ($volumes as $volume) {
2457
-            $quantidade  += ! empty($volume->getElementsByTagName("qVol")->item(0)->nodeValue) ?
2457
+            $quantidade  += !empty($volume->getElementsByTagName("qVol")->item(0)->nodeValue) ?
2458 2458
                 $volume->getElementsByTagName("qVol")->item(0)->nodeValue : 0;
2459
-            $pesoBruto   += ! empty($volume->getElementsByTagName("pesoB")->item(0)->nodeValue) ?
2459
+            $pesoBruto   += !empty($volume->getElementsByTagName("pesoB")->item(0)->nodeValue) ?
2460 2460
                 $volume->getElementsByTagName("pesoB")->item(0)->nodeValue : 0;
2461
-            $pesoLiquido += ! empty($volume->getElementsByTagName("pesoL")->item(0)->nodeValue) ?
2461
+            $pesoLiquido += !empty($volume->getElementsByTagName("pesoL")->item(0)->nodeValue) ?
2462 2462
                 $volume->getElementsByTagName("pesoL")->item(0)->nodeValue : 0;
2463
-            $texto       = ! empty($this->transp->getElementsByTagName("esp")->item(0)->nodeValue) ?
2463
+            $texto = !empty($this->transp->getElementsByTagName("esp")->item(0)->nodeValue) ?
2464 2464
                 $this->transp->getElementsByTagName("esp")->item(0)->nodeValue : '';
2465 2465
             if ($texto != $especie && $especie != '') {
2466 2466
                 //tem várias especies
@@ -2468,7 +2468,7 @@  discard block
 block discarded – undo
2468 2468
             } else {
2469 2469
                 $especie = $texto;
2470 2470
             }
2471
-            $texto = ! empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue)
2471
+            $texto = !empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue)
2472 2472
                 ? $this->transp->getElementsByTagName("marca")->item(0)->nodeValue
2473 2473
                 : '';
2474 2474
             if ($texto != $marca && $marca != '') {
@@ -2477,7 +2477,7 @@  discard block
 block discarded – undo
2477 2477
             } else {
2478 2478
                 $marca = $texto;
2479 2479
             }
2480
-            $texto = ! empty($this->transp->getElementsByTagName("nVol")->item(0)->nodeValue)
2480
+            $texto = !empty($this->transp->getElementsByTagName("nVol")->item(0)->nodeValue)
2481 2481
                 ? $this->transp->getElementsByTagName("nVol")->item(0)->nodeValue
2482 2482
                 : '';
2483 2483
             if ($texto != $numero && $numero != '') {
@@ -2490,20 +2490,20 @@  discard block
 block discarded – undo
2490 2490
 
2491 2491
         //#####################################################################
2492 2492
         //QUANTIDADE
2493
-        $y     += $h;
2493
+        $y += $h;
2494 2494
         $x     = $oldX;
2495 2495
         $h     = 7;
2496 2496
         $w1    = round($maxW * 0.10, 0);
2497 2497
         $texto = 'QUANTIDADE';
2498 2498
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2499 2499
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, '');
2500
-        if (! empty($quantidade)) {
2500
+        if (!empty($quantidade)) {
2501 2501
             $texto = $quantidade;
2502 2502
             $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2503 2503
             $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'C', 0, '');
2504 2504
         }
2505 2505
         //ESPÉCIE
2506
-        $x     += $w1;
2506
+        $x += $w1;
2507 2507
         $w2    = round($maxW * 0.17, 0);
2508 2508
         $texto = 'ESPÉCIE';
2509 2509
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -2512,16 +2512,16 @@  discard block
 block discarded – undo
2512 2512
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2513 2513
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2514 2514
         //MARCA
2515
-        $x     += $w2;
2515
+        $x += $w2;
2516 2516
         $texto = 'MARCA';
2517 2517
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2518 2518
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2519
-        $texto = ! empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) ?
2519
+        $texto = !empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) ?
2520 2520
             $this->transp->getElementsByTagName("marca")->item(0)->nodeValue : '';
2521 2521
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2522 2522
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2523 2523
         //NUMERAÇÃO
2524
-        $x     += $w2;
2524
+        $x += $w2;
2525 2525
         $texto = 'NUMERAÇÃO';
2526 2526
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2527 2527
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -2529,7 +2529,7 @@  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
         //PESO BRUTO
2532
-        $x     += $w2;
2532
+        $x += $w2;
2533 2533
         $w3    = round($maxW * 0.20, 0);
2534 2534
         $texto = 'PESO BRUTO';
2535 2535
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -2542,7 +2542,7 @@  discard block
 block discarded – undo
2542 2542
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2543 2543
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'R', 0, '');
2544 2544
         //PESO LÍQUIDO
2545
-        $x     += $w3;
2545
+        $x += $w3;
2546 2546
         $w     = $maxW - ($w1 + 3 * $w2 + $w3);
2547 2547
         $texto = 'PESO LÍQUIDO';
2548 2548
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -2562,11 +2562,11 @@  discard block
 block discarded – undo
2562 2562
     protected function descricaoProdutoHelper($origem, $campo, $formato)
2563 2563
     {
2564 2564
         $valor_original = $origem->getElementsByTagName($campo)->item(0);
2565
-        if (! isset($valor_original)) {
2565
+        if (!isset($valor_original)) {
2566 2566
             return "";
2567 2567
         }
2568 2568
         $valor_original = $valor_original->nodeValue;
2569
-        $valor          = ! empty($valor_original) ? number_format($valor_original, 2, ",", ".") : '';
2569
+        $valor          = !empty($valor_original) ? number_format($valor_original, 2, ",", ".") : '';
2570 2570
 
2571 2571
         if ($valor != "") {
2572 2572
             return sprintf($formato, $valor);
@@ -2592,7 +2592,7 @@  discard block
 block discarded – undo
2592 2592
         $ICMSUFDest = $itemProd->getElementsByTagName("ICMSUFDest")->item(0);
2593 2593
         $impostos   = '';
2594 2594
 
2595
-        if (! empty($ICMS)) {
2595
+        if (!empty($ICMS)) {
2596 2596
             $impostos .= $this->descricaoProdutoHelper($ICMS, "vBCFCP", " BcFcp=%s");
2597 2597
             $impostos .= $this->descricaoProdutoHelper($ICMS, "pFCP", " pFcp=%s%%");
2598 2598
             $impostos .= $this->descricaoProdutoHelper($ICMS, "vFCP", " vFcp=%s");
@@ -2608,7 +2608,7 @@  discard block
 block discarded – undo
2608 2608
             $impostos .= $this->descricaoProdutoHelper($ICMS, "pST", " pSt=%s");
2609 2609
             $impostos .= $this->descricaoProdutoHelper($ICMS, "vICMSSTRet", " VALOR ICMS ST=%s");
2610 2610
         }
2611
-        if (! empty($ICMSUFDest)) {
2611
+        if (!empty($ICMSUFDest)) {
2612 2612
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pFCPUFDest", " pFCPUFDest=%s%%");
2613 2613
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pICMSUFDest", " pICMSUFDest=%s%%");
2614 2614
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pICMSInterPart", " pICMSInterPart=%s%%");
@@ -2616,20 +2616,20 @@  discard block
 block discarded – undo
2616 2616
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "vICMSUFDest", " vICMSUFDest=%s");
2617 2617
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "vICMSUFRemet", " vICMSUFRemet=%s");
2618 2618
         }
2619
-        $infAdProd = ! empty($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue)
2619
+        $infAdProd = !empty($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue)
2620 2620
             ? substr(
2621 2621
                 $this->anfaveaDANFE($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue),
2622 2622
                 0,
2623 2623
                 500
2624 2624
             )
2625 2625
             : '';
2626
-        if (! empty($infAdProd)) {
2626
+        if (!empty($infAdProd)) {
2627 2627
             $infAdProd = trim($infAdProd);
2628 2628
             $infAdProd .= ' ';
2629 2629
         }
2630 2630
         $loteTxt = '';
2631 2631
         $rastro  = $prod->getElementsByTagName("med");
2632
-        if (! empty($prod->getElementsByTagName("rastro"))) {
2632
+        if (!empty($prod->getElementsByTagName("rastro"))) {
2633 2633
             $rastro = $prod->getElementsByTagName("rastro");
2634 2634
             $i      = 0;
2635 2635
             while ($i < $rastro->length) {
@@ -2638,14 +2638,14 @@  discard block
 block discarded – undo
2638 2638
                 $loteTxt .= $this->getTagDate($rastro->item($i), 'dFab', ' Fab: ');
2639 2639
                 $loteTxt .= $this->getTagDate($rastro->item($i), 'dVal', ' Val: ');
2640 2640
                 $loteTxt .= $this->getTagValue($rastro->item($i), 'vPMC', ' PMC: ');
2641
-                $i ++;
2641
+                $i++;
2642 2642
             }
2643 2643
             if ($loteTxt != '') {
2644 2644
                 $loteTxt .= ' ';
2645 2645
             }
2646 2646
         }
2647 2647
         //NT2013.006 FCI
2648
-        $nFCI   = (! empty($itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue)) ?
2648
+        $nFCI   = (!empty($itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue)) ?
2649 2649
             ' FCI:' . $itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue : '';
2650 2650
         $tmp_ad = $infAdProd . ($this->descProdInfoComplemento ? $loteTxt . $impostos . $nFCI : '');
2651 2651
         $texto  = $prod->getElementsByTagName("xProd")->item(0)->nodeValue
@@ -2695,7 +2695,7 @@  discard block
 block discarded – undo
2695 2695
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
2696 2696
         $y += 3;
2697 2697
         //desenha a caixa dos dados dos itens da NF
2698
-        $hmax  += 1;
2698
+        $hmax += 1;
2699 2699
         $texto = '';
2700 2700
         $this->pdf->textBox($x, $y, $w, $hmax);
2701 2701
         //##################################################################################
@@ -2708,101 +2708,101 @@  discard block
 block discarded – undo
2708 2708
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2709 2709
         $this->pdf->line($x + $w1, $y, $x + $w1, $y + $hmax);
2710 2710
         //DESCRIÇÃO DO PRODUTO / SERVIÇO
2711
-        $x     += $w1;
2711
+        $x += $w1;
2712 2712
         $w2    = round($w * 0.25, 0);
2713 2713
         $texto = 'DESCRIÇÃO DO PRODUTO / SERVIÇO';
2714 2714
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2715 2715
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2716 2716
         $this->pdf->line($x + $w2, $y, $x + $w2, $y + $hmax);
2717 2717
         //NCM/SH
2718
-        $x     += $w2;
2718
+        $x += $w2;
2719 2719
         $w3    = round($w * 0.06, 0);
2720 2720
         $texto = 'NCM/SH';
2721 2721
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2722 2722
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2723 2723
         $this->pdf->line($x + $w3, $y, $x + $w3, $y + $hmax);
2724 2724
         //O/CST ou O/CSOSN
2725
-        $x     += $w3;
2725
+        $x += $w3;
2726 2726
         $w4    = round($w * 0.05, 0);
2727 2727
         $texto = 'O/CST'; // CRT = 2 ou CRT = 3
2728 2728
         if ($this->getTagValue($this->emit, 'CRT') == '1') {
2729
-            $texto = 'O/CSOSN';//Regime do Simples CRT = 1
2729
+            $texto = 'O/CSOSN'; //Regime do Simples CRT = 1
2730 2730
         }
2731 2731
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2732 2732
         $this->pdf->textBox($x, $y, $w4, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2733 2733
         $this->pdf->line($x + $w4, $y, $x + $w4, $y + $hmax);
2734 2734
         //CFOP
2735
-        $x     += $w4;
2735
+        $x += $w4;
2736 2736
         $w5    = round($w * 0.04, 0);
2737 2737
         $texto = 'CFOP';
2738 2738
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2739 2739
         $this->pdf->textBox($x, $y, $w5, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2740 2740
         $this->pdf->line($x + $w5, $y, $x + $w5, $y + $hmax);
2741 2741
         //UN
2742
-        $x     += $w5;
2742
+        $x += $w5;
2743 2743
         $w6    = round($w * 0.03, 0);
2744 2744
         $texto = 'UN';
2745 2745
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2746 2746
         $this->pdf->textBox($x, $y, $w6, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2747 2747
         $this->pdf->line($x + $w6, $y, $x + $w6, $y + $hmax);
2748 2748
         //QUANT
2749
-        $x     += $w6;
2749
+        $x += $w6;
2750 2750
         $w7    = round($w * 0.08, 0);
2751 2751
         $texto = 'QUANT';
2752 2752
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2753 2753
         $this->pdf->textBox($x, $y, $w7, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2754 2754
         $this->pdf->line($x + $w7, $y, $x + $w7, $y + $hmax);
2755 2755
         //VALOR UNIT
2756
-        $x     += $w7;
2756
+        $x += $w7;
2757 2757
         $w8    = round($w * 0.06, 0);
2758 2758
         $texto = 'VALOR UNIT';
2759 2759
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2760 2760
         $this->pdf->textBox($x, $y, $w8, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2761 2761
         $this->pdf->line($x + $w8, $y, $x + $w8, $y + $hmax);
2762 2762
         //VALOR TOTAL
2763
-        $x     += $w8;
2763
+        $x += $w8;
2764 2764
         $w9    = round($w * 0.06, 0);
2765 2765
         $texto = 'VALOR TOTAL';
2766 2766
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2767 2767
         $this->pdf->textBox($x, $y, $w9, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2768 2768
         $this->pdf->line($x + $w9, $y, $x + $w9, $y + $hmax);
2769 2769
         //VALOR DESCONTO
2770
-        $x     += $w9;
2770
+        $x += $w9;
2771 2771
         $w10   = round($w * 0.05, 0);
2772 2772
         $texto = 'VALOR DESC';
2773 2773
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2774 2774
         $this->pdf->textBox($x, $y, $w10, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2775 2775
         $this->pdf->line($x + $w10, $y, $x + $w10, $y + $hmax);
2776 2776
         //B.CÁLC ICMS
2777
-        $x     += $w10;
2777
+        $x += $w10;
2778 2778
         $w11   = round($w * 0.06, 0);
2779 2779
         $texto = 'B.CÁLC ICMS';
2780 2780
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2781 2781
         $this->pdf->textBox($x, $y, $w11, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2782 2782
         $this->pdf->line($x + $w11, $y, $x + $w11, $y + $hmax);
2783 2783
         //VALOR ICMS
2784
-        $x     += $w11;
2784
+        $x += $w11;
2785 2785
         $w12   = round($w * 0.06, 0);
2786 2786
         $texto = 'VALOR ICMS';
2787 2787
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2788 2788
         $this->pdf->textBox($x, $y, $w12, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2789 2789
         $this->pdf->line($x + $w12, $y, $x + $w12, $y + $hmax);
2790 2790
         //VALOR IPI
2791
-        $x     += $w12;
2791
+        $x += $w12;
2792 2792
         $w13   = round($w * 0.05, 0);
2793 2793
         $texto = 'VALOR IPI';
2794 2794
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2795 2795
         $this->pdf->textBox($x, $y, $w13, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2796 2796
         $this->pdf->line($x + $w13, $y, $x + $w13, $y + $hmax);
2797 2797
         //ALÍQ. ICMS
2798
-        $x     += $w13;
2798
+        $x += $w13;
2799 2799
         $w14   = round($w * 0.04, 0);
2800 2800
         $texto = 'ALÍQ. ICMS';
2801 2801
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2802 2802
         $this->pdf->textBox($x, $y, $w14, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2803 2803
         $this->pdf->line($x + $w14, $y, $x + $w14, $y + $hmax);
2804 2804
         //ALÍQ. IPI
2805
-        $x     += $w14;
2805
+        $x += $w14;
2806 2806
         $w15   = $w - ($w1 + $w2 + $w3 + $w4 + $w5 + $w6 + $w7 + $w8 + $w9 + $w10 + $w11 + $w12 + $w13 + $w14);
2807 2807
         $texto = 'ALÍQ. IPI';
2808 2808
         $this->pdf->textBox($x, $y, $w15, $h, $texto, $aFont, 'C', 'C', 0, '', false);
@@ -2847,7 +2847,7 @@  discard block
 block discarded – undo
2847 2847
                 // Informação sobre unidade de medida tributavel.
2848 2848
                 // Se não for para exibir a unidade de medida tributavel, então
2849 2849
                 // A Escrita irá começar em 0.
2850
-                if (! $mostrarUnidadeTributavel) {
2850
+                if (!$mostrarUnidadeTributavel) {
2851 2851
                     $yTrib = 0;
2852 2852
                 }
2853 2853
                 $h = $this->calculeHeight($thisItem, $mostrarUnidadeTributavel);
@@ -2882,7 +2882,7 @@  discard block
 block discarded – undo
2882 2882
                 }
2883 2883
                 $x += $w2;
2884 2884
                 //NCM
2885
-                $texto = ! empty($prod->getElementsByTagName("NCM")->item(0)->nodeValue) ?
2885
+                $texto = !empty($prod->getElementsByTagName("NCM")->item(0)->nodeValue) ?
2886 2886
                     $prod->getElementsByTagName("NCM")->item(0)->nodeValue : '';
2887 2887
                 $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'C', 0, '');
2888 2888
                 $x += $w3;
@@ -2895,11 +2895,11 @@  discard block
 block discarded – undo
2895 2895
                     $this->pdf->textBox($x, $y, $w4, $h, $texto, $aFont, 'T', 'C', 0, '');
2896 2896
                 }
2897 2897
                 //CFOP
2898
-                $x     += $w4;
2898
+                $x += $w4;
2899 2899
                 $texto = $prod->getElementsByTagName("CFOP")->item(0)->nodeValue;
2900 2900
                 $this->pdf->textBox($x, $y, $w5, $h, $texto, $aFont, 'T', 'C', 0, '');
2901 2901
                 //Unidade
2902
-                $x     += $w5;
2902
+                $x += $w5;
2903 2903
                 $texto = $uCom;
2904 2904
                 $this->pdf->textBox($x, $y, $w6, $h, $texto, $aFont, 'T', 'C', 0, '');
2905 2905
                 //Unidade de medida tributável
@@ -2920,7 +2920,7 @@  discard block
 block discarded – undo
2920 2920
                 // QTDADE Tributável
2921 2921
                 if ($mostrarUnidadeTributavel) {
2922 2922
                     $qTrib = $prod->getElementsByTagName("qTrib")->item(0);
2923
-                    if (! empty($qTrib)) {
2923
+                    if (!empty($qTrib)) {
2924 2924
                         $texto = number_format($qTrib->nodeValue, $this->qComCasasDec, ",", ".");
2925 2925
                         $this->pdf->textBox($x, $yTrib, $w7, $h, $texto, $aFont, 'T', $alinhamento, 0, '');
2926 2926
                     }
@@ -2933,7 +2933,7 @@  discard block
 block discarded – undo
2933 2933
                 // Valor Unitário Tributável
2934 2934
                 if ($mostrarUnidadeTributavel) {
2935 2935
                     $vUnTrib = $prod->getElementsByTagName("vUnTrib")->item(0);
2936
-                    if (! empty($vUnTrib)) {
2936
+                    if (!empty($vUnTrib)) {
2937 2937
                         $texto = number_format($vUnTrib->nodeValue, $this->vUnComCasasDec, ",", ".");
2938 2938
                         $this->pdf->textBox($x, $yTrib, $w8, $h, $texto, $aFont, 'T', $alinhamento, 0, '');
2939 2939
                     }
@@ -2947,7 +2947,7 @@  discard block
 block discarded – undo
2947 2947
                 $this->pdf->textBox($x, $y, $w9, $h, $texto, $aFont, 'T', $alinhamento, 0, '');
2948 2948
                 $x += $w9;
2949 2949
                 //Valor do Desconto
2950
-                $vdesc = ! empty($prod->getElementsByTagName("vDesc")->item(0)->nodeValue)
2950
+                $vdesc = !empty($prod->getElementsByTagName("vDesc")->item(0)->nodeValue)
2951 2951
                     ? $prod->getElementsByTagName("vDesc")->item(0)->nodeValue : 0;
2952 2952
 
2953 2953
                 $texto = number_format($vdesc, 2, ",", ".");
@@ -2955,7 +2955,7 @@  discard block
 block discarded – undo
2955 2955
                 //Valor da Base de calculo
2956 2956
                 $x += $w10;
2957 2957
                 if (isset($ICMS)) {
2958
-                    $texto = ! empty($ICMS->getElementsByTagName("vBC")->item(0)->nodeValue)
2958
+                    $texto = !empty($ICMS->getElementsByTagName("vBC")->item(0)->nodeValue)
2959 2959
                         ? number_format(
2960 2960
                             $ICMS->getElementsByTagName("vBC")->item(0)->nodeValue,
2961 2961
                             2,
@@ -2968,7 +2968,7 @@  discard block
 block discarded – undo
2968 2968
                 //Valor do ICMS
2969 2969
                 $x += $w11;
2970 2970
                 if (isset($ICMS)) {
2971
-                    $texto = ! empty($ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue)
2971
+                    $texto = !empty($ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue)
2972 2972
                         ? number_format(
2973 2973
                             $ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue,
2974 2974
                             2,
@@ -2981,7 +2981,7 @@  discard block
 block discarded – undo
2981 2981
                 //Valor do IPI
2982 2982
                 $x += $w12;
2983 2983
                 if (isset($IPI)) {
2984
-                    $texto = ! empty($IPI->getElementsByTagName("vIPI")->item(0)->nodeValue)
2984
+                    $texto = !empty($IPI->getElementsByTagName("vIPI")->item(0)->nodeValue)
2985 2985
                         ? number_format(
2986 2986
                             $IPI->getElementsByTagName("vIPI")->item(0)->nodeValue,
2987 2987
                             2,
@@ -2996,7 +2996,7 @@  discard block
 block discarded – undo
2996 2996
                 // %ICMS
2997 2997
                 $x += $w13;
2998 2998
                 if (isset($ICMS)) {
2999
-                    $texto = ! empty($ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue)
2999
+                    $texto = !empty($ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue)
3000 3000
                         ? number_format(
3001 3001
                             $ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue,
3002 3002
                             2,
@@ -3009,7 +3009,7 @@  discard block
 block discarded – undo
3009 3009
                 //%IPI
3010 3010
                 $x += $w14;
3011 3011
                 if (isset($IPI)) {
3012
-                    $texto = ! empty($IPI->getElementsByTagName("pIPI")->item(0)->nodeValue)
3012
+                    $texto = !empty($IPI->getElementsByTagName("pIPI")->item(0)->nodeValue)
3013 3013
                         ? number_format(
3014 3014
                             $IPI->getElementsByTagName("pIPI")->item(0)->nodeValue,
3015 3015
                             2,
@@ -3027,17 +3027,17 @@  discard block
 block discarded – undo
3027 3027
                 $veicProd = $prod->getElementsByTagName("veicProd")->item(0);
3028 3028
                 // Tag somente é gerada para veiculo 0k, e só é permitido um veiculo por NF-e por conta do detran
3029 3029
                 // Verifica se a Tag existe
3030
-                if (! empty($veicProd)) {
3030
+                if (!empty($veicProd)) {
3031 3031
                     $this->dadosItenVeiculoDANFE($oldX, $y, $nInicio, $h, $prod);
3032 3032
                 }
3033 3033
 
3034 3034
 
3035 3035
                 $y += $h;
3036
-                $i ++;
3036
+                $i++;
3037 3037
                 //incrementa o controle dos itens processados.
3038
-                $this->qtdeItensProc ++;
3038
+                $this->qtdeItensProc++;
3039 3039
             } else {
3040
-                $i ++;
3040
+                $i++;
3041 3041
             }
3042 3042
         }
3043 3043
 
@@ -3242,23 +3242,23 @@  discard block
 block discarded – undo
3242 3242
         $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B'];
3243 3243
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
3244 3244
         //INSCRIÇÃO MUNICIPAL
3245
-        $y     += 3;
3245
+        $y += 3;
3246 3246
         $w     = round($this->wPrint * 0.23, 0);
3247 3247
         $texto = 'INSCRIÇÃO MUNICIPAL';
3248 3248
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3249 3249
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3250 3250
         //inscrição municipal
3251
-        $texto = ! empty($this->emit->getElementsByTagName("IM")->item(0)->nodeValue) ?
3251
+        $texto = !empty($this->emit->getElementsByTagName("IM")->item(0)->nodeValue) ?
3252 3252
             $this->emit->getElementsByTagName("IM")->item(0)->nodeValue : '';
3253 3253
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
3254 3254
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
3255 3255
         //VALOR TOTAL DOS SERVIÇOS
3256
-        $x     += $w;
3256
+        $x += $w;
3257 3257
         $texto = 'VALOR TOTAL DOS SERVIÇOS';
3258 3258
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3259 3259
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3260 3260
         if (isset($this->ISSQNtot)) {
3261
-            $texto = ! empty($this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue) ?
3261
+            $texto = !empty($this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue) ?
3262 3262
                 $this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue : '';
3263 3263
             $texto = number_format($texto, 2, ",", ".");
3264 3264
         } else {
@@ -3267,14 +3267,14 @@  discard block
 block discarded – undo
3267 3267
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
3268 3268
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'R', 0, '');
3269 3269
         //BASE DE CÁLCULO DO ISSQN
3270
-        $x     += $w;
3270
+        $x += $w;
3271 3271
         $texto = 'BASE DE CÁLCULO DO ISSQN';
3272 3272
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3273 3273
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3274 3274
         if (isset($this->ISSQNtot)) {
3275
-            $texto = ! empty($this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue) ?
3275
+            $texto = !empty($this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue) ?
3276 3276
                 $this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue : '';
3277
-            $texto = ! empty($texto) ? number_format($texto, 2, ",", ".") : '';
3277
+            $texto = !empty($texto) ? number_format($texto, 2, ",", ".") : '';
3278 3278
         } else {
3279 3279
             $texto = '';
3280 3280
         }
@@ -3291,9 +3291,9 @@  discard block
 block discarded – undo
3291 3291
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3292 3292
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3293 3293
         if (isset($this->ISSQNtot)) {
3294
-            $texto = ! empty($this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue) ?
3294
+            $texto = !empty($this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue) ?
3295 3295
                 $this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue : '';
3296
-            $texto = ! empty($texto) ? number_format($texto, 2, ",", ".") : '';
3296
+            $texto = !empty($texto) ? number_format($texto, 2, ",", ".") : '';
3297 3297
         } else {
3298 3298
             $texto = '';
3299 3299
         }
@@ -3332,7 +3332,7 @@  discard block
 block discarded – undo
3332 3332
 
3333 3333
         //INFORMAÇÕES COMPLEMENTARES
3334 3334
         $texto = "INFORMAÇÕES COMPLEMENTARES";
3335
-        $y     += 3;
3335
+        $y += 3;
3336 3336
         $w     = $this->wAdic;
3337 3337
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => 'B'];
3338 3338
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -3342,7 +3342,7 @@  discard block
 block discarded – undo
3342 3342
         //$this->textoAdic com o texto completo do campo
3343 3343
         //echo str_replace("\n", "<br>",$this->textoAdic);
3344 3344
         //die;
3345
-        $y     += 1;
3345
+        $y += 1;
3346 3346
         $aFont = ['font' => $this->fontePadrao, 'size' => $this->textadicfontsize * $this->pdf->k, 'style' => ''];
3347 3347
         //$aFont = ['font'=>$this->fontePadrao, 'size'=> 5, 'style'=>''];
3348 3348
         $this->pdf->textBox($x, $y + 2, $w - 2, $h, $this->textoAdic, $aFont, 'T', 'L', 0, '', false);
@@ -3393,7 +3393,7 @@  discard block
 block discarded – undo
3393 3393
                 $texto = 'CONTINGÊNCIA SVC-RS' . $dhCont . $xJust;
3394 3394
                 break;
3395 3395
         }
3396
-        $y     += 2;
3396
+        $y += 2;
3397 3397
         $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => ''];
3398 3398
         $this->pdf->textBox($x, $y, $w - 2, $h, $texto, $aFont, 'T', 'L', 0, '', false);
3399 3399
 
@@ -3448,7 +3448,7 @@  discard block
 block discarded – undo
3448 3448
         $tpNF = $this->ide->getElementsByTagName('tpNF')->item(0)->nodeValue;
3449 3449
         if ($tpNF == '0') {
3450 3450
             //NFe de Entrada
3451
-            $emitente     = '';
3451
+            $emitente = '';
3452 3452
             $emitente     .= $this->dest->getElementsByTagName("xNome")->item(0)->nodeValue . " - ";
3453 3453
             $emitente     .= $this->enderDest->getElementsByTagName("xLgr")->item(0)->nodeValue . ", ";
3454 3454
             $emitente     .= $this->enderDest->getElementsByTagName("nro")->item(0)->nodeValue . " - ";
@@ -3501,10 +3501,10 @@  discard block
 block discarded – undo
3501 3501
             $texto .= "AO LADO";
3502 3502
         }
3503 3503
         $texto .= ". EMISSÃO: ";
3504
-        $dEmi  = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3504
+        $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3505 3505
             $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue : '';
3506 3506
         if ($dEmi == '') {
3507
-            $dEmi  = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3507
+            $dEmi  = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3508 3508
                 $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue : '';
3509 3509
             $aDemi = explode('T', $dEmi);
3510 3510
             $dEmi  = $aDemi[0];
@@ -3527,12 +3527,12 @@  discard block
 block discarded – undo
3527 3527
             $this->pdf->textBox($x1, $y, $w1, 18, $texto, $aFont, 'C', 'C', 1, '');
3528 3528
             //DATA DE RECEBIMENTO
3529 3529
             $texto = "DATA DE RECEBIMENTO";
3530
-            $y     += $h;
3530
+            $y += $h;
3531 3531
             $w2    = round($this->wPrint * 0.17, 0); //35;
3532 3532
             $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3533 3533
             $this->pdf->textBox($x, $y, $w2, 8, $texto, $aFont, 'T', 'L', 1, '');
3534 3534
             //IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR
3535
-            $x     += $w2;
3535
+            $x += $w2;
3536 3536
             $w3    = $w - $w2;
3537 3537
             $texto = "IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR";
3538 3538
             $this->pdf->textBox($x, $y, $w3, 8, $texto, $aFont, 'T', 'L', 1, '');
@@ -3543,7 +3543,7 @@  discard block
 block discarded – undo
3543 3543
 
3544 3544
             return $y;
3545 3545
         } else {
3546
-            $x --;
3546
+            $x--;
3547 3547
             $x = $this->pdf->textBox90($x, $y, $w - 1, $h, $texto, $aFontSmall, 'C', 'L', 0, '', false);
3548 3548
             //NUMERO DA NOTA FISCAL LOGO NFE
3549 3549
             $w1    = 18;
@@ -3564,7 +3564,7 @@  discard block
 block discarded – undo
3564 3564
             $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3565 3565
             $this->pdf->textBox90($x, $y, $w2, 8, $texto, $aFont, 'T', 'L', 1, '');
3566 3566
             //IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR
3567
-            $y     -= $w2;
3567
+            $y -= $w2;
3568 3568
             $w3    = $w - $w2;
3569 3569
             $texto = "IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR";
3570 3570
             $aFont = ['font' => $this->fontePadrao, 'size' => 5.7, 'style' => ''];
@@ -3585,18 +3585,18 @@  discard block
 block discarded – undo
3585 3585
      */
3586 3586
     protected function geraInformacoesDaTagCompra()
3587 3587
     {
3588
-        if (! $this->gerarInformacoesAutomaticas) {
3588
+        if (!$this->gerarInformacoesAutomaticas) {
3589 3589
             return '';
3590 3590
         }
3591 3591
         $saida = "";
3592 3592
         if (isset($this->compra)) {
3593
-            if (! empty($this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue)) {
3593
+            if (!empty($this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue)) {
3594 3594
                 $saida .= " Nota de Empenho: " . $this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue;
3595 3595
             }
3596
-            if (! empty($this->compra->getElementsByTagName("xPed")->item(0)->nodeValue)) {
3596
+            if (!empty($this->compra->getElementsByTagName("xPed")->item(0)->nodeValue)) {
3597 3597
                 $saida .= " Pedido: " . $this->compra->getElementsByTagName("xPed")->item(0)->nodeValue;
3598 3598
             }
3599
-            if (! empty($this->compra->getElementsByTagName("xCont")->item(0)->nodeValue)) {
3599
+            if (!empty($this->compra->getElementsByTagName("xCont")->item(0)->nodeValue)) {
3600 3600
                 $saida .= " Contrato: " . $this->compra->getElementsByTagName("xCont")->item(0)->nodeValue;
3601 3601
             }
3602 3602
         }
@@ -3627,10 +3627,10 @@  discard block
 block discarded – undo
3627 3627
         if ($icmss > 0) {
3628 3628
             $icmss = 1;
3629 3629
         }
3630
-        $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3630
+        $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3631 3631
             $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue : '';
3632 3632
         if ($dEmi == '') {
3633
-            $dEmi  = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3633
+            $dEmi  = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3634 3634
                 $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue : '';
3635 3635
             $aDemi = explode('T', $dEmi);
3636 3636
             $dEmi  = $aDemi[0];
@@ -3654,7 +3654,7 @@  discard block
 block discarded – undo
3654 3654
      */
3655 3655
     protected function geraInformacoesDasNotasReferenciadas()
3656 3656
     {
3657
-        if (! $this->gerarInformacoesAutomaticas) {
3657
+        if (!$this->gerarInformacoesAutomaticas) {
3658 3658
             return '';
3659 3659
         }
3660 3660
         $formaNfeRef = "\r\nNFe Ref.: série:%d número:%d emit:%s em %s [%s]";
@@ -3682,7 +3682,7 @@  discard block
 block discarded – undo
3682 3682
                 $cnpj          = $this->formatField(substr($chave_acesso, 6, 14), "##.###.###/####-##");
3683 3683
                 $serie         = substr($chave_acesso, 22, 3);
3684 3684
                 $numero        = substr($chave_acesso, 25, 9);
3685
-                $saida         .= sprintf($formaNfeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3685
+                $saida .= sprintf($formaNfeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3686 3686
             }
3687 3687
             $refNF = $nfRef->getElementsByTagName('refNF');
3688 3688
             foreach ($refNF as $umaRefNFe) {
@@ -3693,7 +3693,7 @@  discard block
 block discarded – undo
3693 3693
                 $numero = $umaRefNFe->getElementsByTagName('nNF')->item(0)->nodeValue;
3694 3694
                 $data   = substr($data, 2, 2) . "/20" . substr($data, 0, 2);
3695 3695
                 $cnpj   = $this->formatField($cnpj, "##.###.###/####-##");
3696
-                $saida  .= sprintf($formaNfRef, $serie, $numero, $cnpj, $data, $mod);
3696
+                $saida .= sprintf($formaNfRef, $serie, $numero, $cnpj, $data, $mod);
3697 3697
             }
3698 3698
             $refCTe = $nfRef->getElementsByTagName('refCTe');
3699 3699
             foreach ($refCTe as $chave_acessoRef) {
@@ -3703,7 +3703,7 @@  discard block
 block discarded – undo
3703 3703
                 $cnpj          = $this->formatField(substr($chave_acesso, 6, 14), "##.###.###/####-##");
3704 3704
                 $serie         = substr($chave_acesso, 22, 3);
3705 3705
                 $numero        = substr($chave_acesso, 25, 9);
3706
-                $saida         .= sprintf($formaCTeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3706
+                $saida .= sprintf($formaCTeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3707 3707
             }
3708 3708
             $refECF = $nfRef->getElementsByTagName('refECF');
3709 3709
             foreach ($refECF as $umaRefNFe) {
@@ -3715,10 +3715,9 @@  discard block
 block discarded – undo
3715 3715
             $refNFP = $nfRef->getElementsByTagName('refNFP');
3716 3716
             foreach ($refNFP as $umaRefNFe) {
3717 3717
                 $data   = $umaRefNFe->getElementsByTagName('AAMM')->item(0)->nodeValue;
3718
-                $cnpj   = ! empty($umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue) ?
3719
-                    $umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue :
3720
-                    '';
3721
-                $cpf    = ! empty($umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue) ?
3718
+                $cnpj   = !empty($umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue) ?
3719
+                    $umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue : '';
3720
+                $cpf    = !empty($umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue) ?
3722 3721
                     $umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue : '';
3723 3722
                 $mod    = $umaRefNFe->getElementsByTagName('mod')->item(0)->nodeValue;
3724 3723
                 $serie  = $umaRefNFe->getElementsByTagName('serie')->item(0)->nodeValue;
@@ -3740,7 +3739,7 @@  discard block
 block discarded – undo
3740 3739
     private function loadDoc($xml)
3741 3740
     {
3742 3741
         $this->xml = $xml;
3743
-        if (! empty($xml)) {
3742
+        if (!empty($xml)) {
3744 3743
             $this->dom = new Dom();
3745 3744
             $this->dom->loadXML($this->xml);
3746 3745
             if (empty($this->dom->getElementsByTagName("infNFe")->item(0))) {
@@ -3794,7 +3793,7 @@  discard block
 block discarded – undo
3794 3793
         $numlinhas    = $this->pdf->getNumLines($textoProduto, $w2, $aFont);
3795 3794
 
3796 3795
         if ($mostrarUnidadeTributavel && $numlinhas == 1) {
3797
-            $numlinhas ++;
3796
+            $numlinhas++;
3798 3797
         }
3799 3798
 
3800 3799
         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/TraitBlocoIV.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         $this->pdf->textBox(
25 25
             $this->margem,
26 26
             $y,
27
-            $this->wPrint/2,
27
+            $this->wPrint / 2,
28 28
             3,
29 29
             $texto,
30 30
             $aFont,
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
             false
36 36
         );
37 37
         $y1 = $this->pdf->textBox(
38
-            $this->margem+$this->wPrint/2,
38
+            $this->margem + $this->wPrint / 2,
39 39
             $y,
40
-            $this->wPrint/2,
40
+            $this->wPrint / 2,
41 41
             3,
42 42
             $qtd,
43 43
             $aFont,
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
         $texto = "Valor Total R$";
52 52
         $this->pdf->textBox(
53 53
             $this->margem,
54
-            $y+$y1,
55
-            $this->wPrint/2,
54
+            $y + $y1,
55
+            $this->wPrint / 2,
56 56
             3,
57 57
             $texto,
58 58
             $aFont,
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
         );
65 65
         $texto = number_format((float) $bruto, 2, ',', '.');
66 66
         $y2 = $this->pdf->textBox(
67
-            $this->margem+$this->wPrint/2,
68
-            $y+$y1,
69
-            $this->wPrint/2,
67
+            $this->margem + $this->wPrint / 2,
68
+            $y + $y1,
69
+            $this->wPrint / 2,
70 70
             3,
71 71
             $texto,
72 72
             $aFont,
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
         $texto = "Desconto R$";
81 81
         $this->pdf->textBox(
82 82
             $this->margem,
83
-            $y+$y1+$y2,
84
-            $this->wPrint/2,
83
+            $y + $y1 + $y2,
84
+            $this->wPrint / 2,
85 85
             3,
86 86
             $texto,
87 87
             $aFont,
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
         );
94 94
         $texto = number_format((float) $desconto, 2, ',', '.');
95 95
         $y3 = $this->pdf->textBox(
96
-            $this->margem+$this->wPrint/2,
97
-            $y+$y1+$y2,
98
-            $this->wPrint/2,
96
+            $this->margem + $this->wPrint / 2,
97
+            $y + $y1 + $y2,
98
+            $this->wPrint / 2,
99 99
             3,
100 100
             $texto,
101 101
             $aFont,
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
         $texto = "Valor a Pagar R$";
114 114
         $this->pdf->textBox(
115 115
             $this->margem,
116
-            $y+$y1+$y2+$y3,
117
-            $this->wPrint/2,
116
+            $y + $y1 + $y2 + $y3,
117
+            $this->wPrint / 2,
118 118
             3,
119 119
             $texto,
120 120
             $aFont,
@@ -126,9 +126,9 @@  discard block
 block discarded – undo
126 126
         );
127 127
         $texto = number_format((float) $valor, 2, ',', '.');
128 128
         $y4 = $this->pdf->textBox(
129
-            $this->margem+$this->wPrint/2,
130
-            $y+$y1+$y2+$y3,
131
-            $this->wPrint/2,
129
+            $this->margem + $this->wPrint / 2,
130
+            $y + $y1 + $y2 + $y3,
131
+            $this->wPrint / 2,
132 132
             3,
133 133
             $texto,
134 134
             $aFont,
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
             false
140 140
         );
141 141
         
142
-        $this->pdf->dashedHLine($this->margem, $this->bloco4H+$y, $this->wPrint, 0.1, 30);
142
+        $this->pdf->dashedHLine($this->margem, $this->bloco4H + $y, $this->wPrint, 0.1, 30);
143 143
         return $this->bloco4H + $y;
144 144
     }
145 145
 }
Please login to merge, or discard this patch.