Completed
Pull Request — master (#392)
by Eduardo
03:13
created
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   +229 added lines, -230 removed lines patch added patch discarded remove patch
@@ -327,39 +327,39 @@  discard block
 block discarded – undo
327 327
     {
328 328
         $this->textoAdic = '';
329 329
         //informações adicionais
330
-        $fontProduto            = [
330
+        $fontProduto = [
331 331
             'font'  => $this->fontePadrao,
332 332
             'size'  => 8,
333 333
             'style' => ''
334 334
         ];
335 335
         $k                      = $this->pdf->k;
336 336
         $this->textadicfontsize = $fontProduto['size'] / $k;
337
-        $this->textoAdic        .= $this->geraInformacoesDasNotasReferenciadas();
337
+        $this->textoAdic .= $this->geraInformacoesDasNotasReferenciadas();
338 338
         if (isset($this->infAdic)) {
339 339
             $i = 0;
340 340
             if ($this->textoAdic != '') {
341 341
                 $this->textoAdic .= ". \n";
342 342
             }
343
-            $this->textoAdic .= ! empty($this->getTagValue($this->infAdic, "infCpl"))
343
+            $this->textoAdic .= !empty($this->getTagValue($this->infAdic, "infCpl"))
344 344
                 ? 'Inf. Contribuinte: ' . $this->anfaveaDANFE($this->getTagValue($this->infAdic, "infCpl"))
345 345
                 : '';
346
-            $infPedido       = $this->geraInformacoesDaTagCompra();
346
+            $infPedido = $this->geraInformacoesDaTagCompra();
347 347
             if ($infPedido != "") {
348 348
                 $this->textoAdic .= $infPedido;
349 349
             }
350 350
             $this->textoAdic .= $this->getTagValue($this->dest, "email", ' Email do Destinatário: ');
351
-            $this->textoAdic .= ! empty($this->getTagValue($this->infAdic, "infAdFisco"))
351
+            $this->textoAdic .= !empty($this->getTagValue($this->infAdic, "infAdFisco"))
352 352
                 ? "\n Inf. fisco: " . $this->getTagValue($this->infAdic, "infAdFisco")
353 353
                 : '';
354
-            $obsCont         = $this->infAdic->getElementsByTagName("obsCont");
354
+            $obsCont = $this->infAdic->getElementsByTagName("obsCont");
355 355
             if (isset($obsCont)) {
356 356
                 foreach ($obsCont as $obs) {
357 357
                     $campo           = $obsCont->item($i)->getAttribute("xCampo");
358
-                    $xTexto          = ! empty($obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue)
358
+                    $xTexto          = !empty($obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue)
359 359
                         ? $obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue
360 360
                         : '';
361 361
                     $this->textoAdic .= "\n" . $campo . ':  ' . trim($xTexto);
362
-                    $i ++;
362
+                    $i++;
363 363
                 }
364 364
             }
365 365
         }
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
             $flagVTT  = $flagVTT && (strpos(strtolower(trim($this->textoAdic)), 'trib') ||
374 374
                     strpos(strtolower(trim($this->textoAdic)), 'imp'));
375 375
             $vTotTrib = $this->getTagValue($this->ICMSTot, 'vTotTrib');
376
-            if ($vTotTrib != '' && ! $flagVTT) {
376
+            if ($vTotTrib != '' && !$flagVTT) {
377 377
                 $this->textoAdic .= "\n Valor Aproximado dos Tributos : R$ "
378 378
                     . number_format($vTotTrib, 2, ",", ".");
379 379
             }
@@ -384,9 +384,9 @@  discard block
 block discarded – undo
384 384
         $this->textadicfontsize = $this->pdf->fontSize;
385 385
         $hdadosadic             = ceil($numlinhasdados * ($this->textadicfontsize));
386 386
         if ($hdadosadic > 70) {
387
-            for ($f = 8; $f > 3; $f --) {
387
+            for ($f = 8; $f > 3; $f--) {
388 388
                 $this->pdf->setFont($this->fontePadrao, '', $f);
389
-                $fontProduto            = [
389
+                $fontProduto = [
390 390
                     'font'  => $this->fontePadrao,
391 391
                     'size'  => $f,
392 392
                     'style' => ''
@@ -514,9 +514,9 @@  discard block
 block discarded – undo
514 514
         $this->hdadosadic = $this->calculoEspacoVericalDadosAdicionais();
515 515
 
516 516
         //altura disponivel para os campos da DANFE
517
-        $hcabecalho    = 47;//para cabeçalho
518
-        $hdestinatario = 25;//para destinatario
519
-        $hduplicatas   = 12;//para cada grupo de 7 duplicatas
517
+        $hcabecalho    = 47; //para cabeçalho
518
+        $hdestinatario = 25; //para destinatario
519
+        $hduplicatas   = 12; //para cada grupo de 7 duplicatas
520 520
         if (isset($this->entrega)) {
521 521
             $hlocalentrega = 25;
522 522
         } else {
@@ -527,11 +527,11 @@  discard block
 block discarded – undo
527 527
         } else {
528 528
             $hlocalretirada = 0;
529 529
         }
530
-        $himposto    = 18;// para imposto
531
-        $htransporte = 25;// para transporte
532
-        $hissqn      = 11;// para issqn
533
-        $hfooter     = 5;// para rodape
534
-        $hCabecItens = 4;//cabeçalho dos itens
530
+        $himposto    = 18; // para imposto
531
+        $htransporte = 25; // para transporte
532
+        $hissqn      = 11; // para issqn
533
+        $hfooter     = 5; // para rodape
534
+        $hCabecItens = 4; //cabeçalho dos itens
535 535
         $hOCUPADA    = $hcabecalho
536 536
             + $hdestinatario
537 537
             + $hlocalentrega
@@ -554,10 +554,10 @@  discard block
 block discarded – undo
554 554
         $this->sizeExtraTextoFatura());*/
555 555
 
556 556
         if ($this->orientacao == 'P') {
557
-            $hDispo1 -= 24 * $this->qCanhoto;//para canhoto
558
-            $w       = $this->wPrint;
557
+            $hDispo1 -= 24 * $this->qCanhoto; //para canhoto
558
+            $w = $this->wPrint;
559 559
         } else {
560
-            $hcanhoto = $this->hPrint;//para canhoto
560
+            $hcanhoto = $this->hPrint; //para canhoto
561 561
             $w        = $this->wPrint - $this->wCanhoto;
562 562
         }
563 563
         //$hDispo1 += 14;
@@ -573,12 +573,12 @@  discard block
 block discarded – undo
573 573
         while ($i < $this->det->length) {
574 574
             $hUsado += $this->calculeHeight($this->det->item($i));
575 575
             if ($hUsado > $hDispo) {
576
-                $totPag ++;
576
+                $totPag++;
577 577
                 $hDispo = $hDispo2;
578 578
                 $hUsado = $hCabecItens;
579
-                $i --; // decrementa para readicionar o item que não coube nessa pagina na outra.
579
+                $i--; // decrementa para readicionar o item que não coube nessa pagina na outra.
580 580
             }
581
-            $i ++;
581
+            $i++;
582 582
         } //fim da soma das areas de itens usadas
583 583
         $qtdeItens = $i; //controle da quantidade de itens no DANFE
584 584
         //montagem da primeira página
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
         $formaPag = [];
611 611
         if (isset($this->detPag) && $this->detPag->length > 0) {
612 612
             foreach ($this->detPag as $k => $d) {
613
-                $fPag            = ! empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
613
+                $fPag            = !empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
614 614
                     ? $this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue
615 615
                     : '0';
616 616
                 $formaPag[$fPag] = $fPag;
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
         }
655 655
 
656 656
         //loop para páginas seguintes
657
-        for ($n = 2; $n <= $totPag; $n ++) {
657
+        for ($n = 2; $n <= $totPag; $n++) {
658 658
             // fixa as margens
659 659
             $this->pdf->setMargins($this->margesq, $this->margsup);
660 660
             //adiciona nova página
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
             }
679 679
             //se estiver na última página e ainda restar itens para inserir, adiciona mais uma página
680 680
             if ($n == $totPag && $this->qtdeItensProc < $qtdeItens) {
681
-                $totPag ++;
681
+                $totPag++;
682 682
             }
683 683
         }
684 684
     }
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
         if ($startPos === false) {
708 708
             return $cdata;
709 709
         }
710
-        for ($x = $len; $x > 0; $x --) {
710
+        for ($x = $len; $x > 0; $x--) {
711 711
             if (substr($cdata, $x, 1) == '>') {
712 712
                 $endPos = $x;
713 713
                 break;
@@ -800,15 +800,15 @@  discard block
 block discarded – undo
800 800
         //grupo CADATA infCpl
801 801
         $t          = $dom->getElementsByTagName('transmissor')->item(0);
802 802
         $r          = $dom->getElementsByTagName('receptor')->item(0);
803
-        $versao     = ! empty($dom->getElementsByTagName('versao')->item(0)->nodeValue) ?
803
+        $versao     = !empty($dom->getElementsByTagName('versao')->item(0)->nodeValue) ?
804 804
             'Versao:' . $dom->getElementsByTagName('versao')->item(0)->nodeValue . ' ' : '';
805
-        $especieNF  = ! empty($dom->getElementsByTagName('especieNF')->item(0)->nodeValue) ?
805
+        $especieNF  = !empty($dom->getElementsByTagName('especieNF')->item(0)->nodeValue) ?
806 806
             'Especie:' . $dom->getElementsByTagName('especieNF')->item(0)->nodeValue . ' ' : '';
807
-        $fabEntrega = ! empty($dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue) ?
807
+        $fabEntrega = !empty($dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue) ?
808 808
             'Entrega:' . $dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue . ' ' : '';
809
-        $dca        = ! empty($dom->getElementsByTagName('dca')->item(0)->nodeValue) ?
809
+        $dca        = !empty($dom->getElementsByTagName('dca')->item(0)->nodeValue) ?
810 810
             'dca:' . $dom->getElementsByTagName('dca')->item(0)->nodeValue . ' ' : '';
811
-        $texto      .= "" . $versao . $especieNF . $fabEntrega . $dca;
811
+        $texto .= "" . $versao . $especieNF . $fabEntrega . $dca;
812 812
         if (isset($t)) {
813 813
             if ($t->hasAttributes()) {
814 814
                 $texto .= " Transmissor ";
@@ -840,7 +840,7 @@  discard block
 block discarded – undo
840 840
      */
841 841
     protected function statusNFe()
842 842
     {
843
-        if (! isset($this->nfeProc)) {
843
+        if (!isset($this->nfeProc)) {
844 844
             return ['status' => false, 'message' => 'NFe NÃO PROTOCOLADA'];
845 845
         }
846 846
         if ($this->getTagValue($this->ide, "tpAmb") == '2') {
@@ -868,7 +868,7 @@  discard block
 block discarded – undo
868 868
 
869 869
     protected function notaDPEC()
870 870
     {
871
-        return ! empty($this->numdepec);
871
+        return !empty($this->numdepec);
872 872
     }
873 873
 
874 874
     /**
@@ -917,7 +917,7 @@  discard block
 block discarded – undo
917 917
         //se for right separa 2/3 para os dados e o terço seguinte para o logo
918 918
         //se não houver logo centraliza dos dados do emitente
919 919
         // coloca o logo
920
-        if (! empty($this->logomarca)) {
920
+        if (!empty($this->logomarca)) {
921 921
             $logoInfo = getimagesize($this->logomarca);
922 922
             //largura da imagem em mm
923 923
             $logoWmm = ($logoInfo[0] / 72) * 25.4;
@@ -973,7 +973,7 @@  discard block
 block discarded – undo
973 973
             //endereço
974 974
             $y1     = $y1 + 5;
975 975
             $aFont  = ['font' => $this->fontePadrao, 'size' => 8, 'style' => ''];
976
-            $fone   = ! empty($this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue)
976
+            $fone   = !empty($this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue)
977 977
                 ? $this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue
978 978
                 : '';
979 979
             $lgr    = $this->getTagValue($this->enderEmit, "xLgr");
@@ -992,8 +992,8 @@  discard block
 block discarded – undo
992 992
 
993 993
         //####################################################################################
994 994
         //coluna central Danfe
995
-        $x  += $w;
996
-        $w  = round($maxW * 0.17, 0);//35;
995
+        $x += $w;
996
+        $w  = round($maxW * 0.17, 0); //35;
997 997
         $w2 = $w;
998 998
         $h  = 32;
999 999
         $this->pdf->textBox($x, $y, $w, $h);
@@ -1050,8 +1050,8 @@  discard block
 block discarded – undo
1050 1050
 
1051 1051
         //####################################################################################
1052 1052
         //coluna codigo de barras
1053
-        $x  += $w;
1054
-        $w  = ($maxW - $w1 - $w2);//85;
1053
+        $x += $w;
1054
+        $w  = ($maxW - $w1 - $w2); //85;
1055 1055
         $w3 = $w;
1056 1056
         $h  = 32;
1057 1057
         $this->pdf->textBox($x, $y, $w, $h);
@@ -1081,7 +1081,7 @@  discard block
 block discarded – undo
1081 1081
         } else {
1082 1082
             $cabecalhoProtoAutorizacao = 'PROTOCOLO DE AUTORIZAÇÃO DE USO';
1083 1083
         }
1084
-        if (($this->tpEmis == 2 || $this->tpEmis == 5) && ! $this->notaDpec()) {
1084
+        if (($this->tpEmis == 2 || $this->tpEmis == 5) && !$this->notaDpec()) {
1085 1085
             $cabecalhoProtoAutorizacao = "DADOS DA NF-E";
1086 1086
             $chaveContingencia         = $this->geraChaveAdicionalDeContingencia();
1087 1087
             $this->pdf->setFillColor(0, 0, 0);
@@ -1113,7 +1113,7 @@  discard block
 block discarded – undo
1113 1113
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1114 1114
         $w     = $w1 + $w2;
1115 1115
         $y     = $oldY;
1116
-        $oldY  += $h;
1116
+        $oldY += $h;
1117 1117
         $x     = $oldX;
1118 1118
         $h     = 7;
1119 1119
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1130,7 +1130,7 @@  discard block
 block discarded – undo
1130 1130
         // NOTA : DANFE sem protocolo deve existir somente no caso de contingência !!!
1131 1131
         // Além disso, existem várias NFes em contingência que eu recebo com protocolo de autorização.
1132 1132
         // Na minha opinião, deveríamos mostra-lo, mas o  manual  da NFe v4.01 diz outra coisa...
1133
-        if (($this->tpEmis == 2 || $this->tpEmis == 5) && ! $this->notaDpec()) {
1133
+        if (($this->tpEmis == 2 || $this->tpEmis == 5) && !$this->notaDpec()) {
1134 1134
             $aFont = ['font' => $this->fontePadrao, 'size' => 8, 'style' => 'B'];
1135 1135
             $texto = $this->formatField(
1136 1136
                 $chaveContingencia,
@@ -1144,7 +1144,7 @@  discard block
 block discarded – undo
1144 1144
                 $cStat = '';
1145 1145
             } else {
1146 1146
                 if (isset($this->nfeProc)) {
1147
-                    $texto  = ! empty($this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue)
1147
+                    $texto  = !empty($this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue)
1148 1148
                         ? $this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue
1149 1149
                         : '';
1150 1150
                     $tsHora = $this->toTimestamp(
@@ -1174,7 +1174,7 @@  discard block
 block discarded – undo
1174 1174
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1175 1175
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1176 1176
         //INSCRIÇÃO MUNICIPAL
1177
-        $x     += $w;
1177
+        $x += $w;
1178 1178
         $texto = 'INSCRIÇÃO MUNICIPAL';
1179 1179
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1180 1180
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1182,29 +1182,29 @@  discard block
 block discarded – undo
1182 1182
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1183 1183
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1184 1184
         //INSCRIÇÃO ESTADUAL DO SUBST. TRIBUT.
1185
-        $x     += $w;
1185
+        $x += $w;
1186 1186
         $texto = 'INSCRIÇÃO ESTADUAL DO SUBST. TRIBUT.';
1187 1187
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1188 1188
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1189
-        $texto = ! empty($this->emit->getElementsByTagName("IEST")->item(0)->nodeValue)
1189
+        $texto = !empty($this->emit->getElementsByTagName("IEST")->item(0)->nodeValue)
1190 1190
             ? $this->emit->getElementsByTagName("IEST")->item(0)->nodeValue
1191 1191
             : '';
1192 1192
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1193 1193
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1194 1194
         //CNPJ
1195
-        $x     += $w;
1195
+        $x += $w;
1196 1196
         $w     = ($maxW - (3 * $w));
1197 1197
         $texto = 'CNPJ';
1198 1198
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1199 1199
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1200 1200
         //Pegando valor do CPF/CNPJ
1201
-        if (! empty($this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1201
+        if (!empty($this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1202 1202
             $texto = $this->formatField(
1203 1203
                 $this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1204 1204
                 "###.###.###/####-##"
1205 1205
             );
1206 1206
         } else {
1207
-            $texto = ! empty($this->emit->getElementsByTagName("CPF")->item(0)->nodeValue)
1207
+            $texto = !empty($this->emit->getElementsByTagName("CPF")->item(0)->nodeValue)
1208 1208
                 ? $this->formatField(
1209 1209
                     $this->emit->getElementsByTagName("CPF")->item(0)->nodeValue,
1210 1210
                     "###.###.###-##"
@@ -1219,7 +1219,7 @@  discard block
 block discarded – undo
1219 1219
         $tpAmb = $this->ide->getElementsByTagName('tpAmb')->item(0)->nodeValue;
1220 1220
         //indicar cancelamento
1221 1221
         $resp = $this->statusNFe();
1222
-        if (! $resp['status']) {
1222
+        if (!$resp['status']) {
1223 1223
             $x = 10;
1224 1224
             $y = $this->hPrint - 130;
1225 1225
             $h = 25;
@@ -1289,7 +1289,7 @@  discard block
 block discarded – undo
1289 1289
         //NOME / RAZÃO SOCIAL
1290 1290
         $w     = round($maxW * 0.61, 0);
1291 1291
         $w1    = $w;
1292
-        $y     += 3;
1292
+        $y += 3;
1293 1293
         $texto = 'NOME / RAZÃO SOCIAL';
1294 1294
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1295 1295
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1301,20 +1301,20 @@  discard block
 block discarded – undo
1301 1301
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, '');
1302 1302
         }
1303 1303
         //CNPJ / CPF
1304
-        $x     += $w;
1304
+        $x += $w;
1305 1305
         $w     = round($maxW * 0.23, 0);
1306 1306
         $w2    = $w;
1307 1307
         $texto = 'CNPJ / CPF';
1308 1308
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1309 1309
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1310 1310
         //Pegando valor do CPF/CNPJ
1311
-        if (! empty($this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1311
+        if (!empty($this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1312 1312
             $texto = $this->formatField(
1313 1313
                 $this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1314 1314
                 "###.###.###/####-##"
1315 1315
             );
1316 1316
         } else {
1317
-            $texto = ! empty($this->dest->getElementsByTagName("CPF")->item(0)->nodeValue)
1317
+            $texto = !empty($this->dest->getElementsByTagName("CPF")->item(0)->nodeValue)
1318 1318
                 ? $this->formatField(
1319 1319
                     $this->dest->getElementsByTagName("CPF")->item(0)->nodeValue,
1320 1320
                     "###.###.###-##"
@@ -1324,17 +1324,17 @@  discard block
 block discarded – undo
1324 1324
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1325 1325
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1326 1326
         //DATA DA EMISSÃO
1327
-        $x     += $w;
1327
+        $x += $w;
1328 1328
         $w     = $maxW - ($w1 + $w2);
1329 1329
         $wx    = $w;
1330 1330
         $texto = 'DATA DA EMISSÃO';
1331 1331
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1332 1332
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1333
-        $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue)
1333
+        $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue)
1334 1334
             ? $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue
1335 1335
             : '';
1336 1336
         if ($dEmi == '') {
1337
-            $dEmi  = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue)
1337
+            $dEmi  = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue)
1338 1338
                 ? $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue
1339 1339
                 : '';
1340 1340
             $aDemi = explode('T', $dEmi);
@@ -1350,7 +1350,7 @@  discard block
 block discarded – undo
1350 1350
         //ENDEREÇO
1351 1351
         $w     = round($maxW * 0.47, 0);
1352 1352
         $w1    = $w;
1353
-        $y     += $h;
1353
+        $y += $h;
1354 1354
         $x     = $oldX;
1355 1355
         $texto = 'ENDEREÇO';
1356 1356
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1362,7 +1362,7 @@  discard block
 block discarded – undo
1362 1362
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1363 1363
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true);
1364 1364
         //BAIRRO / DISTRITO
1365
-        $x     += $w;
1365
+        $x += $w;
1366 1366
         $w     = round($maxW * 0.21, 0);
1367 1367
         $w2    = $w;
1368 1368
         $texto = 'BAIRRO / DISTRITO';
@@ -1372,29 +1372,29 @@  discard block
 block discarded – undo
1372 1372
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1373 1373
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1374 1374
         //CEP
1375
-        $x     += $w;
1375
+        $x += $w;
1376 1376
         $w     = $maxW - $w1 - $w2 - $wx;
1377 1377
         $w2    = $w;
1378 1378
         $texto = 'CEP';
1379 1379
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1380 1380
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1381
-        $texto = ! empty($this->dest->getElementsByTagName("CEP")->item(0)->nodeValue)
1381
+        $texto = !empty($this->dest->getElementsByTagName("CEP")->item(0)->nodeValue)
1382 1382
             ? $this->dest->getElementsByTagName("CEP")->item(0)->nodeValue
1383 1383
             : '';
1384 1384
         $texto = $this->formatField($texto, "#####-###");
1385 1385
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1386 1386
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1387 1387
         //DATA DA SAÍDA
1388
-        $x     += $w;
1388
+        $x += $w;
1389 1389
         $w     = $wx;
1390 1390
         $texto = 'DATA DA SAÍDA/ENTRADA';
1391 1391
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1392 1392
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1393
-        $dSaiEnt = ! empty($this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue)
1393
+        $dSaiEnt = !empty($this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue)
1394 1394
             ? $this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue
1395 1395
             : '';
1396 1396
         if ($dSaiEnt == '') {
1397
-            $dSaiEnt  = ! empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1397
+            $dSaiEnt  = !empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1398 1398
                 ? $this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue
1399 1399
                 : '';
1400 1400
             $aDsaient = explode('T', $dSaiEnt);
@@ -1405,7 +1405,7 @@  discard block
 block discarded – undo
1405 1405
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1406 1406
         //MUNICÍPIO
1407 1407
         $w     = $w1;
1408
-        $y     += $h;
1408
+        $y += $h;
1409 1409
         $x     = $oldX;
1410 1410
         $texto = 'MUNICÍPIO';
1411 1411
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1419,7 +1419,7 @@  discard block
 block discarded – undo
1419 1419
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1420 1420
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
1421 1421
         //UF
1422
-        $x     += $w;
1422
+        $x += $w;
1423 1423
         $w     = 8;
1424 1424
         $texto = 'UF';
1425 1425
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1428,19 +1428,19 @@  discard block
 block discarded – undo
1428 1428
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1429 1429
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1430 1430
         //FONE / FAX
1431
-        $x     += $w;
1431
+        $x += $w;
1432 1432
         $w     = round(($maxW - $w1 - $wx - 8) / 2, 0);
1433 1433
         $w3    = $w;
1434 1434
         $texto = 'FONE / FAX';
1435 1435
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1436 1436
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1437
-        $texto = ! empty($this->dest->getElementsByTagName("fone")->item(0)->nodeValue)
1437
+        $texto = !empty($this->dest->getElementsByTagName("fone")->item(0)->nodeValue)
1438 1438
             ? $this->dest->getElementsByTagName("fone")->item(0)->nodeValue
1439 1439
             : '';
1440 1440
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1441 1441
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1442 1442
         //INSCRIÇÃO ESTADUAL
1443
-        $x     += $w;
1443
+        $x += $w;
1444 1444
         $w     = $maxW - $w1 - $wx - 8 - $w3;
1445 1445
         $texto = 'INSCRIÇÃO ESTADUAL';
1446 1446
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1450,16 +1450,16 @@  discard block
 block discarded – undo
1450 1450
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1451 1451
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1452 1452
         //HORA DA SAÍDA
1453
-        $x     += $w;
1453
+        $x += $w;
1454 1454
         $w     = $wx;
1455 1455
         $texto = 'HORA DA SAÍDA/ENTRADA';
1456 1456
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1457 1457
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1458
-        $hSaiEnt = ! empty($this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue)
1458
+        $hSaiEnt = !empty($this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue)
1459 1459
             ? $this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue
1460 1460
             : '';
1461 1461
         if ($hSaiEnt == '') {
1462
-            $dhSaiEnt   = ! empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1462
+            $dhSaiEnt   = !empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1463 1463
                 ? $this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue
1464 1464
                 : '';
1465 1465
             $tsDhSaiEnt = $this->toTimestamp($dhSaiEnt);
@@ -1503,7 +1503,7 @@  discard block
 block discarded – undo
1503 1503
         //NOME / RAZÃO SOCIAL
1504 1504
         $w     = round($maxW * 0.61, 0);
1505 1505
         $w1    = $w;
1506
-        $y     += 3;
1506
+        $y += 3;
1507 1507
         $texto = 'NOME / RAZÃO SOCIAL';
1508 1508
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1509 1509
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1518,20 +1518,20 @@  discard block
 block discarded – undo
1518 1518
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, '');
1519 1519
         }
1520 1520
         //CNPJ / CPF
1521
-        $x     += $w;
1521
+        $x += $w;
1522 1522
         $w     = round($maxW * 0.23, 0);
1523 1523
         $w2    = $w;
1524 1524
         $texto = 'CNPJ / CPF';
1525 1525
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1526 1526
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1527 1527
         //Pegando valor do CPF/CNPJ
1528
-        if (! empty($this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1528
+        if (!empty($this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1529 1529
             $texto = $this->formatField(
1530 1530
                 $this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1531 1531
                 "###.###.###/####-##"
1532 1532
             );
1533 1533
         } else {
1534
-            $texto = ! empty($this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1534
+            $texto = !empty($this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1535 1535
                 $this->formatField(
1536 1536
                     $this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue,
1537 1537
                     "###.###.###-##"
@@ -1540,7 +1540,7 @@  discard block
 block discarded – undo
1540 1540
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1541 1541
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1542 1542
         //INSCRIÇÃO ESTADUAL
1543
-        $x     += $w;
1543
+        $x += $w;
1544 1544
         $w     = $maxW - ($w1 + $w2);
1545 1545
         $wx    = $w;
1546 1546
         $texto = 'INSCRIÇÃO ESTADUAL';
@@ -1559,7 +1559,7 @@  discard block
 block discarded – undo
1559 1559
         //ENDEREÇO
1560 1560
         $w     = round($maxW * 0.355, 0) + $wx;
1561 1561
         $w1    = $w;
1562
-        $y     += $h;
1562
+        $y += $h;
1563 1563
         $x     = $oldX;
1564 1564
         $texto = 'ENDEREÇO';
1565 1565
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1570,7 +1570,7 @@  discard block
 block discarded – undo
1570 1570
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1571 1571
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true);
1572 1572
         //BAIRRO / DISTRITO
1573
-        $x     += $w;
1573
+        $x += $w;
1574 1574
         $w     = round($maxW * 0.335, 0);
1575 1575
         $w2    = $w;
1576 1576
         $texto = 'BAIRRO / DISTRITO';
@@ -1580,12 +1580,12 @@  discard block
 block discarded – undo
1580 1580
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1581 1581
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1582 1582
         //CEP
1583
-        $x     += $w;
1583
+        $x += $w;
1584 1584
         $w     = $maxW - ($w1 + $w2);
1585 1585
         $texto = 'CEP';
1586 1586
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1587 1587
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1588
-        $texto = ! empty($this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1588
+        $texto = !empty($this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1589 1589
             $this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue : '';
1590 1590
         $texto = $this->formatField($texto, "#####-###");
1591 1591
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
@@ -1593,7 +1593,7 @@  discard block
 block discarded – undo
1593 1593
         //MUNICÍPIO
1594 1594
         $w     = round($maxW * 0.805, 0);
1595 1595
         $w1    = $w;
1596
-        $y     += $h;
1596
+        $y += $h;
1597 1597
         $x     = $oldX;
1598 1598
         $texto = 'MUNICÍPIO';
1599 1599
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1605,7 +1605,7 @@  discard block
 block discarded – undo
1605 1605
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1606 1606
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
1607 1607
         //UF
1608
-        $x     += $w;
1608
+        $x += $w;
1609 1609
         $w     = 8;
1610 1610
         $texto = 'UF';
1611 1611
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1614,12 +1614,12 @@  discard block
 block discarded – undo
1614 1614
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1615 1615
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1616 1616
         //FONE / FAX
1617
-        $x     += $w;
1617
+        $x += $w;
1618 1618
         $w     = $maxW - $w - $w1;
1619 1619
         $texto = 'FONE / FAX';
1620 1620
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1621 1621
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1622
-        $texto = ! empty($this->entrega->getElementsByTagName("fone")->item(0)->nodeValue) ?
1622
+        $texto = !empty($this->entrega->getElementsByTagName("fone")->item(0)->nodeValue) ?
1623 1623
             $this->entrega->getElementsByTagName("fone")->item(0)->nodeValue : '';
1624 1624
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1625 1625
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
@@ -1656,7 +1656,7 @@  discard block
 block discarded – undo
1656 1656
         //NOME / RAZÃO SOCIAL
1657 1657
         $w     = round($maxW * 0.61, 0);
1658 1658
         $w1    = $w;
1659
-        $y     += 3;
1659
+        $y += 3;
1660 1660
         $texto = 'NOME / RAZÃO SOCIAL';
1661 1661
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1662 1662
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1671,20 +1671,20 @@  discard block
 block discarded – undo
1671 1671
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, '');
1672 1672
         }
1673 1673
         //CNPJ / CPF
1674
-        $x     += $w;
1674
+        $x += $w;
1675 1675
         $w     = round($maxW * 0.23, 0);
1676 1676
         $w2    = $w;
1677 1677
         $texto = 'CNPJ / CPF';
1678 1678
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1679 1679
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1680 1680
         //Pegando valor do CPF/CNPJ
1681
-        if (! empty($this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1681
+        if (!empty($this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1682 1682
             $texto = $this->formatField(
1683 1683
                 $this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1684 1684
                 "###.###.###/####-##"
1685 1685
             );
1686 1686
         } else {
1687
-            $texto = ! empty($this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1687
+            $texto = !empty($this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1688 1688
                 $this->formatField(
1689 1689
                     $this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue,
1690 1690
                     "###.###.###-##"
@@ -1693,7 +1693,7 @@  discard block
 block discarded – undo
1693 1693
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1694 1694
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1695 1695
         //INSCRIÇÃO ESTADUAL
1696
-        $x     += $w;
1696
+        $x += $w;
1697 1697
         $w     = $maxW - ($w1 + $w2);
1698 1698
         $wx    = $w;
1699 1699
         $texto = 'INSCRIÇÃO ESTADUAL';
@@ -1712,7 +1712,7 @@  discard block
 block discarded – undo
1712 1712
         //ENDEREÇO
1713 1713
         $w     = round($maxW * 0.355, 0) + $wx;
1714 1714
         $w1    = $w;
1715
-        $y     += $h;
1715
+        $y += $h;
1716 1716
         $x     = $oldX;
1717 1717
         $texto = 'ENDEREÇO';
1718 1718
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1723,7 +1723,7 @@  discard block
 block discarded – undo
1723 1723
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1724 1724
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true);
1725 1725
         //BAIRRO / DISTRITO
1726
-        $x     += $w;
1726
+        $x += $w;
1727 1727
         $w     = round($maxW * 0.335, 0);
1728 1728
         $w2    = $w;
1729 1729
         $texto = 'BAIRRO / DISTRITO';
@@ -1733,12 +1733,12 @@  discard block
 block discarded – undo
1733 1733
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1734 1734
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1735 1735
         //CEP
1736
-        $x     += $w;
1736
+        $x += $w;
1737 1737
         $w     = $maxW - ($w1 + $w2);
1738 1738
         $texto = 'CEP';
1739 1739
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1740 1740
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1741
-        $texto = ! empty($this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1741
+        $texto = !empty($this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1742 1742
             $this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue : '';
1743 1743
         $texto = $this->formatField($texto, "#####-###");
1744 1744
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
@@ -1746,7 +1746,7 @@  discard block
 block discarded – undo
1746 1746
         //MUNICÍPIO
1747 1747
         $w     = round($maxW * 0.805, 0);
1748 1748
         $w1    = $w;
1749
-        $y     += $h;
1749
+        $y += $h;
1750 1750
         $x     = $oldX;
1751 1751
         $texto = 'MUNICÍPIO';
1752 1752
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1758,7 +1758,7 @@  discard block
 block discarded – undo
1758 1758
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1759 1759
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
1760 1760
         //UF
1761
-        $x     += $w;
1761
+        $x += $w;
1762 1762
         $w     = 8;
1763 1763
         $texto = 'UF';
1764 1764
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1767,12 +1767,12 @@  discard block
 block discarded – undo
1767 1767
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1768 1768
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1769 1769
         //FONE / FAX
1770
-        $x     += $w;
1770
+        $x += $w;
1771 1771
         $w     = $maxW - $w - $w1;
1772 1772
         $texto = 'FONE / FAX';
1773 1773
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1774 1774
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1775
-        $texto = ! empty($this->retirada->getElementsByTagName("fone")->item(0)->nodeValue) ?
1775
+        $texto = !empty($this->retirada->getElementsByTagName("fone")->item(0)->nodeValue) ?
1776 1776
             $this->retirada->getElementsByTagName("fone")->item(0)->nodeValue : '';
1777 1777
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1778 1778
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
@@ -1792,7 +1792,7 @@  discard block
 block discarded – undo
1792 1792
         if (isset($this->cobr)) {
1793 1793
             $fat = $this->cobr->getElementsByTagName("fat")->item(0);
1794 1794
             if (isset($fat)) {
1795
-                if (! empty($this->getTagValue($this->ide, "indPag"))) {
1795
+                if (!empty($this->getTagValue($this->ide, "indPag"))) {
1796 1796
                     $textoIndPag = "";
1797 1797
                     $indPag      = $this->getTagValue($this->ide, "indPag");
1798 1798
                     if ($indPag === "0") {
@@ -1867,7 +1867,7 @@  discard block
 block discarded – undo
1867 1867
             $h     = 8;
1868 1868
             $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B'];
1869 1869
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1870
-            $y       += 3;
1870
+            $y += 3;
1871 1871
             $dups    = "";
1872 1872
             $dupcont = 0;
1873 1873
             $nFat    = $this->dup->length;
@@ -1901,13 +1901,13 @@  discard block
 block discarded – undo
1901 1901
             }
1902 1902
             $increm = 1;
1903 1903
             foreach ($this->dup as $k => $d) {
1904
-                $nDup  = ! empty($this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue)
1904
+                $nDup  = !empty($this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue)
1905 1905
                     ? $this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue
1906 1906
                     : '';
1907
-                $dDup  = ! empty($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue)
1907
+                $dDup  = !empty($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue)
1908 1908
                     ? $this->ymdTodmy($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue)
1909 1909
                     : '';
1910
-                $vDup  = ! empty($this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue)
1910
+                $vDup  = !empty($this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue)
1911 1911
                     ? 'R$ ' . number_format(
1912 1912
                         $this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue,
1913 1913
                         2,
@@ -1954,7 +1954,7 @@  discard block
 block discarded – undo
1954 1954
             }
1955 1955
             if ($dupcont == 0) {
1956 1956
                 $y -= 9;
1957
-                $linha --;
1957
+                $linha--;
1958 1958
             }
1959 1959
 
1960 1960
             return ($y + $h);
@@ -1994,7 +1994,7 @@  discard block
 block discarded – undo
1994 1994
             $h     = 8;
1995 1995
             $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B'];
1996 1996
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1997
-            $y       += 3;
1997
+            $y += 3;
1998 1998
             $dups    = "";
1999 1999
             $dupcont = 0;
2000 2000
             if ($this->orientacao == 'P') {
@@ -2023,7 +2023,7 @@  discard block
 block discarded – undo
2023 2023
                 '90' => 'Sem pagamento',
2024 2024
                 '99' => 'Outros'
2025 2025
             ];
2026
-            $bandeira       = [
2026
+            $bandeira = [
2027 2027
                 '01' => 'Visa',
2028 2028
                 '02' => 'Mastercard',
2029 2029
                 '03' => 'American',
@@ -2036,10 +2036,10 @@  discard block
 block discarded – undo
2036 2036
                 '99' => 'Outros'
2037 2037
             ];
2038 2038
             foreach ($this->detPag as $k => $d) {
2039
-                $fPag  = ! empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
2039
+                $fPag  = !empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
2040 2040
                     ? $this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue
2041 2041
                     : '0';
2042
-                $vPag  = ! empty($this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue)
2042
+                $vPag  = !empty($this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue)
2043 2043
                     ? 'R$ ' . number_format(
2044 2044
                         $this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue,
2045 2045
                         2,
@@ -2082,7 +2082,7 @@  discard block
 block discarded – undo
2082 2082
             }
2083 2083
             if ($dupcont == 0) {
2084 2084
                 $y -= 9;
2085
-                $linha --;
2085
+                $linha--;
2086 2086
             }
2087 2087
 
2088 2088
             return ($y + $h);
@@ -2114,7 +2114,7 @@  discard block
 block discarded – undo
2114 2114
         $the_field    = $this->ICMSTot->getElementsByTagName($campoImposto)->item(0);
2115 2115
         if (isset($the_field)) {
2116 2116
             $the_value = $the_field->nodeValue;
2117
-            if (! empty($the_value)) {
2117
+            if (!empty($the_value)) {
2118 2118
                 $valorImposto = number_format($the_value, 2, ",", ".");
2119 2119
             }
2120 2120
         }
@@ -2143,10 +2143,10 @@  discard block
 block discarded – undo
2143 2143
         $x_inicial = $x;
2144 2144
         //#####################################################################
2145 2145
         $campos_por_linha = 9;
2146
-        if (! $this->exibirPIS) {
2147
-            $campos_por_linha --;
2146
+        if (!$this->exibirPIS) {
2147
+            $campos_por_linha--;
2148 2148
         }
2149
-        if (! $this->exibirIcmsInterestadual) {
2149
+        if (!$this->exibirIcmsInterestadual) {
2150 2150
             $campos_por_linha -= 2;
2151 2151
         }
2152 2152
 
@@ -2233,12 +2233,12 @@  discard block
 block discarded – undo
2233 2233
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
2234 2234
         //NOME / RAZÃO SOCIAL
2235 2235
         $w1    = $maxW * 0.29;
2236
-        $y     += 3;
2236
+        $y += 3;
2237 2237
         $texto = 'NOME / RAZÃO SOCIAL';
2238 2238
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2239 2239
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, '');
2240 2240
         if (isset($this->transporta)) {
2241
-            $texto = ! empty($this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue)
2241
+            $texto = !empty($this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue)
2242 2242
                 ? $this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue
2243 2243
                 : '';
2244 2244
         } else {
@@ -2247,12 +2247,12 @@  discard block
 block discarded – undo
2247 2247
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2248 2248
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'L', 0, '');
2249 2249
         //FRETE POR CONTA
2250
-        $x     += $w1;
2250
+        $x += $w1;
2251 2251
         $w2    = $maxW * 0.15;
2252 2252
         $texto = 'FRETE';
2253 2253
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2254 2254
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2255
-        $tipoFrete = ! empty($this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue)
2255
+        $tipoFrete = !empty($this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue)
2256 2256
             ? $this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue
2257 2257
             : '0';
2258 2258
         switch ($tipoFrete) {
@@ -2278,12 +2278,12 @@  discard block
 block discarded – undo
2278 2278
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2279 2279
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'C', 'C', 1, '');
2280 2280
         //CÓDIGO ANTT
2281
-        $x     += $w2;
2281
+        $x += $w2;
2282 2282
         $texto = 'CÓDIGO ANTT';
2283 2283
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2284 2284
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2285 2285
         if (isset($this->veicTransp)) {
2286
-            $texto = ! empty($this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue)
2286
+            $texto = !empty($this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue)
2287 2287
                 ? $this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue
2288 2288
                 : '';
2289 2289
         } else {
@@ -2292,16 +2292,16 @@  discard block
 block discarded – undo
2292 2292
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2293 2293
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2294 2294
         //PLACA DO VEÍC
2295
-        $x     += $w2;
2295
+        $x += $w2;
2296 2296
         $texto = 'PLACA DO VEÍCULO';
2297 2297
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2298 2298
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2299 2299
         if (isset($this->veicTransp)) {
2300
-            $texto = ! empty($this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue)
2300
+            $texto = !empty($this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue)
2301 2301
                 ? $this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue
2302 2302
                 : '';
2303 2303
         } elseif (isset($this->reboque)) {
2304
-            $texto = ! empty($this->reboque->getElementsByTagName("placa")->item(0)->nodeValue)
2304
+            $texto = !empty($this->reboque->getElementsByTagName("placa")->item(0)->nodeValue)
2305 2305
                 ? $this->reboque->getElementsByTagName("placa")->item(0)->nodeValue
2306 2306
                 : '';
2307 2307
         } else {
@@ -2310,17 +2310,17 @@  discard block
 block discarded – undo
2310 2310
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2311 2311
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2312 2312
         //UF
2313
-        $x     += $w2;
2313
+        $x += $w2;
2314 2314
         $w3    = round($maxW * 0.04, 0);
2315 2315
         $texto = 'UF';
2316 2316
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2317 2317
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'L', 1, '');
2318 2318
         if (isset($this->veicTransp)) {
2319
-            $texto = ! empty($this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue)
2319
+            $texto = !empty($this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue)
2320 2320
                 ? $this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue
2321 2321
                 : '';
2322 2322
         } elseif (isset($this->reboque)) {
2323
-            $texto = ! empty($this->reboque->getElementsByTagName("UF")->item(0)->nodeValue)
2323
+            $texto = !empty($this->reboque->getElementsByTagName("UF")->item(0)->nodeValue)
2324 2324
                 ? $this->reboque->getElementsByTagName("UF")->item(0)->nodeValue
2325 2325
                 : '';
2326 2326
         } else {
@@ -2329,20 +2329,20 @@  discard block
 block discarded – undo
2329 2329
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2330 2330
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'C', 0, '');
2331 2331
         //CNPJ / CPF
2332
-        $x     += $w3;
2332
+        $x += $w3;
2333 2333
         $w     = $maxW - ($w1 + 3 * $w2 + $w3);
2334 2334
         $texto = 'CNPJ / CPF';
2335 2335
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2336 2336
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
2337 2337
         if (isset($this->transporta)) {
2338
-            $texto = ! empty($this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue)
2338
+            $texto = !empty($this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue)
2339 2339
                 ? $this->formatField(
2340 2340
                     $this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue,
2341 2341
                     "##.###.###/####-##"
2342 2342
                 )
2343 2343
                 : '';
2344 2344
             if ($texto == '') {
2345
-                $texto = ! empty($this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue)
2345
+                $texto = !empty($this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue)
2346 2346
                     ? $this->formatField(
2347 2347
                         $this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue,
2348 2348
                         "###.###.###-##"
@@ -2356,7 +2356,7 @@  discard block
 block discarded – undo
2356 2356
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
2357 2357
         //#####################################################################
2358 2358
         //ENDEREÇO
2359
-        $y     += $h;
2359
+        $y += $h;
2360 2360
         $x     = $oldX;
2361 2361
         $h     = 7;
2362 2362
         $w1    = $maxW * 0.44;
@@ -2364,7 +2364,7 @@  discard block
 block discarded – undo
2364 2364
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2365 2365
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, '');
2366 2366
         if (isset($this->transporta)) {
2367
-            $texto = ! empty($this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue)
2367
+            $texto = !empty($this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue)
2368 2368
                 ? $this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue
2369 2369
                 : '';
2370 2370
         } else {
@@ -2373,13 +2373,13 @@  discard block
 block discarded – undo
2373 2373
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2374 2374
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'L', 0, '');
2375 2375
         //MUNICÍPIO
2376
-        $x     += $w1;
2376
+        $x += $w1;
2377 2377
         $w2    = round($maxW * 0.30, 0);
2378 2378
         $texto = 'MUNICÍPIO';
2379 2379
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2380 2380
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2381 2381
         if (isset($this->transporta)) {
2382
-            $texto = ! empty($this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue)
2382
+            $texto = !empty($this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue)
2383 2383
                 ? $this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue
2384 2384
                 : '';
2385 2385
         } else {
@@ -2388,13 +2388,13 @@  discard block
 block discarded – undo
2388 2388
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2389 2389
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2390 2390
         //UF
2391
-        $x     += $w2;
2391
+        $x += $w2;
2392 2392
         $w3    = round($maxW * 0.04, 0);
2393 2393
         $texto = 'UF';
2394 2394
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2395 2395
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'L', 1, '');
2396 2396
         if (isset($this->transporta)) {
2397
-            $texto = ! empty($this->transporta->getElementsByTagName("UF")->item(0)->nodeValue)
2397
+            $texto = !empty($this->transporta->getElementsByTagName("UF")->item(0)->nodeValue)
2398 2398
                 ? $this->transporta->getElementsByTagName("UF")->item(0)->nodeValue
2399 2399
                 : '';
2400 2400
         } else {
@@ -2403,14 +2403,14 @@  discard block
 block discarded – undo
2403 2403
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2404 2404
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'C', 0, '');
2405 2405
         //INSCRIÇÃO ESTADUAL
2406
-        $x     += $w3;
2406
+        $x += $w3;
2407 2407
         $w     = $maxW - ($w1 + $w2 + $w3);
2408 2408
         $texto = 'INSCRIÇÃO ESTADUAL';
2409 2409
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2410 2410
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
2411 2411
         $texto = '';
2412 2412
         if (isset($this->transporta)) {
2413
-            if (! empty($this->transporta->getElementsByTagName("IE")->item(0)->nodeValue)) {
2413
+            if (!empty($this->transporta->getElementsByTagName("IE")->item(0)->nodeValue)) {
2414 2414
                 $texto = $this->transporta->getElementsByTagName("IE")->item(0)->nodeValue;
2415 2415
             }
2416 2416
         }
@@ -2426,13 +2426,13 @@  discard block
 block discarded – undo
2426 2426
         $pesoBruto   = 0;
2427 2427
         $pesoLiquido = 0;
2428 2428
         foreach ($volumes as $volume) {
2429
-            $quantidade  += ! empty($volume->getElementsByTagName("qVol")->item(0)->nodeValue) ?
2429
+            $quantidade  += !empty($volume->getElementsByTagName("qVol")->item(0)->nodeValue) ?
2430 2430
                 $volume->getElementsByTagName("qVol")->item(0)->nodeValue : 0;
2431
-            $pesoBruto   += ! empty($volume->getElementsByTagName("pesoB")->item(0)->nodeValue) ?
2431
+            $pesoBruto   += !empty($volume->getElementsByTagName("pesoB")->item(0)->nodeValue) ?
2432 2432
                 $volume->getElementsByTagName("pesoB")->item(0)->nodeValue : 0;
2433
-            $pesoLiquido += ! empty($volume->getElementsByTagName("pesoL")->item(0)->nodeValue) ?
2433
+            $pesoLiquido += !empty($volume->getElementsByTagName("pesoL")->item(0)->nodeValue) ?
2434 2434
                 $volume->getElementsByTagName("pesoL")->item(0)->nodeValue : 0;
2435
-            $texto       = ! empty($this->transp->getElementsByTagName("esp")->item(0)->nodeValue) ?
2435
+            $texto = !empty($this->transp->getElementsByTagName("esp")->item(0)->nodeValue) ?
2436 2436
                 $this->transp->getElementsByTagName("esp")->item(0)->nodeValue : '';
2437 2437
             if ($texto != $especie && $especie != '') {
2438 2438
                 //tem várias especies
@@ -2440,7 +2440,7 @@  discard block
 block discarded – undo
2440 2440
             } else {
2441 2441
                 $especie = $texto;
2442 2442
             }
2443
-            $texto = ! empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue)
2443
+            $texto = !empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue)
2444 2444
                 ? $this->transp->getElementsByTagName("marca")->item(0)->nodeValue
2445 2445
                 : '';
2446 2446
             if ($texto != $marca && $marca != '') {
@@ -2449,7 +2449,7 @@  discard block
 block discarded – undo
2449 2449
             } else {
2450 2450
                 $marca = $texto;
2451 2451
             }
2452
-            $texto = ! empty($this->transp->getElementsByTagName("nVol")->item(0)->nodeValue)
2452
+            $texto = !empty($this->transp->getElementsByTagName("nVol")->item(0)->nodeValue)
2453 2453
                 ? $this->transp->getElementsByTagName("nVol")->item(0)->nodeValue
2454 2454
                 : '';
2455 2455
             if ($texto != $numero && $numero != '') {
@@ -2462,20 +2462,20 @@  discard block
 block discarded – undo
2462 2462
 
2463 2463
         //#####################################################################
2464 2464
         //QUANTIDADE
2465
-        $y     += $h;
2465
+        $y += $h;
2466 2466
         $x     = $oldX;
2467 2467
         $h     = 7;
2468 2468
         $w1    = round($maxW * 0.10, 0);
2469 2469
         $texto = 'QUANTIDADE';
2470 2470
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2471 2471
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, '');
2472
-        if (! empty($quantidade)) {
2472
+        if (!empty($quantidade)) {
2473 2473
             $texto = $quantidade;
2474 2474
             $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2475 2475
             $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'C', 0, '');
2476 2476
         }
2477 2477
         //ESPÉCIE
2478
-        $x     += $w1;
2478
+        $x += $w1;
2479 2479
         $w2    = round($maxW * 0.17, 0);
2480 2480
         $texto = 'ESPÉCIE';
2481 2481
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -2484,16 +2484,16 @@  discard block
 block discarded – undo
2484 2484
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2485 2485
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2486 2486
         //MARCA
2487
-        $x     += $w2;
2487
+        $x += $w2;
2488 2488
         $texto = 'MARCA';
2489 2489
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2490 2490
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2491
-        $texto = ! empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) ?
2491
+        $texto = !empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) ?
2492 2492
             $this->transp->getElementsByTagName("marca")->item(0)->nodeValue : '';
2493 2493
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2494 2494
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2495 2495
         //NUMERAÇÃO
2496
-        $x     += $w2;
2496
+        $x += $w2;
2497 2497
         $texto = 'NUMERAÇÃO';
2498 2498
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2499 2499
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -2501,7 +2501,7 @@  discard block
 block discarded – undo
2501 2501
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2502 2502
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2503 2503
         //PESO BRUTO
2504
-        $x     += $w2;
2504
+        $x += $w2;
2505 2505
         $w3    = round($maxW * 0.20, 0);
2506 2506
         $texto = 'PESO BRUTO';
2507 2507
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -2514,7 +2514,7 @@  discard block
 block discarded – undo
2514 2514
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2515 2515
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'R', 0, '');
2516 2516
         //PESO LÍQUIDO
2517
-        $x     += $w3;
2517
+        $x += $w3;
2518 2518
         $w     = $maxW - ($w1 + 3 * $w2 + $w3);
2519 2519
         $texto = 'PESO LÍQUIDO';
2520 2520
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -2534,11 +2534,11 @@  discard block
 block discarded – undo
2534 2534
     protected function descricaoProdutoHelper($origem, $campo, $formato)
2535 2535
     {
2536 2536
         $valor_original = $origem->getElementsByTagName($campo)->item(0);
2537
-        if (! isset($valor_original)) {
2537
+        if (!isset($valor_original)) {
2538 2538
             return "";
2539 2539
         }
2540 2540
         $valor_original = $valor_original->nodeValue;
2541
-        $valor          = ! empty($valor_original) ? number_format($valor_original, 2, ",", ".") : '';
2541
+        $valor          = !empty($valor_original) ? number_format($valor_original, 2, ",", ".") : '';
2542 2542
 
2543 2543
         if ($valor != "") {
2544 2544
             return sprintf($formato, $valor);
@@ -2564,7 +2564,7 @@  discard block
 block discarded – undo
2564 2564
         $ICMSUFDest = $itemProd->getElementsByTagName("ICMSUFDest")->item(0);
2565 2565
         $impostos   = '';
2566 2566
 
2567
-        if (! empty($ICMS)) {
2567
+        if (!empty($ICMS)) {
2568 2568
             $impostos .= $this->descricaoProdutoHelper($ICMS, "vBCFCP", " BcFcp=%s");
2569 2569
             $impostos .= $this->descricaoProdutoHelper($ICMS, "pFCP", " pFcp=%s%%");
2570 2570
             $impostos .= $this->descricaoProdutoHelper($ICMS, "vFCP", " vFcp=%s");
@@ -2580,7 +2580,7 @@  discard block
 block discarded – undo
2580 2580
             $impostos .= $this->descricaoProdutoHelper($ICMS, "pST", " pSt=%s");
2581 2581
             $impostos .= $this->descricaoProdutoHelper($ICMS, "vICMSSTRet", " VALOR ICMS ST=%s");
2582 2582
         }
2583
-        if (! empty($ICMSUFDest)) {
2583
+        if (!empty($ICMSUFDest)) {
2584 2584
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pFCPUFDest", " pFCPUFDest=%s%%");
2585 2585
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pICMSUFDest", " pICMSUFDest=%s%%");
2586 2586
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pICMSInterPart", " pICMSInterPart=%s%%");
@@ -2588,20 +2588,20 @@  discard block
 block discarded – undo
2588 2588
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "vICMSUFDest", " vICMSUFDest=%s");
2589 2589
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "vICMSUFRemet", " vICMSUFRemet=%s");
2590 2590
         }
2591
-        $infAdProd = ! empty($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue)
2591
+        $infAdProd = !empty($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue)
2592 2592
             ? substr(
2593 2593
                 $this->anfaveaDANFE($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue),
2594 2594
                 0,
2595 2595
                 500
2596 2596
             )
2597 2597
             : '';
2598
-        if (! empty($infAdProd)) {
2598
+        if (!empty($infAdProd)) {
2599 2599
             $infAdProd = trim($infAdProd);
2600 2600
             $infAdProd .= ' ';
2601 2601
         }
2602 2602
         $loteTxt = '';
2603 2603
         $rastro  = $prod->getElementsByTagName("med");
2604
-        if (! empty($prod->getElementsByTagName("rastro"))) {
2604
+        if (!empty($prod->getElementsByTagName("rastro"))) {
2605 2605
             $rastro = $prod->getElementsByTagName("rastro");
2606 2606
             $i      = 0;
2607 2607
             while ($i < $rastro->length) {
@@ -2610,14 +2610,14 @@  discard block
 block discarded – undo
2610 2610
                 $loteTxt .= $this->getTagDate($rastro->item($i), 'dFab', ' Fab: ');
2611 2611
                 $loteTxt .= $this->getTagDate($rastro->item($i), 'dVal', ' Val: ');
2612 2612
                 $loteTxt .= $this->getTagValue($rastro->item($i), 'vPMC', ' PMC: ');
2613
-                $i ++;
2613
+                $i++;
2614 2614
             }
2615 2615
             if ($loteTxt != '') {
2616 2616
                 $loteTxt .= ' ';
2617 2617
             }
2618 2618
         }
2619 2619
         //NT2013.006 FCI
2620
-        $nFCI   = (! empty($itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue)) ?
2620
+        $nFCI   = (!empty($itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue)) ?
2621 2621
             ' FCI:' . $itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue : '';
2622 2622
         $tmp_ad = $infAdProd . ($this->descProdInfoComplemento ? $loteTxt . $impostos . $nFCI : '');
2623 2623
         $texto  = $prod->getElementsByTagName("xProd")->item(0)->nodeValue
@@ -2667,7 +2667,7 @@  discard block
 block discarded – undo
2667 2667
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
2668 2668
         $y += 3;
2669 2669
         //desenha a caixa dos dados dos itens da NF
2670
-        $hmax  += 1;
2670
+        $hmax += 1;
2671 2671
         $texto = '';
2672 2672
         $this->pdf->textBox($x, $y, $w, $hmax);
2673 2673
         //##################################################################################
@@ -2680,101 +2680,101 @@  discard block
 block discarded – undo
2680 2680
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2681 2681
         $this->pdf->line($x + $w1, $y, $x + $w1, $y + $hmax);
2682 2682
         //DESCRIÇÃO DO PRODUTO / SERVIÇO
2683
-        $x     += $w1;
2683
+        $x += $w1;
2684 2684
         $w2    = round($w * 0.25, 0);
2685 2685
         $texto = 'DESCRIÇÃO DO PRODUTO / SERVIÇO';
2686 2686
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2687 2687
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2688 2688
         $this->pdf->line($x + $w2, $y, $x + $w2, $y + $hmax);
2689 2689
         //NCM/SH
2690
-        $x     += $w2;
2690
+        $x += $w2;
2691 2691
         $w3    = round($w * 0.06, 0);
2692 2692
         $texto = 'NCM/SH';
2693 2693
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2694 2694
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2695 2695
         $this->pdf->line($x + $w3, $y, $x + $w3, $y + $hmax);
2696 2696
         //O/CST ou O/CSOSN
2697
-        $x     += $w3;
2697
+        $x += $w3;
2698 2698
         $w4    = round($w * 0.05, 0);
2699
-        $texto = 'O/CSOSN';//Regime do Simples CRT = 1 ou CRT = 2
2699
+        $texto = 'O/CSOSN'; //Regime do Simples CRT = 1 ou CRT = 2
2700 2700
         if ($this->getTagValue($this->emit, 'CRT') == '3') {
2701
-            $texto = 'O/CST';//Regime Normal
2701
+            $texto = 'O/CST'; //Regime Normal
2702 2702
         }
2703 2703
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2704 2704
         $this->pdf->textBox($x, $y, $w4, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2705 2705
         $this->pdf->line($x + $w4, $y, $x + $w4, $y + $hmax);
2706 2706
         //CFOP
2707
-        $x     += $w4;
2707
+        $x += $w4;
2708 2708
         $w5    = round($w * 0.04, 0);
2709 2709
         $texto = 'CFOP';
2710 2710
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2711 2711
         $this->pdf->textBox($x, $y, $w5, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2712 2712
         $this->pdf->line($x + $w5, $y, $x + $w5, $y + $hmax);
2713 2713
         //UN
2714
-        $x     += $w5;
2714
+        $x += $w5;
2715 2715
         $w6    = round($w * 0.03, 0);
2716 2716
         $texto = 'UN';
2717 2717
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2718 2718
         $this->pdf->textBox($x, $y, $w6, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2719 2719
         $this->pdf->line($x + $w6, $y, $x + $w6, $y + $hmax);
2720 2720
         //QUANT
2721
-        $x     += $w6;
2721
+        $x += $w6;
2722 2722
         $w7    = round($w * 0.08, 0);
2723 2723
         $texto = 'QUANT';
2724 2724
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2725 2725
         $this->pdf->textBox($x, $y, $w7, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2726 2726
         $this->pdf->line($x + $w7, $y, $x + $w7, $y + $hmax);
2727 2727
         //VALOR UNIT
2728
-        $x     += $w7;
2728
+        $x += $w7;
2729 2729
         $w8    = round($w * 0.06, 0);
2730 2730
         $texto = 'VALOR UNIT';
2731 2731
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2732 2732
         $this->pdf->textBox($x, $y, $w8, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2733 2733
         $this->pdf->line($x + $w8, $y, $x + $w8, $y + $hmax);
2734 2734
         //VALOR TOTAL
2735
-        $x     += $w8;
2735
+        $x += $w8;
2736 2736
         $w9    = round($w * 0.06, 0);
2737 2737
         $texto = 'VALOR TOTAL';
2738 2738
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2739 2739
         $this->pdf->textBox($x, $y, $w9, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2740 2740
         $this->pdf->line($x + $w9, $y, $x + $w9, $y + $hmax);
2741 2741
         //VALOR DESCONTO
2742
-        $x     += $w9;
2742
+        $x += $w9;
2743 2743
         $w10   = round($w * 0.05, 0);
2744 2744
         $texto = 'VALOR DESC';
2745 2745
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2746 2746
         $this->pdf->textBox($x, $y, $w10, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2747 2747
         $this->pdf->line($x + $w10, $y, $x + $w10, $y + $hmax);
2748 2748
         //B.CÁLC ICMS
2749
-        $x     += $w10;
2749
+        $x += $w10;
2750 2750
         $w11   = round($w * 0.06, 0);
2751 2751
         $texto = 'B.CÁLC ICMS';
2752 2752
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2753 2753
         $this->pdf->textBox($x, $y, $w11, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2754 2754
         $this->pdf->line($x + $w11, $y, $x + $w11, $y + $hmax);
2755 2755
         //VALOR ICMS
2756
-        $x     += $w11;
2756
+        $x += $w11;
2757 2757
         $w12   = round($w * 0.06, 0);
2758 2758
         $texto = 'VALOR ICMS';
2759 2759
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2760 2760
         $this->pdf->textBox($x, $y, $w12, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2761 2761
         $this->pdf->line($x + $w12, $y, $x + $w12, $y + $hmax);
2762 2762
         //VALOR IPI
2763
-        $x     += $w12;
2763
+        $x += $w12;
2764 2764
         $w13   = round($w * 0.05, 0);
2765 2765
         $texto = 'VALOR IPI';
2766 2766
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2767 2767
         $this->pdf->textBox($x, $y, $w13, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2768 2768
         $this->pdf->line($x + $w13, $y, $x + $w13, $y + $hmax);
2769 2769
         //ALÍQ. ICMS
2770
-        $x     += $w13;
2770
+        $x += $w13;
2771 2771
         $w14   = round($w * 0.04, 0);
2772 2772
         $texto = 'ALÍQ. ICMS';
2773 2773
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2774 2774
         $this->pdf->textBox($x, $y, $w14, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2775 2775
         $this->pdf->line($x + $w14, $y, $x + $w14, $y + $hmax);
2776 2776
         //ALÍQ. IPI
2777
-        $x     += $w14;
2777
+        $x += $w14;
2778 2778
         $w15   = $w - ($w1 + $w2 + $w3 + $w4 + $w5 + $w6 + $w7 + $w8 + $w9 + $w10 + $w11 + $w12 + $w13 + $w14);
2779 2779
         $texto = 'ALÍQ. IPI';
2780 2780
         $this->pdf->textBox($x, $y, $w15, $h, $texto, $aFont, 'C', 'C', 0, '', false);
@@ -2798,7 +2798,7 @@  discard block
 block discarded – undo
2798 2798
 
2799 2799
                 // Posição y dos dados das unidades tributaveis.
2800 2800
                 $yTrib = $this->pdf->fontSize + .5;
2801
-                if (! $this->mostrarUnidadeTributavel) {
2801
+                if (!$this->mostrarUnidadeTributavel) {
2802 2802
                     $yTrib = 0;
2803 2803
                 }
2804 2804
                 $h      = $this->calculeHeight($thisItem);
@@ -2833,7 +2833,7 @@  discard block
 block discarded – undo
2833 2833
                 }
2834 2834
                 $x += $w2;
2835 2835
                 //NCM
2836
-                $texto = ! empty($prod->getElementsByTagName("NCM")->item(0)->nodeValue) ?
2836
+                $texto = !empty($prod->getElementsByTagName("NCM")->item(0)->nodeValue) ?
2837 2837
                     $prod->getElementsByTagName("NCM")->item(0)->nodeValue : '';
2838 2838
                 $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'C', 0, '');
2839 2839
                 $x += $w3;
@@ -2846,17 +2846,17 @@  discard block
 block discarded – undo
2846 2846
                     $this->pdf->textBox($x, $y, $w4, $h, $texto, $aFont, 'T', 'C', 0, '');
2847 2847
                 }
2848 2848
                 //CFOP
2849
-                $x     += $w4;
2849
+                $x += $w4;
2850 2850
                 $texto = $prod->getElementsByTagName("CFOP")->item(0)->nodeValue;
2851 2851
                 $this->pdf->textBox($x, $y, $w5, $h, $texto, $aFont, 'T', 'C', 0, '');
2852 2852
                 //Unidade
2853
-                $x     += $w5;
2853
+                $x += $w5;
2854 2854
                 $texto = $prod->getElementsByTagName("uCom")->item(0)->nodeValue;
2855 2855
                 $this->pdf->textBox($x, $y, $w6, $h, $texto, $aFont, 'T', 'C', 0, '');
2856 2856
                 //Unidade de medida tributável
2857 2857
                 if ($this->mostrarUnidadeTributavel) {
2858 2858
                     $uTrib = $prod->getElementsByTagName("uTrib")->item(0);
2859
-                    if (! empty($uTrib)) {
2859
+                    if (!empty($uTrib)) {
2860 2860
                         $texto = $uTrib->nodeValue;
2861 2861
                         $this->pdf->textBox($x, $yTrib, $w6, $h, $texto, $aFont, 'T', 'C', 0, '');
2862 2862
                     }
@@ -2874,7 +2874,7 @@  discard block
 block discarded – undo
2874 2874
                 // QTDADE Tributável
2875 2875
                 if ($this->mostrarUnidadeTributavel) {
2876 2876
                     $qTrib = $prod->getElementsByTagName("qTrib")->item(0);
2877
-                    if (! empty($qTrib)) {
2877
+                    if (!empty($qTrib)) {
2878 2878
                         $texto = number_format($qTrib->nodeValue, $this->qComCasasDec, ",", ".");
2879 2879
                         $this->pdf->textBox($x, $yTrib, $w7, $h, $texto, $aFont, 'T', $alinhamento, 0, '');
2880 2880
                     }
@@ -2887,7 +2887,7 @@  discard block
 block discarded – undo
2887 2887
                 // Valor Unitário Tributável
2888 2888
                 if ($this->mostrarUnidadeTributavel) {
2889 2889
                     $vUnTrib = $prod->getElementsByTagName("vUnTrib")->item(0);
2890
-                    if (! empty($vUnTrib)) {
2890
+                    if (!empty($vUnTrib)) {
2891 2891
                         $texto = number_format($vUnTrib->nodeValue, $this->vUnComCasasDec, ",", ".");
2892 2892
                         $this->pdf->textBox($x, $yTrib, $w8, $h, $texto, $aFont, 'T', $alinhamento, 0, '');
2893 2893
                     }
@@ -2901,7 +2901,7 @@  discard block
 block discarded – undo
2901 2901
                 $this->pdf->textBox($x, $y, $w9, $h, $texto, $aFont, 'T', $alinhamento, 0, '');
2902 2902
                 $x += $w9;
2903 2903
                 //Valor do Desconto
2904
-                $vdesc = ! empty($prod->getElementsByTagName("vDesc")->item(0)->nodeValue)
2904
+                $vdesc = !empty($prod->getElementsByTagName("vDesc")->item(0)->nodeValue)
2905 2905
                     ? $prod->getElementsByTagName("vDesc")->item(0)->nodeValue : 0;
2906 2906
 
2907 2907
                 $texto = number_format($vdesc, 2, ",", ".");
@@ -2909,7 +2909,7 @@  discard block
 block discarded – undo
2909 2909
                 //Valor da Base de calculo
2910 2910
                 $x += $w10;
2911 2911
                 if (isset($ICMS)) {
2912
-                    $texto = ! empty($ICMS->getElementsByTagName("vBC")->item(0)->nodeValue)
2912
+                    $texto = !empty($ICMS->getElementsByTagName("vBC")->item(0)->nodeValue)
2913 2913
                         ? number_format(
2914 2914
                             $ICMS->getElementsByTagName("vBC")->item(0)->nodeValue,
2915 2915
                             2,
@@ -2922,7 +2922,7 @@  discard block
 block discarded – undo
2922 2922
                 //Valor do ICMS
2923 2923
                 $x += $w11;
2924 2924
                 if (isset($ICMS)) {
2925
-                    $texto = ! empty($ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue)
2925
+                    $texto = !empty($ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue)
2926 2926
                         ? number_format(
2927 2927
                             $ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue,
2928 2928
                             2,
@@ -2935,7 +2935,7 @@  discard block
 block discarded – undo
2935 2935
                 //Valor do IPI
2936 2936
                 $x += $w12;
2937 2937
                 if (isset($IPI)) {
2938
-                    $texto = ! empty($IPI->getElementsByTagName("vIPI")->item(0)->nodeValue)
2938
+                    $texto = !empty($IPI->getElementsByTagName("vIPI")->item(0)->nodeValue)
2939 2939
                         ? number_format(
2940 2940
                             $IPI->getElementsByTagName("vIPI")->item(0)->nodeValue,
2941 2941
                             2,
@@ -2950,7 +2950,7 @@  discard block
 block discarded – undo
2950 2950
                 // %ICMS
2951 2951
                 $x += $w13;
2952 2952
                 if (isset($ICMS)) {
2953
-                    $texto = ! empty($ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue)
2953
+                    $texto = !empty($ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue)
2954 2954
                         ? number_format(
2955 2955
                             $ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue,
2956 2956
                             2,
@@ -2963,7 +2963,7 @@  discard block
 block discarded – undo
2963 2963
                 //%IPI
2964 2964
                 $x += $w14;
2965 2965
                 if (isset($IPI)) {
2966
-                    $texto = ! empty($IPI->getElementsByTagName("pIPI")->item(0)->nodeValue)
2966
+                    $texto = !empty($IPI->getElementsByTagName("pIPI")->item(0)->nodeValue)
2967 2967
                         ? number_format(
2968 2968
                             $IPI->getElementsByTagName("pIPI")->item(0)->nodeValue,
2969 2969
                             2,
@@ -2981,17 +2981,17 @@  discard block
 block discarded – undo
2981 2981
                 $veicProd = $prod->getElementsByTagName("veicProd")->item(0);
2982 2982
                 // Tag somente é gerada para veiculo 0k, e só é permitido um veiculo por NF-e por conta do detran
2983 2983
                 // Verifica se a Tag existe
2984
-                if (! empty($veicProd)) {
2984
+                if (!empty($veicProd)) {
2985 2985
                     $this->dadosItenVeiculoDANFE($oldX, $y, $nInicio, $h, $prod);
2986 2986
                 }
2987 2987
 
2988 2988
 
2989 2989
                 $y += $h;
2990
-                $i ++;
2990
+                $i++;
2991 2991
                 //incrementa o controle dos itens processados.
2992
-                $this->qtdeItensProc ++;
2992
+                $this->qtdeItensProc++;
2993 2993
             } else {
2994
-                $i ++;
2994
+                $i++;
2995 2995
             }
2996 2996
         }
2997 2997
 
@@ -3196,23 +3196,23 @@  discard block
 block discarded – undo
3196 3196
         $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B'];
3197 3197
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
3198 3198
         //INSCRIÇÃO MUNICIPAL
3199
-        $y     += 3;
3199
+        $y += 3;
3200 3200
         $w     = round($this->wPrint * 0.23, 0);
3201 3201
         $texto = 'INSCRIÇÃO MUNICIPAL';
3202 3202
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3203 3203
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3204 3204
         //inscrição municipal
3205
-        $texto = ! empty($this->emit->getElementsByTagName("IM")->item(0)->nodeValue) ?
3205
+        $texto = !empty($this->emit->getElementsByTagName("IM")->item(0)->nodeValue) ?
3206 3206
             $this->emit->getElementsByTagName("IM")->item(0)->nodeValue : '';
3207 3207
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
3208 3208
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
3209 3209
         //VALOR TOTAL DOS SERVIÇOS
3210
-        $x     += $w;
3210
+        $x += $w;
3211 3211
         $texto = 'VALOR TOTAL DOS SERVIÇOS';
3212 3212
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3213 3213
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3214 3214
         if (isset($this->ISSQNtot)) {
3215
-            $texto = ! empty($this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue) ?
3215
+            $texto = !empty($this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue) ?
3216 3216
                 $this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue : '';
3217 3217
             $texto = number_format($texto, 2, ",", ".");
3218 3218
         } else {
@@ -3221,14 +3221,14 @@  discard block
 block discarded – undo
3221 3221
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
3222 3222
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'R', 0, '');
3223 3223
         //BASE DE CÁLCULO DO ISSQN
3224
-        $x     += $w;
3224
+        $x += $w;
3225 3225
         $texto = 'BASE DE CÁLCULO DO ISSQN';
3226 3226
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3227 3227
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3228 3228
         if (isset($this->ISSQNtot)) {
3229
-            $texto = ! empty($this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue) ?
3229
+            $texto = !empty($this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue) ?
3230 3230
                 $this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue : '';
3231
-            $texto = ! empty($texto) ? number_format($texto, 2, ",", ".") : '';
3231
+            $texto = !empty($texto) ? number_format($texto, 2, ",", ".") : '';
3232 3232
         } else {
3233 3233
             $texto = '';
3234 3234
         }
@@ -3245,9 +3245,9 @@  discard block
 block discarded – undo
3245 3245
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3246 3246
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3247 3247
         if (isset($this->ISSQNtot)) {
3248
-            $texto = ! empty($this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue) ?
3248
+            $texto = !empty($this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue) ?
3249 3249
                 $this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue : '';
3250
-            $texto = ! empty($texto) ? number_format($texto, 2, ",", ".") : '';
3250
+            $texto = !empty($texto) ? number_format($texto, 2, ",", ".") : '';
3251 3251
         } else {
3252 3252
             $texto = '';
3253 3253
         }
@@ -3286,7 +3286,7 @@  discard block
 block discarded – undo
3286 3286
 
3287 3287
         //INFORMAÇÕES COMPLEMENTARES
3288 3288
         $texto = "INFORMAÇÕES COMPLEMENTARES";
3289
-        $y     += 3;
3289
+        $y += 3;
3290 3290
         $w     = $this->wAdic;
3291 3291
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => 'B'];
3292 3292
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -3296,7 +3296,7 @@  discard block
 block discarded – undo
3296 3296
         //$this->textoAdic com o texto completo do campo
3297 3297
         //echo str_replace("\n", "<br>",$this->textoAdic);
3298 3298
         //die;
3299
-        $y     += 1;
3299
+        $y += 1;
3300 3300
         $aFont = ['font' => $this->fontePadrao, 'size' => $this->textadicfontsize * $this->pdf->k, 'style' => ''];
3301 3301
         //$aFont = ['font'=>$this->fontePadrao, 'size'=> 5, 'style'=>''];
3302 3302
         $this->pdf->textBox($x, $y + 2, $w - 2, $h, $this->textoAdic, $aFont, 'T', 'L', 0, '', false);
@@ -3347,7 +3347,7 @@  discard block
 block discarded – undo
3347 3347
                 $texto = 'CONTINGÊNCIA SVC-RS' . $dhCont . $xJust;
3348 3348
                 break;
3349 3349
         }
3350
-        $y     += 2;
3350
+        $y += 2;
3351 3351
         $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => ''];
3352 3352
         $this->pdf->textBox($x, $y, $w - 2, $h, $texto, $aFont, 'T', 'L', 0, '', false);
3353 3353
 
@@ -3402,7 +3402,7 @@  discard block
 block discarded – undo
3402 3402
         $tpNF = $this->ide->getElementsByTagName('tpNF')->item(0)->nodeValue;
3403 3403
         if ($tpNF == '0') {
3404 3404
             //NFe de Entrada
3405
-            $emitente     = '';
3405
+            $emitente = '';
3406 3406
             $emitente     .= $this->dest->getElementsByTagName("xNome")->item(0)->nodeValue . " - ";
3407 3407
             $emitente     .= $this->enderDest->getElementsByTagName("xLgr")->item(0)->nodeValue . ", ";
3408 3408
             $emitente     .= $this->enderDest->getElementsByTagName("nro")->item(0)->nodeValue . " - ";
@@ -3455,10 +3455,10 @@  discard block
 block discarded – undo
3455 3455
             $texto .= "AO LADO";
3456 3456
         }
3457 3457
         $texto .= ". EMISSÃO: ";
3458
-        $dEmi  = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3458
+        $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3459 3459
             $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue : '';
3460 3460
         if ($dEmi == '') {
3461
-            $dEmi  = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3461
+            $dEmi  = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3462 3462
                 $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue : '';
3463 3463
             $aDemi = explode('T', $dEmi);
3464 3464
             $dEmi  = $aDemi[0];
@@ -3481,12 +3481,12 @@  discard block
 block discarded – undo
3481 3481
             $this->pdf->textBox($x1, $y, $w1, 18, $texto, $aFont, 'C', 'C', 1, '');
3482 3482
             //DATA DE RECEBIMENTO
3483 3483
             $texto = "DATA DE RECEBIMENTO";
3484
-            $y     += $h;
3484
+            $y += $h;
3485 3485
             $w2    = round($this->wPrint * 0.17, 0); //35;
3486 3486
             $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3487 3487
             $this->pdf->textBox($x, $y, $w2, 8, $texto, $aFont, 'T', 'L', 1, '');
3488 3488
             //IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR
3489
-            $x     += $w2;
3489
+            $x += $w2;
3490 3490
             $w3    = $w - $w2;
3491 3491
             $texto = "IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR";
3492 3492
             $this->pdf->textBox($x, $y, $w3, 8, $texto, $aFont, 'T', 'L', 1, '');
@@ -3497,7 +3497,7 @@  discard block
 block discarded – undo
3497 3497
 
3498 3498
             return $y;
3499 3499
         } else {
3500
-            $x --;
3500
+            $x--;
3501 3501
             $x = $this->pdf->textBox90($x, $y, $w - 1, $h, $texto, $aFontSmall, 'C', 'L', 0, '', false);
3502 3502
             //NUMERO DA NOTA FISCAL LOGO NFE
3503 3503
             $w1    = 18;
@@ -3518,7 +3518,7 @@  discard block
 block discarded – undo
3518 3518
             $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3519 3519
             $this->pdf->textBox90($x, $y, $w2, 8, $texto, $aFont, 'T', 'L', 1, '');
3520 3520
             //IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR
3521
-            $y     -= $w2;
3521
+            $y -= $w2;
3522 3522
             $w3    = $w - $w2;
3523 3523
             $texto = "IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR";
3524 3524
             $aFont = ['font' => $this->fontePadrao, 'size' => 5.7, 'style' => ''];
@@ -3539,18 +3539,18 @@  discard block
 block discarded – undo
3539 3539
      */
3540 3540
     protected function geraInformacoesDaTagCompra()
3541 3541
     {
3542
-        if (! $this->gerarInformacoesAutomaticas) {
3542
+        if (!$this->gerarInformacoesAutomaticas) {
3543 3543
             return '';
3544 3544
         }
3545 3545
         $saida = "";
3546 3546
         if (isset($this->compra)) {
3547
-            if (! empty($this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue)) {
3547
+            if (!empty($this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue)) {
3548 3548
                 $saida .= " Nota de Empenho: " . $this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue;
3549 3549
             }
3550
-            if (! empty($this->compra->getElementsByTagName("xPed")->item(0)->nodeValue)) {
3550
+            if (!empty($this->compra->getElementsByTagName("xPed")->item(0)->nodeValue)) {
3551 3551
                 $saida .= " Pedido: " . $this->compra->getElementsByTagName("xPed")->item(0)->nodeValue;
3552 3552
             }
3553
-            if (! empty($this->compra->getElementsByTagName("xCont")->item(0)->nodeValue)) {
3553
+            if (!empty($this->compra->getElementsByTagName("xCont")->item(0)->nodeValue)) {
3554 3554
                 $saida .= " Contrato: " . $this->compra->getElementsByTagName("xCont")->item(0)->nodeValue;
3555 3555
             }
3556 3556
         }
@@ -3581,10 +3581,10 @@  discard block
 block discarded – undo
3581 3581
         if ($icmss > 0) {
3582 3582
             $icmss = 1;
3583 3583
         }
3584
-        $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3584
+        $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3585 3585
             $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue : '';
3586 3586
         if ($dEmi == '') {
3587
-            $dEmi  = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3587
+            $dEmi  = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3588 3588
                 $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue : '';
3589 3589
             $aDemi = explode('T', $dEmi);
3590 3590
             $dEmi  = $aDemi[0];
@@ -3608,7 +3608,7 @@  discard block
 block discarded – undo
3608 3608
      */
3609 3609
     protected function geraInformacoesDasNotasReferenciadas()
3610 3610
     {
3611
-        if (! $this->gerarInformacoesAutomaticas) {
3611
+        if (!$this->gerarInformacoesAutomaticas) {
3612 3612
             return '';
3613 3613
         }
3614 3614
         $formaNfeRef = "\r\nNFe Ref.: série:%d número:%d emit:%s em %s [%s]";
@@ -3636,7 +3636,7 @@  discard block
 block discarded – undo
3636 3636
                 $cnpj          = $this->formatField(substr($chave_acesso, 6, 14), "##.###.###/####-##");
3637 3637
                 $serie         = substr($chave_acesso, 22, 3);
3638 3638
                 $numero        = substr($chave_acesso, 25, 9);
3639
-                $saida         .= sprintf($formaNfeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3639
+                $saida .= sprintf($formaNfeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3640 3640
             }
3641 3641
             $refNF = $nfRef->getElementsByTagName('refNF');
3642 3642
             foreach ($refNF as $umaRefNFe) {
@@ -3647,7 +3647,7 @@  discard block
 block discarded – undo
3647 3647
                 $numero = $umaRefNFe->getElementsByTagName('nNF')->item(0)->nodeValue;
3648 3648
                 $data   = substr($data, 2, 2) . "/20" . substr($data, 0, 2);
3649 3649
                 $cnpj   = $this->formatField($cnpj, "##.###.###/####-##");
3650
-                $saida  .= sprintf($formaNfRef, $serie, $numero, $cnpj, $data, $mod);
3650
+                $saida .= sprintf($formaNfRef, $serie, $numero, $cnpj, $data, $mod);
3651 3651
             }
3652 3652
             $refCTe = $nfRef->getElementsByTagName('refCTe');
3653 3653
             foreach ($refCTe as $chave_acessoRef) {
@@ -3657,7 +3657,7 @@  discard block
 block discarded – undo
3657 3657
                 $cnpj          = $this->formatField(substr($chave_acesso, 6, 14), "##.###.###/####-##");
3658 3658
                 $serie         = substr($chave_acesso, 22, 3);
3659 3659
                 $numero        = substr($chave_acesso, 25, 9);
3660
-                $saida         .= sprintf($formaCTeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3660
+                $saida .= sprintf($formaCTeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3661 3661
             }
3662 3662
             $refECF = $nfRef->getElementsByTagName('refECF');
3663 3663
             foreach ($refECF as $umaRefNFe) {
@@ -3669,10 +3669,9 @@  discard block
 block discarded – undo
3669 3669
             $refNFP = $nfRef->getElementsByTagName('refNFP');
3670 3670
             foreach ($refNFP as $umaRefNFe) {
3671 3671
                 $data   = $umaRefNFe->getElementsByTagName('AAMM')->item(0)->nodeValue;
3672
-                $cnpj   = ! empty($umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue) ?
3673
-                    $umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue :
3674
-                    '';
3675
-                $cpf    = ! empty($umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue) ?
3672
+                $cnpj   = !empty($umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue) ?
3673
+                    $umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue : '';
3674
+                $cpf    = !empty($umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue) ?
3676 3675
                     $umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue : '';
3677 3676
                 $mod    = $umaRefNFe->getElementsByTagName('mod')->item(0)->nodeValue;
3678 3677
                 $serie  = $umaRefNFe->getElementsByTagName('serie')->item(0)->nodeValue;
@@ -3694,7 +3693,7 @@  discard block
 block discarded – undo
3694 3693
     private function loadDoc($xml)
3695 3694
     {
3696 3695
         $this->xml = $xml;
3697
-        if (! empty($xml)) {
3696
+        if (!empty($xml)) {
3698 3697
             $this->dom = new Dom();
3699 3698
             $this->dom->loadXML($this->xml);
3700 3699
             if (empty($this->dom->getElementsByTagName("infNFe")->item(0))) {
Please login to merge, or discard this patch.
src/Legacy/FPDF/Fpdf181.php 1 patch
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.