Completed
Push — master ( 02804d...8b93d6 )
by Roberto
06:51 queued 04:21
created
src/CTe/DacteV3.php 2 patches
Doc Comments   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      * @param string $sDestino Estabelece a direção do envio do documento PDF
108 108
      * @param string $sDirPDF Caminho para o diretorio de armaz. dos PDF
109 109
      * @param string $fonteDACTE Nome da fonte a ser utilizada
110
-     * @param number $mododebug 0-Não 1-Sim e 2-nada (2 default)
110
+     * @param integer $mododebug 0-Não 1-Sim e 2-nada (2 default)
111 111
      * @param string $preVisualizar 0-Não 1-Sim
112 112
      * @param string $nomeDesenvolvedor Nome do desenvolvedor
113 113
      * @param string $siteDesenvolvedor Site do desenvolvedor
@@ -542,8 +542,8 @@  discard block
 block discarded – undo
542 542
      * cabecalho
543 543
      * Monta o cabelhalho da DACTE ( retrato e paisagem )
544 544
      *
545
-     * @param  number $x Posição horizontal inicial, canto esquerdo
546
-     * @param  number $y Posição vertical inicial, canto superior
545
+     * @param  integer $x Posição horizontal inicial, canto esquerdo
546
+     * @param  integer $y Posição vertical inicial, canto superior
547 547
      * @param  number $pag Número da Página
548 548
      * @param  number $totPag Total de páginas
549 549
      * @return number Posição vertical final
@@ -1195,8 +1195,7 @@  discard block
 block discarded – undo
1195 1195
      * rodapeDACTE
1196 1196
      * Monta o rodape no final da DACTE ( retrato e paisagem )
1197 1197
      *
1198
-     * @param number $xInic Posição horizontal canto esquerdo
1199
-     * @param number $yFinal Posição vertical final para impressão
1198
+     * @param integer $x
1200 1199
      */
1201 1200
     protected function rodape($x, $y)
1202 1201
     {
@@ -1219,8 +1218,8 @@  discard block
 block discarded – undo
1219 1218
      * remetente
1220 1219
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1221 1220
      *
1222
-     * @param  number $x Posição horizontal canto esquerdo
1223
-     * @param  number $y Posição vertical canto superior
1221
+     * @param  integer $x Posição horizontal canto esquerdo
1222
+     * @param  integer $y Posição vertical canto superior
1224 1223
      * @return number Posição vertical final
1225 1224
      */
1226 1225
     protected function remetente($x = 0, $y = 0)
@@ -1307,8 +1306,8 @@  discard block
 block discarded – undo
1307 1306
      * destinatario
1308 1307
      * Monta o campo com os dados do destinatário na DACTE.
1309 1308
      *
1310
-     * @param  number $x Posição horizontal canto esquerdo
1311
-     * @param  number $y Posição vertical canto superior
1309
+     * @param  integer $x Posição horizontal canto esquerdo
1310
+     * @param  integer $y Posição vertical canto superior
1312 1311
      * @return number Posição vertical final
1313 1312
      */
1314 1313
     protected function destinatario($x = 0, $y = 0)
@@ -1394,8 +1393,8 @@  discard block
 block discarded – undo
1394 1393
      * expedidor
1395 1394
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1396 1395
      *
1397
-     * @param  number $x Posição horizontal canto esquerdo
1398
-     * @param  number $y Posição vertical canto superior
1396
+     * @param  integer $x Posição horizontal canto esquerdo
1397
+     * @param  integer $y Posição vertical canto superior
1399 1398
      * @return number Posição vertical final
1400 1399
      */
1401 1400
     protected function expedidor($x = 0, $y = 0)
@@ -1491,8 +1490,8 @@  discard block
 block discarded – undo
1491 1490
      * recebedor
1492 1491
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1493 1492
      *
1494
-     * @param  number $x Posição horizontal canto esquerdo
1495
-     * @param  number $y Posição vertical canto superior
1493
+     * @param  integer $x Posição horizontal canto esquerdo
1494
+     * @param  integer $y Posição vertical canto superior
1496 1495
      * @return number Posição vertical final
1497 1496
      */
1498 1497
     protected function recebedor($x = 0, $y = 0)
@@ -1588,8 +1587,8 @@  discard block
 block discarded – undo
1588 1587
      * tomador
1589 1588
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1590 1589
      *
1591
-     * @param  number $x Posição horizontal canto esquerdo
1592
-     * @param  number $y Posição vertical canto superior
1590
+     * @param  integer $x Posição horizontal canto esquerdo
1591
+     * @param  integer $y Posição vertical canto superior
1593 1592
      * @return number Posição vertical final
1594 1593
      */
1595 1594
     protected function tomador($x = 0, $y = 0)
@@ -1677,8 +1676,8 @@  discard block
 block discarded – undo
1677 1676
      * descricaoCarga
1678 1677
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1679 1678
      *
1680
-     * @param  number $x Posição horizontal canto esquerdo
1681
-     * @param  number $y Posição vertical canto superior
1679
+     * @param  integer $x Posição horizontal canto esquerdo
1680
+     * @param  integer $y Posição vertical canto superior
1682 1681
      * @return number Posição vertical final
1683 1682
      */
1684 1683
     protected function descricaoCarga($x = 0, $y = 0)
@@ -1854,8 +1853,8 @@  discard block
 block discarded – undo
1854 1853
      * compValorServ
1855 1854
      * Monta o campo com os componentes da prestação de serviços.
1856 1855
      *
1857
-     * @param  number $x Posição horizontal canto esquerdo
1858
-     * @param  number $y Posição vertical canto superior
1856
+     * @param  integer $x Posição horizontal canto esquerdo
1857
+     * @param  integer $y Posição vertical canto superior
1859 1858
      * @return number Posição vertical final
1860 1859
      */
1861 1860
     protected function compValorServ($x = 0, $y = 0)
@@ -1953,8 +1952,8 @@  discard block
 block discarded – undo
1953 1952
      * impostos
1954 1953
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1955 1954
      *
1956
-     * @param  number $x Posição horizontal canto esquerdo
1957
-     * @param  number $y Posição vertical canto superior
1955
+     * @param  integer $x Posição horizontal canto esquerdo
1956
+     * @param  integer $y Posição vertical canto superior
1958 1957
      * @return number Posição vertical final
1959 1958
      */
1960 1959
     protected function impostos($x = 0, $y = 0)
@@ -2171,8 +2170,8 @@  discard block
 block discarded – undo
2171 2170
      * docOrig
2172 2171
      * Monta o campo com os documentos originarios.
2173 2172
      *
2174
-     * @param  number $x Posição horizontal canto esquerdo
2175
-     * @param  number $y Posição vertical canto superior
2173
+     * @param  integer $x Posição horizontal canto esquerdo
2174
+     * @param  integer $y Posição vertical canto superior
2176 2175
      * @return number Posição vertical final
2177 2176
      */
2178 2177
     protected function docOrig($x = 0, $y = 0)
@@ -2435,8 +2434,8 @@  discard block
 block discarded – undo
2435 2434
      * docOrigContinuacao
2436 2435
      * Monta o campo com os documentos originarios.
2437 2436
      *
2438
-     * @param  number $x Posição horizontal canto esquerdo
2439
-     * @param  number $y Posição vertical canto superior
2437
+     * @param  integer $x Posição horizontal canto esquerdo
2438
+     * @param  integer $y Posição vertical canto superior
2440 2439
      * @return number Posição vertical final
2441 2440
      */
2442 2441
     protected function docOrigContinuacao($x = 0, $y = 0)
@@ -2556,8 +2555,8 @@  discard block
 block discarded – undo
2556 2555
      * docCompl
2557 2556
      * Monta o campo com os dados do remetente na DACTE.
2558 2557
      *
2559
-     * @param number $x Posição horizontal canto esquerdo
2560
-     * @param number $y Posição vertical canto superior
2558
+     * @param integer $x Posição horizontal canto esquerdo
2559
+     * @param integer $y Posição vertical canto superior
2561 2560
      * @return number Posição vertical final
2562 2561
      */
2563 2562
     protected function docCompl($x = 0, $y = 0)
@@ -2625,8 +2624,8 @@  discard block
 block discarded – undo
2625 2624
      * observacao
2626 2625
      * Monta o campo com os dados do remetente na DACTE.
2627 2626
      *
2628
-     * @param  number $x Posição horizontal canto esquerdo
2629
-     * @param  number $y Posição vertical canto superior
2627
+     * @param  integer $x Posição horizontal canto esquerdo
2628
+     * @param  integer $y Posição vertical canto superior
2630 2629
      * @return number Posição vertical final
2631 2630
      */
2632 2631
     protected function observacao($x = 0, $y = 0)
@@ -2668,8 +2667,8 @@  discard block
 block discarded – undo
2668 2667
      * modalRod
2669 2668
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
2670 2669
      *
2671
-     * @param  number $x Posição horizontal canto esquerdo
2672
-     * @param  number $y Posição vertical canto superior
2670
+     * @param  integer $x Posição horizontal canto esquerdo
2671
+     * @param  integer $y Posição vertical canto superior
2673 2672
      * @return number Posição vertical final
2674 2673
      */
2675 2674
     protected function modalRod($x = 0, $y = 0)
@@ -2709,8 +2708,8 @@  discard block
 block discarded – undo
2709 2708
      * modalAereo
2710 2709
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
2711 2710
      *
2712
-     * @param  number $x Posição horizontal canto esquerdo
2713
-     * @param  number $y Posição vertical canto superior
2711
+     * @param  integer $x Posição horizontal canto esquerdo
2712
+     * @param  integer $y Posição vertical canto superior
2714 2713
      * @return number Posição vertical final
2715 2714
      */
2716 2715
     protected function modalAereo($x = 0, $y = 0)
@@ -2766,8 +2765,8 @@  discard block
 block discarded – undo
2766 2765
      * modalAquaviario
2767 2766
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
2768 2767
      *
2769
-     * @param  number $x Posição horizontal canto esquerdo
2770
-     * @param  number $y Posição vertical canto superior
2768
+     * @param  integer $x Posição horizontal canto esquerdo
2769
+     * @param  integer $y Posição vertical canto superior
2771 2770
      * @return number Posição vertical final
2772 2771
      */
2773 2772
     protected function modalAquaviario($x = 0, $y = 0)
@@ -2936,8 +2935,8 @@  discard block
 block discarded – undo
2936 2935
      * modalFerr
2937 2936
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
2938 2937
      *
2939
-     * @param  number $x Posição horizontal canto esquerdo
2940
-     * @param  number $y Posição vertical canto superior
2938
+     * @param  integer $x Posição horizontal canto esquerdo
2939
+     * @param  integer $y Posição vertical canto superior
2941 2940
      * @return number Posição vertical final
2942 2941
      */
2943 2942
     protected function modalFerr($x = 0, $y = 0)
@@ -3214,8 +3213,8 @@  discard block
 block discarded – undo
3214 3213
      * canhoto
3215 3214
      * Monta o campo com os dados do remetente na DACTE.
3216 3215
      *
3217
-     * @param  number $x Posição horizontal canto esquerdo
3218
-     * @param  number $y Posição vertical canto superior
3216
+     * @param  integer $x Posição horizontal canto esquerdo
3217
+     * @param  integer $y Posição vertical canto superior
3219 3218
      * @return number Posição vertical final
3220 3219
      */
3221 3220
     protected function canhoto($x = 0, $y = 0)
@@ -3288,9 +3287,10 @@  discard block
 block discarded – undo
3288 3287
      * dadosAdic
3289 3288
      * Coloca o grupo de dados adicionais da DACTE.
3290 3289
      *
3291
-     * @param  number $x Posição horizontal canto esquerdo
3292
-     * @param  number $y Posição vertical canto superior
3293
-     * @param  number $h altura do campo
3290
+     * @param  integer $x Posição horizontal canto esquerdo
3291
+     * @param  double $y Posição vertical canto superior
3292
+     * @param  integer $h altura do campo
3293
+     * @param integer $pag
3294 3294
      * @return number Posição vertical final
3295 3295
      */
3296 3296
     protected function dadosAdic($x, $y, $pag, $h)
@@ -3483,7 +3483,7 @@  discard block
 block discarded – undo
3483 3483
      * Fornece a imformação multiplicação de peso contida na CTe
3484 3484
      *
3485 3485
      * @param  interger $U Informação de peso extraida da CTe
3486
-     * @return interger
3486
+     * @return integer
3487 3487
      */
3488 3488
     protected function multiUniPeso($U = '')
3489 3489
     {
Please login to merge, or discard this patch.
Spacing   +64 added lines, -66 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
             $this->toma4 = $this->dom->getElementsByTagName("toma4")->item(0);
213 213
             $this->toma03 = $this->dom->getElementsByTagName("toma3")->item(0);
214 214
             //Tag tomador é identificado por toma03 na versão 2.00
215
-            if ($this->infCte->getAttribute("versao")=="2.00") {
215
+            if ($this->infCte->getAttribute("versao") == "2.00") {
216 216
                 $this->toma03 = $this->dom->getElementsByTagName("toma03")->item(0);
217 217
             }
218 218
             //modal aquaviário
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
             }
431 431
             $x = $xInic;
432 432
             $r = $this->observacao($x, $y);
433
-            $y = $y-6;
433
+            $y = $y - 6;
434 434
             switch ($this->modal) {
435 435
                 case '1':
436 436
                     $y += 25.9;
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
             'font' => $this->fontePadrao,
633 633
             'size' => 7,
634 634
             'style' => '');
635
-        $fone = $this->getTagValue($this->enderEmit, "fone")!=""? $this->formatFone($this->enderEmit):'';
635
+        $fone = $this->getTagValue($this->enderEmit, "fone") != "" ? $this->formatFone($this->enderEmit) : '';
636 636
         $lgr = $this->getTagValue($this->enderEmit, "xLgr");
637 637
         $nro = $this->getTagValue($this->enderEmit, "nro");
638 638
         $cpl = $this->getTagValue($this->enderEmit, "xCpl");
@@ -726,30 +726,30 @@  discard block
 block discarded – undo
726 726
         $this->pdf->line($x, $y1 + 8, $w + 3, $y1 + 8);
727 727
         $toma = $this->getTagValue($this->ide, "indGlobalizado");
728 728
         //0-Remetente;1-Expedidor;2-Recebedor;3-Destinatário;4 - Outros
729
-        if ($toma==1) {
729
+        if ($toma == 1) {
730 730
             $aFont = array(
731 731
             'font' => $this->fontePadrao,
732 732
             'size' => 11,
733 733
             'style' => '');
734
-            $this->pdf->textBox($x-14.5, $y2 + 3.5, $w * 0.5, $h1, 'X', $aFont, 'T', 'C', 0, '', false);
734
+            $this->pdf->textBox($x - 14.5, $y2 + 3.5, $w * 0.5, $h1, 'X', $aFont, 'T', 'C', 0, '', false);
735 735
         } else {
736 736
             $aFont = array(
737 737
             'font' => $this->fontePadrao,
738 738
             'size' => 11,
739 739
             'style' => '');
740
-            $this->pdf->textBox($x+3.5, $y2 + 3.5, $w * 0.5, $h1, 'X', $aFont, 'T', 'C', 0, '', false);
741
-        }
742
-        $aFont = $this->formatNegrito;
743
-        $this->pdf->line($x+3, $x+71, $x+3, $x+75);
744
-        $this->pdf->line($x+8, $x+71, $x+8, $x+75);
745
-        $this->pdf->line($x+3, $x+71, $x+8, $x+71);
746
-        $this->pdf->line($x+3, $x+75, $x+8, $x+75);
747
-        $this->pdf->textBox($x-6, $y2+1.4 + 3, $w * 0.5, $h1, 'SIM', $aFont, 'T', 'C', 0, '', false);
748
-        $this->pdf->line($x+18, $x+71, $x+18, $x+75);
749
-        $this->pdf->line($x+23, $x+71, $x+23, $x+75);
750
-        $this->pdf->line($x+18, $x+71, $x+23, $x+71);
751
-        $this->pdf->line($x+18, $x+75, $x+23, $x+75);
752
-        $this->pdf->textBox($x+9.8, $y2+1.4 + 3, $w * 0.5, $h1, 'NÃO', $aFont, 'T', 'C', 0, '', false);
740
+            $this->pdf->textBox($x + 3.5, $y2 + 3.5, $w * 0.5, $h1, 'X', $aFont, 'T', 'C', 0, '', false);
741
+        }
742
+        $aFont = $this->formatNegrito;
743
+        $this->pdf->line($x + 3, $x + 71, $x + 3, $x + 75);
744
+        $this->pdf->line($x + 8, $x + 71, $x + 8, $x + 75);
745
+        $this->pdf->line($x + 3, $x + 71, $x + 8, $x + 71);
746
+        $this->pdf->line($x + 3, $x + 75, $x + 8, $x + 75);
747
+        $this->pdf->textBox($x - 6, $y2 + 1.4 + 3, $w * 0.5, $h1, 'SIM', $aFont, 'T', 'C', 0, '', false);
748
+        $this->pdf->line($x + 18, $x + 71, $x + 18, $x + 75);
749
+        $this->pdf->line($x + 23, $x + 71, $x + 23, $x + 75);
750
+        $this->pdf->line($x + 18, $x + 71, $x + 23, $x + 71);
751
+        $this->pdf->line($x + 18, $x + 75, $x + 23, $x + 75);
752
+        $this->pdf->textBox($x + 9.8, $y2 + 1.4 + 3, $w * 0.5, $h1, 'NÃO', $aFont, 'T', 'C', 0, '', false);
753 753
         //FORMA DE PAGAMENTO
754 754
         $texto = 'INF.DO CT-E GLOBALIZADO';
755 755
         $wd = 36;
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
             'font' => $this->fontePadrao,
758 758
             'size' => 8,
759 759
             'style' => '');
760
-        $this->pdf->textBox($x + $wa, $y2-0.5, $w * 0.5, $h1, $texto, $aFont, 'T', 'C', 0, '');
760
+        $this->pdf->textBox($x + $wa, $y2 - 0.5, $w * 0.5, $h1, $texto, $aFont, 'T', 'C', 0, '');
761 761
         $forma = $this->getTagValue($this->ide, "forPag");
762 762
         //##################################################################
763 763
         //coluna direita
@@ -866,7 +866,7 @@  discard block
 block discarded – undo
866 866
             'style' => '');
867 867
         $this->pdf->textBox($xa, $y + 1, $wa, $h, $texto, $aFont, 'T', 'C', 0, '');
868 868
         //$texto = '1/1';
869
-        $texto = $pag."/".$totPag;
869
+        $texto = $pag . "/" . $totPag;
870 870
         $aFont = $this->formatNegrito;
871 871
         $this->pdf->textBox($xa, $y + 5, $wa, $h, $texto, $aFont, 'T', 'C', 0, '');
872 872
         $this->pdf->line($xa + $wa, $y, $xa + $wa, $y + $h + 1);
@@ -889,7 +889,7 @@  discard block
 block discarded – undo
889 889
         $wa = 30;
890 890
         $texto = 'INSC.SUF.DO DEST';
891 891
         $aFont = $this->formatPadrao;
892
-        $this->pdf->textBox($xa-5, $y + 1, $wa, $h, $texto, $aFont, 'T', 'C', 0, '');
892
+        $this->pdf->textBox($xa - 5, $y + 1, $wa, $h, $texto, $aFont, 'T', 'C', 0, '');
893 893
         $texto = $this->getTagValue($this->dest, "ISUF");
894 894
         $aFont = array(
895 895
             'font' => $this->fontePadrao,
@@ -973,7 +973,7 @@  discard block
 block discarded – undo
973 973
         $aFont = $this->formatNegrito;
974 974
         $this->pdf->textBox($x, $y + 12, $wa, $h, $texto, $aFont, 'T', 'C', 0, '');
975 975
         if ($this->qrCodCTe !== null) {
976
-            $this->qrCodeDacte($y-27);
976
+            $this->qrCodeDacte($y - 27);
977 977
             $w = 45;
978 978
             $x += 92.5;
979 979
             $this->pdf->textBox($x, $y - 34, $w + 0.5, $h + 41.5);
@@ -1072,7 +1072,7 @@  discard block
 block discarded – undo
1072 1072
             $this->pdf->setTextColor(0, 0, 0);
1073 1073
         }
1074 1074
         //indicar sem valor
1075
-        if ($tpAmb != 1 && $this->preVisualizar=='0') { // caso não seja uma DA de produção
1075
+        if ($tpAmb != 1 && $this->preVisualizar == '0') { // caso não seja uma DA de produção
1076 1076
             $x = 10;
1077 1077
             if ($this->orientacao == 'P') {
1078 1078
                 $y = round($this->hPrint * 2 / 3, 0);
@@ -1095,7 +1095,7 @@  discard block
 block discarded – undo
1095 1095
             $texto = "AMBIENTE DE HOMOLOGAÇÃO";
1096 1096
             $this->pdf->textBox($x, $y + 14, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1097 1097
             $this->pdf->setTextColor(0, 0, 0);
1098
-        } elseif ($this->preVisualizar=='1') { // caso seja uma DA de Pré-Visualização
1098
+        } elseif ($this->preVisualizar == '1') { // caso seja uma DA de Pré-Visualização
1099 1099
             $h = 5;
1100 1100
             $w = $maxW - (2 * 10);
1101 1101
             $x = 55;
@@ -1113,14 +1113,14 @@  discard block
 block discarded – undo
1113 1113
                 'size' => 41,
1114 1114
                 'style' => 'B');
1115 1115
             $texto = "Sem Validade Jurídica";
1116
-            $this->pTextBox90($x+20, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1116
+            $this->pTextBox90($x + 20, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1117 1117
             $this->pdf->setTextColor(90, 90, 90);
1118 1118
             $texto = "SEM VALOR FISCAL";
1119 1119
             $aFont = array(
1120 1120
                 'font' => $this->fontePadrao,
1121 1121
                 'size' => 48,
1122 1122
                 'style' => 'B');
1123
-            $this->pTextBox90($x+40, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1123
+            $this->pTextBox90($x + 40, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1124 1124
             $this->pdf->setTextColor(0, 0, 0); // voltar a cor default
1125 1125
         } else {
1126 1126
             $x = 10;
@@ -1207,7 +1207,7 @@  discard block
 block discarded – undo
1207 1207
             'size' => 6,
1208 1208
             'style' => '');
1209 1209
         $this->pdf->textBox($x, $y, $w, 4, $texto, $aFont, 'T', 'L', 0, '');
1210
-        $texto = 'Desenvolvido por '.$this->nomeDesenvolvedor . ' - '. $this->siteDesenvolvedor;
1210
+        $texto = 'Desenvolvido por ' . $this->nomeDesenvolvedor . ' - ' . $this->siteDesenvolvedor;
1211 1211
         $aFont = array(
1212 1212
             'font' => $this->fontePadrao,
1213 1213
             'size' => 6,
@@ -1298,7 +1298,7 @@  discard block
 block discarded – undo
1298 1298
         $aFont = $this->formatPadrao;
1299 1299
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1300 1300
         //$texto = $this->formatFone($this->rem);
1301
-        $texto = $this->getTagValue($this->rem, "fone")!=""? $this->formatFone($this->rem):'';
1301
+        $texto = $this->getTagValue($this->rem, "fone") != "" ? $this->formatFone($this->rem) : '';
1302 1302
         $aFont = $this->formatNegrito;
1303 1303
         $this->pdf->textBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1304 1304
     }
@@ -1385,7 +1385,7 @@  discard block
 block discarded – undo
1385 1385
         $aFont = $this->formatPadrao;
1386 1386
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1387 1387
         //$texto = $this->formatFone($this->dest);
1388
-        $texto = $this->getTagValue($this->dest, "fone")!=""? $this->formatFone($this->dest):'';
1388
+        $texto = $this->getTagValue($this->dest, "fone") != "" ? $this->formatFone($this->dest) : '';
1389 1389
         $aFont = $this->formatNegrito;
1390 1390
         $this->pdf->textBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1391 1391
     }
@@ -1425,8 +1425,7 @@  discard block
 block discarded – undo
1425 1425
             $texto = $this->getTagValue($this->enderExped, "xLgr") . ', ';
1426 1426
             $texto .= $this->getTagValue($this->enderExped, "nro");
1427 1427
             $texto .= $this->getTagValue($this->enderExped, "xCpl") != "" ?
1428
-                ' - ' . $this->getTagValue($this->enderExped, "xCpl") :
1429
-                '';
1428
+                ' - ' . $this->getTagValue($this->enderExped, "xCpl") : '';
1430 1429
         } else {
1431 1430
             $texto = '';
1432 1431
         }
@@ -1481,7 +1480,7 @@  discard block
 block discarded – undo
1481 1480
         $aFont = $this->formatPadrao;
1482 1481
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1483 1482
         if (isset($this->exped)) {
1484
-            $texto = $this->getTagValue($this->exped, "fone")!=""? $this->formatFone($this->exped):'';
1483
+            $texto = $this->getTagValue($this->exped, "fone") != "" ? $this->formatFone($this->exped) : '';
1485 1484
             $aFont = $this->formatNegrito;
1486 1485
             $this->pdf->textBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1487 1486
         }
@@ -1522,8 +1521,7 @@  discard block
 block discarded – undo
1522 1521
             $texto = $this->getTagValue($this->enderReceb, "xLgr") . ', ';
1523 1522
             $texto .= $this->getTagValue($this->enderReceb, "nro");
1524 1523
             $texto .= ($this->getTagValue($this->enderReceb, "xCpl") != "") ?
1525
-                ' - ' . $this->getTagValue($this->enderReceb, "xCpl") :
1526
-                '';
1524
+                ' - ' . $this->getTagValue($this->enderReceb, "xCpl") : '';
1527 1525
         } else {
1528 1526
             $texto = '';
1529 1527
         }
@@ -1578,7 +1576,7 @@  discard block
 block discarded – undo
1578 1576
         $aFont = $this->formatPadrao;
1579 1577
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1580 1578
         if (isset($this->receb)) {
1581
-            $texto = $this->getTagValue($this->receb, "fone")!=""? $this->formatFone($this->receb):'';
1579
+            $texto = $this->getTagValue($this->receb, "fone") != "" ? $this->formatFone($this->receb) : '';
1582 1580
             $aFont = $this->formatNegrito;
1583 1581
             $this->pdf->textBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1584 1582
         }
@@ -1668,7 +1666,7 @@  discard block
 block discarded – undo
1668 1666
         $texto = 'FONE';
1669 1667
         $aFont = $this->formatPadrao;
1670 1668
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1671
-        $texto = $this->getTagValue($this->toma, "fone")!=""? $this->formatFone($this->toma):'';
1669
+        $texto = $this->getTagValue($this->toma, "fone") != "" ? $this->formatFone($this->toma) : '';
1672 1670
         $aFont = $this->formatNegrito;
1673 1671
         $this->pdf->textBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1674 1672
     }
@@ -1735,46 +1733,46 @@  discard block
 block discarded – undo
1735 1733
             'font' => $this->fontePadrao,
1736 1734
             'size' => 5,
1737 1735
             'style' => '');
1738
-        $this->pdf->textBox($x+8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1736
+        $this->pdf->textBox($x + 8, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1739 1737
         $texto = number_format($qCarga, 3, ",", ".");
1740 1738
         $aFont = array(
1741 1739
             'font' => $this->fontePadrao,
1742 1740
             'size' => 7,
1743 1741
             'style' => 'B');
1744
-        $this->pdf->textBox($x+2, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1742
+        $this->pdf->textBox($x + 2, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1745 1743
         $x = $w * 0.12;
1746
-        $this->pdf->line($x+13.5, $y, $x+13.5, $y + 9);
1744
+        $this->pdf->line($x + 13.5, $y, $x + 13.5, $y + 9);
1747 1745
         $texto = 'PESO BASE CÁLCULO (KG)';
1748 1746
         $aFont = array(
1749 1747
             'font' => $this->fontePadrao,
1750 1748
             'size' => 5,
1751 1749
             'style' => '');
1752
-        $this->pdf->textBox($x+20, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1750
+        $this->pdf->textBox($x + 20, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1753 1751
         $texto = number_format($qCarga, 3, ",", ".");
1754 1752
         $aFont = array(
1755 1753
             'font' => $this->fontePadrao,
1756 1754
             'size' => 7,
1757 1755
             'style' => 'B');
1758
-        $this->pdf->textBox($x+17, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1756
+        $this->pdf->textBox($x + 17, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1759 1757
         $x = $w * 0.24;
1760
-        $this->pdf->line($x+25, $y, $x+25, $y + 9);
1758
+        $this->pdf->line($x + 25, $y, $x + 25, $y + 9);
1761 1759
         $texto = 'PESO AFERIDO (KG)';
1762 1760
         $aFont = array(
1763 1761
             'font' => $this->fontePadrao,
1764 1762
             'size' => 5,
1765 1763
             'style' => '');
1766
-        $this->pdf->textBox($x+35, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1764
+        $this->pdf->textBox($x + 35, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1767 1765
         $texto = number_format($qCarga, 3, ",", ".");
1768 1766
         $aFont = array(
1769 1767
             'font' => $this->fontePadrao,
1770 1768
             'size' => 7,
1771 1769
             'style' => 'B');
1772
-        $this->pdf->textBox($x+28, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1770
+        $this->pdf->textBox($x + 28, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1773 1771
         $x = $w * 0.36;
1774
-        $this->pdf->line($x+41.3, $y, $x+41.3, $y + 9);
1772
+        $this->pdf->line($x + 41.3, $y, $x + 41.3, $y + 9);
1775 1773
         $texto = 'CUBAGEM(M3)';
1776 1774
         $aFont = $this->formatPadrao;
1777
-        $this->pdf->textBox($x+60, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1775
+        $this->pdf->textBox($x + 60, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1778 1776
         $qCarga = '';
1779 1777
         foreach ($this->infQ as $infQ) {
1780 1778
             if ($this->getTagValue($infQ, "cUnid") == '00') {
@@ -1786,12 +1784,12 @@  discard block
 block discarded – undo
1786 1784
             'font' => $this->fontePadrao,
1787 1785
             'size' => 7,
1788 1786
             'style' => 'B');
1789
-        $this->pdf->textBox($x+50, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1787
+        $this->pdf->textBox($x + 50, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1790 1788
         $x = $w * 0.45;
1791 1789
         //$this->pdf->line($x+37, $y, $x+37, $y + 9);
1792 1790
         $texto = 'QTDE(VOL)';
1793 1791
         $aFont = $this->formatPadrao;
1794
-        $this->pdf->textBox($x+85, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1792
+        $this->pdf->textBox($x + 85, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1795 1793
         $qCarga = '';
1796 1794
         foreach ($this->infQ as $infQ) {
1797 1795
             if ($this->getTagValue($infQ, "cUnid") == '03') {
@@ -1803,9 +1801,9 @@  discard block
 block discarded – undo
1803 1801
             'font' => $this->fontePadrao,
1804 1802
             'size' => 7,
1805 1803
             'style' => 'B');
1806
-        $this->pdf->textBox($x+85, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1804
+        $this->pdf->textBox($x + 85, $y + 3, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1807 1805
         $x = $w * 0.53;
1808
-        $this->pdf->line($x+56, $y, $x+56, $y + 9);
1806
+        $this->pdf->line($x + 56, $y, $x + 56, $y + 9);
1809 1807
         /*$texto = 'NOME DA SEGURADORA';
1810 1808
         $aFont = $this->formatPadrao;
1811 1809
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
@@ -1981,7 +1979,7 @@  discard block
 block discarded – undo
1981 1979
         $texto = 'BASE DE CALCULO';
1982 1980
         $aFont = $this->formatPadrao;
1983 1981
         $this->pdf->textBox($x, $y, $w * 0.14, $h, $texto, $aFont, 'T', 'L', 0, '');
1984
-        $wCol02=0.15;
1982
+        $wCol02 = 0.15;
1985 1983
         $x += $w * $wCol02;
1986 1984
         $this->pdf->line($x, $y, $x, $y + 9.5);
1987 1985
         $texto = 'ALÍQ ICMS';
@@ -2283,7 +2281,7 @@  discard block
 block discarded – undo
2283 2281
             $this->arrayNFe[] = $chaveNFe;
2284 2282
         }
2285 2283
         $qtdeNFe = 1;
2286
-        if (count($this->arrayNFe) >15) {
2284
+        if (count($this->arrayNFe) > 15) {
2287 2285
             $this->flagDocOrigContinuacao = 1;
2288 2286
             $qtdeNFe = count($this->arrayNFe);
2289 2287
         }
@@ -2461,9 +2459,9 @@  discard block
 block discarded – undo
2461 2459
             //$h = 6 + 3; // de altura do texto (primeira linha
2462 2460
             //$h = 9 + 3.5 ;// segunda linha
2463 2461
             //$h = 9 + 3.5+ 3.5 ;// segunda linha
2464
-            $h = (( ( count($this->arrayNFe)/2 ) - 9) * 3.5)+9;
2465
-            if (count($this->arrayNFe)%2 !=0) {
2466
-                $h = $h+3.5;
2462
+            $h = (((count($this->arrayNFe) / 2) - 9) * 3.5) + 9;
2463
+            if (count($this->arrayNFe) % 2 != 0) {
2464
+                $h = $h + 3.5;
2467 2465
             } // Caso tenha apenas 1 registro na ultima linha
2468 2466
             $texto = 'DOCUMENTOS ORIGINÁRIOS - CONTINUACÃO';
2469 2467
             $aFont = $this->formatPadrao;
@@ -2513,7 +2511,7 @@  discard block
 block discarded – undo
2513 2511
             $auxX = $oldX;
2514 2512
             $yIniDados += 3;
2515 2513
             while ($contador < (count($this->arrayNFe))) {
2516
-                if ($contador%(116*($i-1)) == 0) {
2514
+                if ($contador % (116 * ($i - 1)) == 0) {
2517 2515
 //                    $contador++;
2518 2516
                     break;
2519 2517
                 }
@@ -2654,14 +2652,14 @@  discard block
 block discarded – undo
2654 2652
             $texto .= $xObs;
2655 2653
         }
2656 2654
         $textoObs = explode("Motorista:", $texto);
2657
-        $textoObs[1] = isset($textoObs[1]) ? "Motorista: ".$textoObs[1]: '';
2655
+        $textoObs[1] = isset($textoObs[1]) ? "Motorista: " . $textoObs[1] : '';
2658 2656
         $texto .= $this->getTagValue($this->imp, "infAdFisco", "\r\n");
2659 2657
         $aFont = array(
2660 2658
             'font' => $this->fontePadrao,
2661 2659
             'size' => 7.5,
2662 2660
             'style' => '');
2663 2661
         $this->pdf->textBox($x, $y, $w, $h, $textoObs[0], $aFont, 'T', 'L', 0, '', false);
2664
-        $this->pdf->textBox($x, $y+11.5, $w, $h, $textoObs[1], $aFont, 'T', 'L', 0, '', false);
2662
+        $this->pdf->textBox($x, $y + 11.5, $w, $h, $textoObs[1], $aFont, 'T', 'L', 0, '', false);
2665 2663
     }
2666 2664
 
2667 2665
     /**
@@ -2699,10 +2697,10 @@  discard block
 block discarded – undo
2699 2697
         $aFont = $this->formatNegrito;
2700 2698
         $this->pdf->textBox($x, $y + 3, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2701 2699
         $x += $w * 0.23;
2702
-        $this->pdf->line($x-20, $y, $x-20, $y + 6); // LINHA A FRENTE DA RNTRC DA EMPRESA
2700
+        $this->pdf->line($x - 20, $y, $x - 20, $y + 6); // LINHA A FRENTE DA RNTRC DA EMPRESA
2703 2701
         $texto = 'ESTE CONHECIMENTO DE TRANSPORTE ATENDE À LEGISLAÇÃO DE TRANSPORTE RODOVIÁRIO EM VIGOR';
2704 2702
         $aFont = $this->formatPadrao;
2705
-        $this->pdf->textBox($x-20, $y + 3, $w * 0.50, $h, $texto, $aFont, 'T', 'C', 0, '');
2703
+        $this->pdf->textBox($x - 20, $y + 3, $w * 0.50, $h, $texto, $aFont, 'T', 'C', 0, '');
2706 2704
     }
2707 2705
 
2708 2706
     /**
@@ -2735,13 +2733,13 @@  discard block
 block discarded – undo
2735 2733
         $this->pdf->textBox($x, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2736 2734
         $texto = 'CLASSE DA TARIFA';
2737 2735
         $aFont = $this->formatPadrao;
2738
-        $this->pdf->textBox($x+50, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2736
+        $this->pdf->textBox($x + 50, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2739 2737
         $texto = 'CÓDIGO DA TARIFA';
2740 2738
         $aFont = $this->formatPadrao;
2741
-        $this->pdf->textBox($x+80, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2739
+        $this->pdf->textBox($x + 80, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2742 2740
         $texto = 'VALOR DA TARIFA';
2743 2741
         $aFont = $this->formatPadrao;
2744
-        $this->pdf->textBox($x+110, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2742
+        $this->pdf->textBox($x + 110, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
2745 2743
         $texto = $this->getTagValue($this->aereo, "nOCA");
2746 2744
         $aFont = $this->formatNegrito;
2747 2745
         $this->pdf->textBox($x, $y + 3, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, '');
@@ -3252,7 +3250,7 @@  discard block
 block discarded – undo
3252 3250
         $this->pdf->textBox($x, $y, $w * 0.25, $h - 3.4, $texto, $aFont, 'B', 'C', 0, '');
3253 3251
         $x += $w * 0.25;
3254 3252
         $this->pdf->line($x, $y, $x, $y + 16.5);
3255
-        $texto = 'TÉRMINO DA PRESTAÇÃO - DATA/HORA' . "\r\n" . "\r\n" . "\r\n". "\r\n";
3253
+        $texto = 'TÉRMINO DA PRESTAÇÃO - DATA/HORA' . "\r\n" . "\r\n" . "\r\n" . "\r\n";
3256 3254
         $texto .= ' INÍCIO DA PRESTAÇÃO - DATA/HORA';
3257 3255
         $aFont = array(
3258 3256
             'font' => $this->fontePadrao,
@@ -3261,13 +3259,13 @@  discard block
 block discarded – undo
3261 3259
         $this->pdf->textBox($x + 10, $y, $w * 0.25, $h - 3.4, $texto, $aFont, 'T', 'C', 0, '');
3262 3260
         $x = $oldX;
3263 3261
         $y = $y + 5;
3264
-        $this->pdf->line($x, $y+3, $w * 0.255, $y+3); // LINHA HORIZONTAL ACIMA DO RG ABAIXO DO NOME
3262
+        $this->pdf->line($x, $y + 3, $w * 0.255, $y + 3); // LINHA HORIZONTAL ACIMA DO RG ABAIXO DO NOME
3265 3263
         $texto = 'RG';
3266 3264
         $aFont = array(
3267 3265
             'font' => $this->fontePadrao,
3268 3266
             'size' => 6,
3269 3267
             'style' => '');
3270
-        $this->pdf->textBox($x, $y+3, $w * 0.33, $h, $texto, $aFont, 'T', 'L', 0, '');
3268
+        $this->pdf->textBox($x, $y + 3, $w * 0.33, $h, $texto, $aFont, 'T', 'L', 0, '');
3271 3269
         $x += $w * 0.85;
3272 3270
         $this->pdf->line($x, $y + 11.5, $x, $y - 5); // LINHA VERTICAL PROXIMO AO CT-E
3273 3271
         $texto = "CT-E";
Please login to merge, or discard this patch.