Passed
Pull Request — master (#228)
by Roberto
03:23
created
src/CTe/DacteV3.php 2 patches
Doc Comments   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      * @param string $sDestino Estabelece a direção do envio do documento PDF
110 110
      * @param string $sDirPDF Caminho para o diretorio de armaz. dos PDF
111 111
      * @param string $fonteDACTE Nome da fonte a ser utilizada
112
-     * @param number $mododebug 0-Não 1-Sim e 2-nada (2 default)
112
+     * @param integer $mododebug 0-Não 1-Sim e 2-nada (2 default)
113 113
      * @param string $preVisualizar 0-Não 1-Sim
114 114
      * @param string $nomeDesenvolvedor Nome do desenvolvedor
115 115
      * @param string $siteDesenvolvedor Site do desenvolvedor
@@ -579,8 +579,8 @@  discard block
 block discarded – undo
579 579
      * zCabecalho
580 580
      * Monta o cabelhalho da DACTE ( retrato e paisagem )
581 581
      *
582
-     * @param  number $x Posição horizontal inicial, canto esquerdo
583
-     * @param  number $y Posição vertical inicial, canto superior
582
+     * @param  integer $x Posição horizontal inicial, canto esquerdo
583
+     * @param  integer $y Posição vertical inicial, canto superior
584 584
      * @param  number $pag Número da Página
585 585
      * @param  number $totPag Total de páginas
586 586
      * @return number Posição vertical final
@@ -1231,8 +1231,7 @@  discard block
 block discarded – undo
1231 1231
      * rodapeDACTE
1232 1232
      * Monta o rodape no final da DACTE ( retrato e paisagem )
1233 1233
      *
1234
-     * @param number $xInic Posição horizontal canto esquerdo
1235
-     * @param number $yFinal Posição vertical final para impressão
1234
+     * @param integer $x
1236 1235
      */
1237 1236
     protected function zRodape($x, $y)
1238 1237
     {
@@ -1255,8 +1254,8 @@  discard block
 block discarded – undo
1255 1254
      * zRemetente
1256 1255
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1257 1256
      *
1258
-     * @param  number $x Posição horizontal canto esquerdo
1259
-     * @param  number $y Posição vertical canto superior
1257
+     * @param  integer $x Posição horizontal canto esquerdo
1258
+     * @param  integer $y Posição vertical canto superior
1260 1259
      * @return number Posição vertical final
1261 1260
      */
1262 1261
     protected function zRemetente($x = 0, $y = 0)
@@ -1343,8 +1342,8 @@  discard block
 block discarded – undo
1343 1342
      * zDestinatario
1344 1343
      * Monta o campo com os dados do destinatário na DACTE.
1345 1344
      *
1346
-     * @param  number $x Posição horizontal canto esquerdo
1347
-     * @param  number $y Posição vertical canto superior
1345
+     * @param  integer $x Posição horizontal canto esquerdo
1346
+     * @param  integer $y Posição vertical canto superior
1348 1347
      * @return number Posição vertical final
1349 1348
      */
1350 1349
     protected function zDestinatario($x = 0, $y = 0)
@@ -1430,8 +1429,8 @@  discard block
 block discarded – undo
1430 1429
      * zExpedidor
1431 1430
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1432 1431
      *
1433
-     * @param  number $x Posição horizontal canto esquerdo
1434
-     * @param  number $y Posição vertical canto superior
1432
+     * @param  integer $x Posição horizontal canto esquerdo
1433
+     * @param  integer $y Posição vertical canto superior
1435 1434
      * @return number Posição vertical final
1436 1435
      */
1437 1436
     protected function zExpedidor($x = 0, $y = 0)
@@ -1527,8 +1526,8 @@  discard block
 block discarded – undo
1527 1526
      * zRecebedor
1528 1527
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1529 1528
      *
1530
-     * @param  number $x Posição horizontal canto esquerdo
1531
-     * @param  number $y Posição vertical canto superior
1529
+     * @param  integer $x Posição horizontal canto esquerdo
1530
+     * @param  integer $y Posição vertical canto superior
1532 1531
      * @return number Posição vertical final
1533 1532
      */
1534 1533
     protected function zRecebedor($x = 0, $y = 0)
@@ -1624,8 +1623,8 @@  discard block
 block discarded – undo
1624 1623
      * zTomador
1625 1624
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1626 1625
      *
1627
-     * @param  number $x Posição horizontal canto esquerdo
1628
-     * @param  number $y Posição vertical canto superior
1626
+     * @param  integer $x Posição horizontal canto esquerdo
1627
+     * @param  integer $y Posição vertical canto superior
1629 1628
      * @return number Posição vertical final
1630 1629
      */
1631 1630
     protected function zTomador($x = 0, $y = 0)
@@ -1713,8 +1712,8 @@  discard block
 block discarded – undo
1713 1712
      * zDescricaoCarga
1714 1713
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1715 1714
      *
1716
-     * @param  number $x Posição horizontal canto esquerdo
1717
-     * @param  number $y Posição vertical canto superior
1715
+     * @param  integer $x Posição horizontal canto esquerdo
1716
+     * @param  integer $y Posição vertical canto superior
1718 1717
      * @return number Posição vertical final
1719 1718
      */
1720 1719
     protected function zDescricaoCarga($x = 0, $y = 0)
@@ -1891,8 +1890,8 @@  discard block
 block discarded – undo
1891 1890
      * zCompValorServ
1892 1891
      * Monta o campo com os componentes da prestação de serviços.
1893 1892
      *
1894
-     * @param  number $x Posição horizontal canto esquerdo
1895
-     * @param  number $y Posição vertical canto superior
1893
+     * @param  integer $x Posição horizontal canto esquerdo
1894
+     * @param  integer $y Posição vertical canto superior
1896 1895
      * @return number Posição vertical final
1897 1896
      */
1898 1897
     protected function zCompValorServ($x = 0, $y = 0)
@@ -1990,8 +1989,8 @@  discard block
 block discarded – undo
1990 1989
      * zImpostos
1991 1990
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1992 1991
      *
1993
-     * @param  number $x Posição horizontal canto esquerdo
1994
-     * @param  number $y Posição vertical canto superior
1992
+     * @param  integer $x Posição horizontal canto esquerdo
1993
+     * @param  integer $y Posição vertical canto superior
1995 1994
      * @return number Posição vertical final
1996 1995
      */
1997 1996
     protected function zImpostos($x = 0, $y = 0)
@@ -2227,8 +2226,8 @@  discard block
 block discarded – undo
2227 2226
      * zDocOrig
2228 2227
      * Monta o campo com os documentos originarios.
2229 2228
      *
2230
-     * @param  number $x Posição horizontal canto esquerdo
2231
-     * @param  number $y Posição vertical canto superior
2229
+     * @param  integer $x Posição horizontal canto esquerdo
2230
+     * @param  integer $y Posição vertical canto superior
2232 2231
      * @return number Posição vertical final
2233 2232
      */
2234 2233
     protected function zDocOrig($x = 0, $y = 0)
@@ -2500,8 +2499,8 @@  discard block
 block discarded – undo
2500 2499
      * zDocOrigContinuacao
2501 2500
      * Monta o campo com os documentos originarios.
2502 2501
      *
2503
-     * @param  number $x Posição horizontal canto esquerdo
2504
-     * @param  number $y Posição vertical canto superior
2502
+     * @param  integer $x Posição horizontal canto esquerdo
2503
+     * @param  integer $y Posição vertical canto superior
2505 2504
      * @return number Posição vertical final
2506 2505
      */
2507 2506
     protected function zDocOrigContinuacao($x = 0, $y = 0)
@@ -2630,8 +2629,8 @@  discard block
 block discarded – undo
2630 2629
      * zDocCompl
2631 2630
      * Monta o campo com os dados do remetente na DACTE.
2632 2631
      *
2633
-     * @param number $x Posição horizontal canto esquerdo
2634
-     * @param number $y Posição vertical canto superior
2632
+     * @param integer $x Posição horizontal canto esquerdo
2633
+     * @param integer $y Posição vertical canto superior
2635 2634
      * @return number Posição vertical final
2636 2635
      */
2637 2636
     protected function zDocCompl($x = 0, $y = 0)
@@ -2701,8 +2700,8 @@  discard block
 block discarded – undo
2701 2700
      * zObs
2702 2701
      * Monta o campo com os dados do remetente na DACTE.
2703 2702
      *
2704
-     * @param  number $x Posição horizontal canto esquerdo
2705
-     * @param  number $y Posição vertical canto superior
2703
+     * @param  integer $x Posição horizontal canto esquerdo
2704
+     * @param  integer $y Posição vertical canto superior
2706 2705
      * @return number Posição vertical final
2707 2706
      */
2708 2707
     protected function zObs($x = 0, $y = 0)
@@ -2744,8 +2743,8 @@  discard block
 block discarded – undo
2744 2743
      * zModalRod
2745 2744
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
2746 2745
      *
2747
-     * @param  number $x Posição horizontal canto esquerdo
2748
-     * @param  number $y Posição vertical canto superior
2746
+     * @param  integer $x Posição horizontal canto esquerdo
2747
+     * @param  integer $y Posição vertical canto superior
2749 2748
      * @return number Posição vertical final
2750 2749
      */
2751 2750
     protected function zModalRod($x = 0, $y = 0)
@@ -2787,8 +2786,8 @@  discard block
 block discarded – undo
2787 2786
      * zModalAereo
2788 2787
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
2789 2788
      *
2790
-     * @param  number $x Posição horizontal canto esquerdo
2791
-     * @param  number $y Posição vertical canto superior
2789
+     * @param  integer $x Posição horizontal canto esquerdo
2790
+     * @param  integer $y Posição vertical canto superior
2792 2791
      * @return number Posição vertical final
2793 2792
      */
2794 2793
     protected function zModalAereo($x = 0, $y = 0)
@@ -2850,8 +2849,8 @@  discard block
 block discarded – undo
2850 2849
      * zModalAquaviario
2851 2850
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
2852 2851
      *
2853
-     * @param  number $x Posição horizontal canto esquerdo
2854
-     * @param  number $y Posição vertical canto superior
2852
+     * @param  integer $x Posição horizontal canto esquerdo
2853
+     * @param  integer $y Posição vertical canto superior
2855 2854
      * @return number Posição vertical final
2856 2855
      */
2857 2856
     protected function zModalAquaviario($x = 0, $y = 0)
@@ -3020,8 +3019,8 @@  discard block
 block discarded – undo
3020 3019
      * zModalFerr
3021 3020
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
3022 3021
      *
3023
-     * @param  number $x Posição horizontal canto esquerdo
3024
-     * @param  number $y Posição vertical canto superior
3022
+     * @param  integer $x Posição horizontal canto esquerdo
3023
+     * @param  integer $y Posição vertical canto superior
3025 3024
      * @return number Posição vertical final
3026 3025
      */
3027 3026
     protected function zModalFerr($x = 0, $y = 0)
@@ -3298,8 +3297,8 @@  discard block
 block discarded – undo
3298 3297
      * zCanhoto
3299 3298
      * Monta o campo com os dados do remetente na DACTE.
3300 3299
      *
3301
-     * @param  number $x Posição horizontal canto esquerdo
3302
-     * @param  number $y Posição vertical canto superior
3300
+     * @param  integer $x Posição horizontal canto esquerdo
3301
+     * @param  integer $y Posição vertical canto superior
3303 3302
      * @return number Posição vertical final
3304 3303
      */
3305 3304
     protected function zCanhoto($x = 0, $y = 0)
@@ -3383,9 +3382,10 @@  discard block
 block discarded – undo
3383 3382
      * zDadosAdic
3384 3383
      * Coloca o grupo de dados adicionais da DACTE.
3385 3384
      *
3386
-     * @param  number $x Posição horizontal canto esquerdo
3387
-     * @param  number $y Posição vertical canto superior
3388
-     * @param  number $h altura do campo
3385
+     * @param  integer $x Posição horizontal canto esquerdo
3386
+     * @param  double $y Posição vertical canto superior
3387
+     * @param  integer $h altura do campo
3388
+     * @param integer $pag
3389 3389
      * @return number Posição vertical final
3390 3390
      */
3391 3391
     protected function zDadosAdic($x, $y, $pag, $h)
@@ -3466,11 +3466,11 @@  discard block
 block discarded – undo
3466 3466
      * zhDashedLine
3467 3467
      * Desenha uma linha horizontal tracejada com o FPDF
3468 3468
      *
3469
-     * @param  number $x Posição horizontal inicial, em mm
3470
-     * @param  number $y Posição vertical inicial, em mm
3469
+     * @param  integer $x Posição horizontal inicial, em mm
3470
+     * @param  double $y Posição vertical inicial, em mm
3471 3471
      * @param  number $w Comprimento da linha, em mm
3472
-     * @param  number $h Espessura da linha, em mm
3473
-     * @param  number $n Numero de traços na seção da linha com o comprimento $w
3472
+     * @param  double $h Espessura da linha, em mm
3473
+     * @param  integer $n Numero de traços na seção da linha com o comprimento $w
3474 3474
      * @return none
3475 3475
      */
3476 3476
     protected function zhDashedLine($x, $y, $w, $h, $n)
@@ -3629,7 +3629,7 @@  discard block
 block discarded – undo
3629 3629
      * Fornece a imformação multiplicação de peso contida na CTe
3630 3630
      *
3631 3631
      * @param  interger $U Informação de peso extraida da CTe
3632
-     * @return interger
3632
+     * @return integer
3633 3633
      */
3634 3634
     protected function zMultiUniPeso($U = '')
3635 3635
     {
Please login to merge, or discard this patch.
Spacing   +64 added lines, -66 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
             $this->toma4 = $this->dom->getElementsByTagName("toma4")->item(0);
212 212
             $this->toma03 = $this->dom->getElementsByTagName("toma3")->item(0);
213 213
             //Tag tomador é identificado por toma03 na versão 2.00
214
-            if ($this->infCte->getAttribute("versao")=="2.00") {
214
+            if ($this->infCte->getAttribute("versao") == "2.00") {
215 215
                 $this->toma03 = $this->dom->getElementsByTagName("toma03")->item(0);
216 216
             }
217 217
             //modal aquaviário
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
             }
430 430
             $x = $xInic;
431 431
             $r = $this->zObs($x, $y);
432
-            $y = $y-6;
432
+            $y = $y - 6;
433 433
             switch ($this->modal) {
434 434
                 case '1':
435 435
                     $y += 25.9;
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
             'font' => $this->fontePadrao,
632 632
             'size' => 7,
633 633
             'style' => '');
634
-        $fone = $this->getTagValue($this->enderEmit, "fone")!=""? $this->zFormatFone($this->enderEmit):'';
634
+        $fone = $this->getTagValue($this->enderEmit, "fone") != "" ? $this->zFormatFone($this->enderEmit) : '';
635 635
         $lgr = $this->getTagValue($this->enderEmit, "xLgr");
636 636
         $nro = $this->getTagValue($this->enderEmit, "nro");
637 637
         $cpl = $this->getTagValue($this->enderEmit, "xCpl");
@@ -725,30 +725,30 @@  discard block
 block discarded – undo
725 725
         $this->pdf->Line($x, $y1 + 8, $w + 3, $y1 + 8);
726 726
         $toma = $this->getTagValue($this->ide, "indGlobalizado");
727 727
         //0-Remetente;1-Expedidor;2-Recebedor;3-Destinatário;4 - Outros
728
-        if ($toma==1) {
728
+        if ($toma == 1) {
729 729
             $aFont = array(
730 730
             'font' => $this->fontePadrao,
731 731
             'size' => 11,
732 732
             'style' => '');
733
-            $this->pTextBox($x-14.5, $y2 + 3.5, $w * 0.5, $h1, 'X', $aFont, 'T', 'C', 0, '', false);
733
+            $this->pTextBox($x - 14.5, $y2 + 3.5, $w * 0.5, $h1, 'X', $aFont, 'T', 'C', 0, '', false);
734 734
         } else {
735 735
             $aFont = array(
736 736
             'font' => $this->fontePadrao,
737 737
             'size' => 11,
738 738
             'style' => '');
739
-            $this->pTextBox($x+3.5, $y2 + 3.5, $w * 0.5, $h1, 'X', $aFont, 'T', 'C', 0, '', false);
740
-        }
741
-        $aFont = $this->formatNegrito;
742
-        $this->pdf->Line($x+3, $x+71, $x+3, $x+75);
743
-        $this->pdf->Line($x+8, $x+71, $x+8, $x+75);
744
-        $this->pdf->Line($x+3, $x+71, $x+8, $x+71);
745
-        $this->pdf->Line($x+3, $x+75, $x+8, $x+75);
746
-        $this->pTextBox($x-6, $y2+1.4 + 3, $w * 0.5, $h1, 'SIM', $aFont, 'T', 'C', 0, '', false);
747
-        $this->pdf->Line($x+18, $x+71, $x+18, $x+75);
748
-        $this->pdf->Line($x+23, $x+71, $x+23, $x+75);
749
-        $this->pdf->Line($x+18, $x+71, $x+23, $x+71);
750
-        $this->pdf->Line($x+18, $x+75, $x+23, $x+75);
751
-        $this->pTextBox($x+9.8, $y2+1.4 + 3, $w * 0.5, $h1, 'NÃO', $aFont, 'T', 'C', 0, '', false);
739
+            $this->pTextBox($x + 3.5, $y2 + 3.5, $w * 0.5, $h1, 'X', $aFont, 'T', 'C', 0, '', false);
740
+        }
741
+        $aFont = $this->formatNegrito;
742
+        $this->pdf->Line($x + 3, $x + 71, $x + 3, $x + 75);
743
+        $this->pdf->Line($x + 8, $x + 71, $x + 8, $x + 75);
744
+        $this->pdf->Line($x + 3, $x + 71, $x + 8, $x + 71);
745
+        $this->pdf->Line($x + 3, $x + 75, $x + 8, $x + 75);
746
+        $this->pTextBox($x - 6, $y2 + 1.4 + 3, $w * 0.5, $h1, 'SIM', $aFont, 'T', 'C', 0, '', false);
747
+        $this->pdf->Line($x + 18, $x + 71, $x + 18, $x + 75);
748
+        $this->pdf->Line($x + 23, $x + 71, $x + 23, $x + 75);
749
+        $this->pdf->Line($x + 18, $x + 71, $x + 23, $x + 71);
750
+        $this->pdf->Line($x + 18, $x + 75, $x + 23, $x + 75);
751
+        $this->pTextBox($x + 9.8, $y2 + 1.4 + 3, $w * 0.5, $h1, 'NÃO', $aFont, 'T', 'C', 0, '', false);
752 752
         //FORMA DE PAGAMENTO
753 753
         $texto = 'INF.DO CT-E GLOBALIZADO';
754 754
         $wd = 36;
@@ -756,7 +756,7 @@  discard block
 block discarded – undo
756 756
             'font' => $this->fontePadrao,
757 757
             'size' => 8,
758 758
             'style' => '');
759
-        $this->pTextBox($x + $wa, $y2-0.5, $w * 0.5, $h1, $texto, $aFont, 'T', 'C', 0, '');
759
+        $this->pTextBox($x + $wa, $y2 - 0.5, $w * 0.5, $h1, $texto, $aFont, 'T', 'C', 0, '');
760 760
         $forma = $this->getTagValue($this->ide, "forPag");
761 761
         //##################################################################
762 762
         //coluna direita
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
             'style' => '');
866 866
         $this->pTextBox($xa, $y + 1, $wa, $h, $texto, $aFont, 'T', 'C', 0, '');
867 867
         //$texto = '1/1';
868
-        $texto = $pag."/".$totPag;
868
+        $texto = $pag . "/" . $totPag;
869 869
         $aFont = $this->formatNegrito;
870 870
         $this->pTextBox($xa, $y + 5, $wa, $h, $texto, $aFont, 'T', 'C', 0, '');
871 871
         $this->pdf->Line($xa + $wa, $y, $xa + $wa, $y + $h + 1);
@@ -888,7 +888,7 @@  discard block
 block discarded – undo
888 888
         $wa = 30;
889 889
         $texto = 'INSC.SUF.DO DEST';
890 890
         $aFont = $this->formatPadrao;
891
-        $this->pTextBox($xa-5, $y + 1, $wa, $h, $texto, $aFont, 'T', 'C', 0, '');
891
+        $this->pTextBox($xa - 5, $y + 1, $wa, $h, $texto, $aFont, 'T', 'C', 0, '');
892 892
         $texto = $this->getTagValue($this->dest, "ISUF");
893 893
         $aFont = array(
894 894
             'font' => $this->fontePadrao,
@@ -972,7 +972,7 @@  discard block
 block discarded – undo
972 972
         $aFont = $this->formatNegrito;
973 973
         $this->pTextBox($x, $y + 12, $wa, $h, $texto, $aFont, 'T', 'C', 0, '');
974 974
         if ($this->qrCodMDFe !== null) {
975
-            $this->pQRDAMDFE($y-32);
975
+            $this->pQRDAMDFE($y - 32);
976 976
         }
977 977
         //CFOP
978 978
         $x = $oldX;
@@ -1068,7 +1068,7 @@  discard block
 block discarded – undo
1068 1068
             $this->pdf->SetTextColor(0, 0, 0);
1069 1069
         }
1070 1070
         //indicar sem valor
1071
-        if ($tpAmb != 1 && $this->preVisualizar=='0') { // caso não seja uma DA de produção
1071
+        if ($tpAmb != 1 && $this->preVisualizar == '0') { // caso não seja uma DA de produção
1072 1072
             $x = 10;
1073 1073
             if ($this->orientacao == 'P') {
1074 1074
                 $y = round($this->hPrint * 2 / 3, 0);
@@ -1091,7 +1091,7 @@  discard block
 block discarded – undo
1091 1091
             $texto = "AMBIENTE DE HOMOLOGAÇÃO";
1092 1092
             $this->pTextBox($x, $y + 14, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1093 1093
             $this->pdf->SetTextColor(0, 0, 0);
1094
-        } elseif ($this->preVisualizar=='1') { // caso seja uma DA de Pré-Visualização
1094
+        } elseif ($this->preVisualizar == '1') { // caso seja uma DA de Pré-Visualização
1095 1095
             $h = 5;
1096 1096
             $w = $maxW - (2 * 10);
1097 1097
             $x = 55;
@@ -1109,14 +1109,14 @@  discard block
 block discarded – undo
1109 1109
                 'size' => 41,
1110 1110
                 'style' => 'B');
1111 1111
             $texto = "Sem Validade Jurídica";
1112
-            $this->pTextBox90($x+20, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1112
+            $this->pTextBox90($x + 20, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1113 1113
             $this->pdf->SetTextColor(90, 90, 90);
1114 1114
             $texto = "SEM VALOR FISCAL";
1115 1115
             $aFont = array(
1116 1116
                 'font' => $this->fontePadrao,
1117 1117
                 'size' => 48,
1118 1118
                 'style' => 'B');
1119
-            $this->pTextBox90($x+40, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1119
+            $this->pTextBox90($x + 40, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1120 1120
             $this->pdf->SetTextColor(0, 0, 0); // voltar a cor default
1121 1121
         } else {
1122 1122
             $x = 10;
@@ -1203,7 +1203,7 @@  discard block
 block discarded – undo
1203 1203
             'size' => 6,
1204 1204
             'style' => '');
1205 1205
         $this->pTextBox($x, $y, $w, 4, $texto, $aFont, 'T', 'L', 0, '');
1206
-        $texto = 'Desenvolvido por '.$this->nomeDesenvolvedor . ' - '. $this->siteDesenvolvedor;
1206
+        $texto = 'Desenvolvido por ' . $this->nomeDesenvolvedor . ' - ' . $this->siteDesenvolvedor;
1207 1207
         $aFont = array(
1208 1208
             'font' => $this->fontePadrao,
1209 1209
             'size' => 6,
@@ -1294,7 +1294,7 @@  discard block
 block discarded – undo
1294 1294
         $aFont = $this->formatPadrao;
1295 1295
         $this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1296 1296
         //$texto = $this->zFormatFone($this->rem);
1297
-        $texto = $this->getTagValue($this->rem, "fone")!=""? $this->zFormatFone($this->rem):'';
1297
+        $texto = $this->getTagValue($this->rem, "fone") != "" ? $this->zFormatFone($this->rem) : '';
1298 1298
         $aFont = $this->formatNegrito;
1299 1299
         $this->pTextBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1300 1300
     }
@@ -1381,7 +1381,7 @@  discard block
 block discarded – undo
1381 1381
         $aFont = $this->formatPadrao;
1382 1382
         $this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1383 1383
         //$texto = $this->zFormatFone($this->dest);
1384
-        $texto = $this->getTagValue($this->dest, "fone")!=""? $this->zFormatFone($this->dest):'';
1384
+        $texto = $this->getTagValue($this->dest, "fone") != "" ? $this->zFormatFone($this->dest) : '';
1385 1385
         $aFont = $this->formatNegrito;
1386 1386
         $this->pTextBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1387 1387
     }
@@ -1421,8 +1421,7 @@  discard block
 block discarded – undo
1421 1421
             $texto = $this->getTagValue($this->enderExped, "xLgr") . ', ';
1422 1422
             $texto .= $this->getTagValue($this->enderExped, "nro");
1423 1423
             $texto .= $this->getTagValue($this->enderExped, "xCpl") != "" ?
1424
-                ' - ' . $this->getTagValue($this->enderExped, "xCpl") :
1425
-                '';
1424
+                ' - ' . $this->getTagValue($this->enderExped, "xCpl") : '';
1426 1425
         } else {
1427 1426
             $texto = '';
1428 1427
         }
@@ -1477,7 +1476,7 @@  discard block
 block discarded – undo
1477 1476
         $aFont = $this->formatPadrao;
1478 1477
         $this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1479 1478
         if (isset($this->exped)) {
1480
-            $texto = $this->getTagValue($this->exped, "fone")!=""? $this->zFormatFone($this->exped):'';
1479
+            $texto = $this->getTagValue($this->exped, "fone") != "" ? $this->zFormatFone($this->exped) : '';
1481 1480
             $aFont = $this->formatNegrito;
1482 1481
             $this->pTextBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1483 1482
         }
@@ -1518,8 +1517,7 @@  discard block
 block discarded – undo
1518 1517
             $texto = $this->getTagValue($this->enderReceb, "xLgr") . ', ';
1519 1518
             $texto .= $this->getTagValue($this->enderReceb, "nro");
1520 1519
             $texto .= ($this->getTagValue($this->enderReceb, "xCpl") != "") ?
1521
-                ' - ' . $this->getTagValue($this->enderReceb, "xCpl") :
1522
-                '';
1520
+                ' - ' . $this->getTagValue($this->enderReceb, "xCpl") : '';
1523 1521
         } else {
1524 1522
             $texto = '';
1525 1523
         }
@@ -1574,7 +1572,7 @@  discard block
 block discarded – undo
1574 1572
         $aFont = $this->formatPadrao;
1575 1573
         $this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1576 1574
         if (isset($this->receb)) {
1577
-            $texto = $this->getTagValue($this->receb, "fone")!=""? $this->zFormatFone($this->receb):'';
1575
+            $texto = $this->getTagValue($this->receb, "fone") != "" ? $this->zFormatFone($this->receb) : '';
1578 1576
             $aFont = $this->formatNegrito;
1579 1577
             $this->pTextBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1580 1578
         }
@@ -1664,7 +1662,7 @@  discard block
 block discarded – undo
1664 1662
         $texto = 'FONE';
1665 1663
         $aFont = $this->formatPadrao;
1666 1664
         $this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1667
-        $texto = $this->getTagValue($this->toma, "fone")!=""? $this->zFormatFone($this->toma):'';
1665
+        $texto = $this->getTagValue($this->toma, "fone") != "" ? $this->zFormatFone($this->toma) : '';
1668 1666
         $aFont = $this->formatNegrito;
1669 1667
         $this->pTextBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1670 1668
     }
@@ -1732,46 +1730,46 @@  discard block
 block discarded – undo
1732 1730
             'font' => $this->fontePadrao,
1733 1731
             'size' => 5,
1734 1732
             'style' => '');
1735
-        $this->pTextBox($x+8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1733
+        $this->pTextBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1736 1734
         $texto = number_format($qCarga, 3, ",", ".");
1737 1735
         $aFont = array(
1738 1736
             'font' => $this->fontePadrao,
1739 1737
             'size' => 7,
1740 1738
             'style' => 'B');
1741
-        $this->pTextBox($x+2, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1739
+        $this->pTextBox($x + 2, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1742 1740
         $x = $w * 0.12;
1743
-        $this->pdf->Line($x+13.5, $y, $x+13.5, $y + 9);
1741
+        $this->pdf->Line($x + 13.5, $y, $x + 13.5, $y + 9);
1744 1742
         $texto = 'PESO BASE CÁLCULO (KG)';
1745 1743
         $aFont = array(
1746 1744
             'font' => $this->fontePadrao,
1747 1745
             'size' => 5,
1748 1746
             'style' => '');
1749
-        $this->pTextBox($x+20, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1747
+        $this->pTextBox($x + 20, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1750 1748
         $texto = number_format($qCarga, 3, ",", ".");
1751 1749
         $aFont = array(
1752 1750
             'font' => $this->fontePadrao,
1753 1751
             'size' => 7,
1754 1752
             'style' => 'B');
1755
-        $this->pTextBox($x+17, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1753
+        $this->pTextBox($x + 17, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1756 1754
         $x = $w * 0.24;
1757
-        $this->pdf->Line($x+25, $y, $x+25, $y + 9);
1755
+        $this->pdf->Line($x + 25, $y, $x + 25, $y + 9);
1758 1756
         $texto = 'PESO AFERIDO (KG)';
1759 1757
         $aFont = array(
1760 1758
             'font' => $this->fontePadrao,
1761 1759
             'size' => 5,
1762 1760
             'style' => '');
1763
-        $this->pTextBox($x+35, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1761
+        $this->pTextBox($x + 35, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1764 1762
         $texto = number_format($qCarga, 3, ",", ".");
1765 1763
         $aFont = array(
1766 1764
             'font' => $this->fontePadrao,
1767 1765
             'size' => 7,
1768 1766
             'style' => 'B');
1769
-        $this->pTextBox($x+28, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1767
+        $this->pTextBox($x + 28, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1770 1768
         $x = $w * 0.36;
1771
-        $this->pdf->Line($x+41.3, $y, $x+41.3, $y + 9);
1769
+        $this->pdf->Line($x + 41.3, $y, $x + 41.3, $y + 9);
1772 1770
         $texto = 'CUBAGEM(M3)';
1773 1771
         $aFont = $this->formatPadrao;
1774
-        $this->pTextBox($x+60, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1772
+        $this->pTextBox($x + 60, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1775 1773
         $qCarga = '';
1776 1774
         foreach ($this->infQ as $infQ) {
1777 1775
             if ($this->getTagValue($infQ, "cUnid") == '00') {
@@ -1783,12 +1781,12 @@  discard block
 block discarded – undo
1783 1781
             'font' => $this->fontePadrao,
1784 1782
             'size' => 7,
1785 1783
             'style' => 'B');
1786
-        $this->pTextBox($x+50, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1784
+        $this->pTextBox($x + 50, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1787 1785
         $x = $w * 0.45;
1788 1786
         //$this->pdf->Line($x+37, $y, $x+37, $y + 9);
1789 1787
         $texto = 'QTDE(VOL)';
1790 1788
         $aFont = $this->formatPadrao;
1791
-        $this->pTextBox($x+85, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1789
+        $this->pTextBox($x + 85, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1792 1790
         $qCarga = '';
1793 1791
         foreach ($this->infQ as $infQ) {
1794 1792
             if ($this->getTagValue($infQ, "cUnid") == '03') {
@@ -1800,9 +1798,9 @@  discard block
 block discarded – undo
1800 1798
             'font' => $this->fontePadrao,
1801 1799
             'size' => 7,
1802 1800
             'style' => 'B');
1803
-        $this->pTextBox($x+85, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1801
+        $this->pTextBox($x + 85, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1804 1802
         $x = $w * 0.53;
1805
-        $this->pdf->Line($x+56, $y, $x+56, $y + 9);
1803
+        $this->pdf->Line($x + 56, $y, $x + 56, $y + 9);
1806 1804
         /*$texto = 'NOME DA SEGURADORA';
1807 1805
         $aFont = $this->formatPadrao;
1808 1806
         $this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
@@ -1978,7 +1976,7 @@  discard block
 block discarded – undo
1978 1976
         $texto = 'BASE DE CALCULO';
1979 1977
         $aFont = $this->formatPadrao;
1980 1978
         $this->pTextBox($x, $y, $w * 0.14, $h, $texto, $aFont, 'T', 'L', 0, '');
1981
-        $wCol02=0.15;
1979
+        $wCol02 = 0.15;
1982 1980
         $x += $w * $wCol02;
1983 1981
         $this->pdf->Line($x, $y, $x, $y + 9.5);
1984 1982
         $texto = 'ALÍQ ICMS';
@@ -2280,7 +2278,7 @@  discard block
 block discarded – undo
2280 2278
             $this->arrayNFe[] = $chaveNFe;
2281 2279
         }
2282 2280
         $qtdeNFe = 1;
2283
-        if (count($this->arrayNFe) >15) {
2281
+        if (count($this->arrayNFe) > 15) {
2284 2282
             $this->flagDocOrigContinuacao = 1;
2285 2283
             $qtdeNFe = count($this->arrayNFe);
2286 2284
         }
@@ -2458,9 +2456,9 @@  discard block
 block discarded – undo
2458 2456
             //$h = 6 + 3; // de altura do texto (primeira linha
2459 2457
             //$h = 9 + 3.5 ;// segunda linha
2460 2458
             //$h = 9 + 3.5+ 3.5 ;// segunda linha
2461
-            $h = (( ( count($this->arrayNFe)/2 ) - 9) * 3.5)+9;
2462
-            if (count($this->arrayNFe)%2 !=0) {
2463
-                $h = $h+3.5;
2459
+            $h = (((count($this->arrayNFe) / 2) - 9) * 3.5) + 9;
2460
+            if (count($this->arrayNFe) % 2 != 0) {
2461
+                $h = $h + 3.5;
2464 2462
             } // Caso tenha apenas 1 registro na ultima linha
2465 2463
             $texto = 'DOCUMENTOS ORIGINÁRIOS - CONTINUACÃO';
2466 2464
             $aFont = $this->formatPadrao;
@@ -2510,7 +2508,7 @@  discard block
 block discarded – undo
2510 2508
             $auxX = $oldX;
2511 2509
             $yIniDados += 3;
2512 2510
             while ($contador < (count($this->arrayNFe))) {
2513
-                if ($contador%(116*($i-1)) == 0) {
2511
+                if ($contador % (116 * ($i - 1)) == 0) {
2514 2512
 //                    $contador++;
2515 2513
                     break;
2516 2514
                 }
@@ -2651,14 +2649,14 @@  discard block
 block discarded – undo
2651 2649
             $texto .= $xObs;
2652 2650
         }
2653 2651
         $textoObs = explode("Motorista:", $texto);
2654
-        $textoObs[1] = isset($textoObs[1]) ? "Motorista: ".$textoObs[1]: '';
2652
+        $textoObs[1] = isset($textoObs[1]) ? "Motorista: " . $textoObs[1] : '';
2655 2653
         $texto .= $this->getTagValue($this->imp, "infAdFisco", "\r\n");
2656 2654
         $aFont = array(
2657 2655
             'font' => $this->fontePadrao,
2658 2656
             'size' => 7.5,
2659 2657
             'style' => '');
2660 2658
         $this->pTextBox($x, $y, $w, $h, $textoObs[0], $aFont, 'T', 'L', 0, '', false);
2661
-        $this->pTextBox($x, $y+11.5, $w, $h, $textoObs[1], $aFont, 'T', 'L', 0, '', false);
2659
+        $this->pTextBox($x, $y + 11.5, $w, $h, $textoObs[1], $aFont, 'T', 'L', 0, '', false);
2662 2660
     }
2663 2661
     
2664 2662
     /**
@@ -2696,10 +2694,10 @@  discard block
 block discarded – undo
2696 2694
         $aFont = $this->formatNegrito;
2697 2695
         $this->pTextBox($x, $y + 3, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2698 2696
         $x += $w * 0.23;
2699
-        $this->pdf->Line($x-20, $y, $x-20, $y + 6); // LINHA A FRENTE DA RNTRC DA EMPRESA
2697
+        $this->pdf->Line($x - 20, $y, $x - 20, $y + 6); // LINHA A FRENTE DA RNTRC DA EMPRESA
2700 2698
         $texto = 'ESTE CONHECIMENTO DE TRANSPORTE ATENDE À LEGISLAÇÃO DE TRANSPORTE RODOVIÁRIO EM VIGOR';
2701 2699
         $aFont = $this->formatPadrao;
2702
-        $this->pTextBox($x-20, $y + 3, $w * 0.50, $h, $texto, $aFont, 'T', 'C', 0, '');
2700
+        $this->pTextBox($x - 20, $y + 3, $w * 0.50, $h, $texto, $aFont, 'T', 'C', 0, '');
2703 2701
     }
2704 2702
     
2705 2703
     /**
@@ -2732,13 +2730,13 @@  discard block
 block discarded – undo
2732 2730
         $this->pTextBox($x, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2733 2731
         $texto = 'CLASSE DA TARIFA';
2734 2732
         $aFont = $this->formatPadrao;
2735
-        $this->pTextBox($x+50, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2733
+        $this->pTextBox($x + 50, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2736 2734
         $texto = 'CÓDIGO DA TARIFA';
2737 2735
         $aFont = $this->formatPadrao;
2738
-        $this->pTextBox($x+80, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2736
+        $this->pTextBox($x + 80, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2739 2737
         $texto = 'VALOR DA TARIFA';
2740 2738
         $aFont = $this->formatPadrao;
2741
-        $this->pTextBox($x+110, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2739
+        $this->pTextBox($x + 110, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2742 2740
         $texto = $this->getTagValue($this->aereo, "nOCA");
2743 2741
         $aFont = $this->formatNegrito;
2744 2742
         $this->pTextBox($x, $y + 3, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
@@ -3251,7 +3249,7 @@  discard block
 block discarded – undo
3251 3249
         $this->pTextBox($x, $y, $w * 0.25, $h - 3.4, $texto, $aFont, 'B', 'C', 0, '');
3252 3250
         $x += $w * 0.25;
3253 3251
         $this->pdf->Line($x, $y, $x, $y + 16.5);
3254
-        $texto = 'TÉRMINO DA PRESTAÇÃO - DATA/HORA' . "\r\n" . "\r\n" . "\r\n". "\r\n";
3252
+        $texto = 'TÉRMINO DA PRESTAÇÃO - DATA/HORA' . "\r\n" . "\r\n" . "\r\n" . "\r\n";
3255 3253
         $texto .= ' INÍCIO DA PRESTAÇÃO - DATA/HORA';
3256 3254
         $aFont = array(
3257 3255
             'font' => $this->fontePadrao,
@@ -3260,13 +3258,13 @@  discard block
 block discarded – undo
3260 3258
         $this->pTextBox($x + 10, $y, $w * 0.25, $h - 3.4, $texto, $aFont, 'T', 'C', 0, '');
3261 3259
         $x = $oldX;
3262 3260
         $y = $y + 5;
3263
-        $this->pdf->Line($x, $y+3, $w * 0.255, $y+3); // LINHA HORIZONTAL ACIMA DO RG ABAIXO DO NOME
3261
+        $this->pdf->Line($x, $y + 3, $w * 0.255, $y + 3); // LINHA HORIZONTAL ACIMA DO RG ABAIXO DO NOME
3264 3262
         $texto = 'RG';
3265 3263
         $aFont = array(
3266 3264
             'font' => $this->fontePadrao,
3267 3265
             'size' => 6,
3268 3266
             'style' => '');
3269
-        $this->pTextBox($x, $y+3, $w * 0.33, $h, $texto, $aFont, 'T', 'L', 0, '');
3267
+        $this->pTextBox($x, $y + 3, $w * 0.33, $h, $texto, $aFont, 'T', 'L', 0, '');
3270 3268
         $x += $w * 0.85;
3271 3269
         $this->pdf->Line($x, $y + 11.5, $x, $y - 5); // LINHA VERTICAL PROXIMO AO CT-E
3272 3270
         $texto = "CT-E";
Please login to merge, or discard this patch.