Passed
Pull Request — master (#432)
by
unknown
03:02
created
src/CTe/Dacte.php 2 patches
Doc Comments   +45 added lines, -46 removed lines patch added patch discarded remove patch
@@ -98,6 +98,9 @@  discard block
 block discarded – undo
98 98
         $this->loadDoc($xml);
99 99
     }
100 100
 
101
+    /**
102
+     * @param string $xml
103
+     */
101 104
     private function loadDoc($xml)
102 105
     {
103 106
         $this->xml = $xml;
@@ -211,10 +214,6 @@  discard block
 block discarded – undo
211 214
      * A definição de margens e posições iniciais para a impressão são estabelecidas no
212 215
      * pelo conteúdo da funçao e podem ser modificados.
213 216
      *
214
-     * @param string $orientacao (Opcional) Estabelece a orientação da
215
-     *                impressão (ex. P-retrato), se nada for fornecido será
216
-     *                usado o padrão da NFe
217
-     * @param string $papel (Opcional) Estabelece o tamanho do papel (ex. A4)
218 217
      * @return string O ID da NFe numero de 44 digitos extraido do arquivo XML
219 218
      */
220 219
     protected function monta(
@@ -441,8 +440,8 @@  discard block
 block discarded – undo
441 440
      * cabecalho
442 441
      * Monta o cabelhalho da DACTE ( retrato e paisagem )
443 442
      *
444
-     * @param number $x Posição horizontal inicial, canto esquerdo
445
-     * @param number $y Posição vertical inicial, canto superior
443
+     * @param integer $x Posição horizontal inicial, canto esquerdo
444
+     * @param integer $y Posição vertical inicial, canto superior
446 445
      * @param number $pag Número da Página
447 446
      * @param number $totPag Total de páginas
448 447
      * @return number Posição vertical final
@@ -1096,8 +1095,7 @@  discard block
 block discarded – undo
1096 1095
      * rodapeDACTE
1097 1096
      * Monta o rodape no final da DACTE ( retrato e paisagem )
1098 1097
      *
1099
-     * @param number $xInic Posição horizontal canto esquerdo
1100
-     * @param number $yFinal Posição vertical final para impressão
1098
+     * @param integer $x
1101 1099
      */
1102 1100
     protected function rodape($x, $y)
1103 1101
     {
@@ -1121,8 +1119,8 @@  discard block
 block discarded – undo
1121 1119
      * remetente
1122 1120
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1123 1121
      *
1124
-     * @param number $x Posição horizontal canto esquerdo
1125
-     * @param number $y Posição vertical canto superior
1122
+     * @param integer $x Posição horizontal canto esquerdo
1123
+     * @param integer $y Posição vertical canto superior
1126 1124
      * @return number Posição vertical final
1127 1125
      */
1128 1126
     protected function remetente($x = 0, $y = 0)
@@ -1209,8 +1207,8 @@  discard block
 block discarded – undo
1209 1207
      * destinatario
1210 1208
      * Monta o campo com os dados do destinatário na DACTE.
1211 1209
      *
1212
-     * @param number $x Posição horizontal canto esquerdo
1213
-     * @param number $y Posição vertical canto superior
1210
+     * @param integer $x Posição horizontal canto esquerdo
1211
+     * @param integer $y Posição vertical canto superior
1214 1212
      * @return number Posição vertical final
1215 1213
      */
1216 1214
     protected function destinatario($x = 0, $y = 0)
@@ -1296,8 +1294,8 @@  discard block
 block discarded – undo
1296 1294
      * expedidor
1297 1295
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1298 1296
      *
1299
-     * @param number $x Posição horizontal canto esquerdo
1300
-     * @param number $y Posição vertical canto superior
1297
+     * @param integer $x Posição horizontal canto esquerdo
1298
+     * @param integer $y Posição vertical canto superior
1301 1299
      * @return number Posição vertical final
1302 1300
      */
1303 1301
     protected function expedidor($x = 0, $y = 0)
@@ -1393,8 +1391,8 @@  discard block
 block discarded – undo
1393 1391
      * recebedor
1394 1392
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1395 1393
      *
1396
-     * @param number $x Posição horizontal canto esquerdo
1397
-     * @param number $y Posição vertical canto superior
1394
+     * @param integer $x Posição horizontal canto esquerdo
1395
+     * @param integer $y Posição vertical canto superior
1398 1396
      * @return number Posição vertical final
1399 1397
      */
1400 1398
     protected function recebedor($x = 0, $y = 0)
@@ -1490,8 +1488,8 @@  discard block
 block discarded – undo
1490 1488
      * tomador
1491 1489
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1492 1490
      *
1493
-     * @param number $x Posição horizontal canto esquerdo
1494
-     * @param number $y Posição vertical canto superior
1491
+     * @param integer $x Posição horizontal canto esquerdo
1492
+     * @param integer $y Posição vertical canto superior
1495 1493
      * @return number Posição vertical final
1496 1494
      */
1497 1495
     protected function tomador($x = 0, $y = 0)
@@ -1579,8 +1577,8 @@  discard block
 block discarded – undo
1579 1577
      * descricaoCarga
1580 1578
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1581 1579
      *
1582
-     * @param number $x Posição horizontal canto esquerdo
1583
-     * @param number $y Posição vertical canto superior
1580
+     * @param integer $x Posição horizontal canto esquerdo
1581
+     * @param integer $y Posição vertical canto superior
1584 1582
      * @return number Posição vertical final
1585 1583
      */
1586 1584
     protected function descricaoCarga($x = 0, $y = 0)
@@ -1756,8 +1754,8 @@  discard block
 block discarded – undo
1756 1754
      * compValorServ
1757 1755
      * Monta o campo com os componentes da prestação de serviços.
1758 1756
      *
1759
-     * @param number $x Posição horizontal canto esquerdo
1760
-     * @param number $y Posição vertical canto superior
1757
+     * @param integer $x Posição horizontal canto esquerdo
1758
+     * @param integer $y Posição vertical canto superior
1761 1759
      * @return number Posição vertical final
1762 1760
      */
1763 1761
     protected function compValorServ($x = 0, $y = 0)
@@ -1855,8 +1853,8 @@  discard block
 block discarded – undo
1855 1853
      * impostos
1856 1854
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
1857 1855
      *
1858
-     * @param number $x Posição horizontal canto esquerdo
1859
-     * @param number $y Posição vertical canto superior
1856
+     * @param integer $x Posição horizontal canto esquerdo
1857
+     * @param integer $y Posição vertical canto superior
1860 1858
      * @return number Posição vertical final
1861 1859
      */
1862 1860
     protected function impostos($x = 0, $y = 0)
@@ -2401,8 +2399,8 @@  discard block
 block discarded – undo
2401 2399
      * docOrig
2402 2400
      * Monta o campo com os documentos originarios.
2403 2401
      *
2404
-     * @param number $x Posição horizontal canto esquerdo
2405
-     * @param number $y Posição vertical canto superior
2402
+     * @param integer $x Posição horizontal canto esquerdo
2403
+     * @param integer $y Posição vertical canto superior
2406 2404
      * @return number Posição vertical final
2407 2405
      */
2408 2406
     protected function docOrig($x = 0, $y = 0)
@@ -2697,8 +2695,8 @@  discard block
 block discarded – undo
2697 2695
      * docOrigContinuacao
2698 2696
      * Monta o campo com os documentos originarios.
2699 2697
      *
2700
-     * @param number $x Posição horizontal canto esquerdo
2701
-     * @param number $y Posição vertical canto superior
2698
+     * @param integer $x Posição horizontal canto esquerdo
2699
+     * @param integer $y Posição vertical canto superior
2702 2700
      * @return number Posição vertical final
2703 2701
      */
2704 2702
     protected function docOrigContinuacao($x = 0, $y = 0)
@@ -2818,8 +2816,8 @@  discard block
 block discarded – undo
2818 2816
      * docCompl
2819 2817
      * Monta o campo com os dados do remetente na DACTE.
2820 2818
      *
2821
-     * @param number $x Posição horizontal canto esquerdo
2822
-     * @param number $y Posição vertical canto superior
2819
+     * @param integer $x Posição horizontal canto esquerdo
2820
+     * @param integer $y Posição vertical canto superior
2823 2821
      * @return number Posição vertical final
2824 2822
      */
2825 2823
     protected function docCompl($x = 0, $y = 0)
@@ -2887,8 +2885,8 @@  discard block
 block discarded – undo
2887 2885
      * observacao
2888 2886
      * Monta o campo com os dados do remetente na DACTE.
2889 2887
      *
2890
-     * @param number $x Posição horizontal canto esquerdo
2891
-     * @param number $y Posição vertical canto superior
2888
+     * @param integer $x Posição horizontal canto esquerdo
2889
+     * @param integer $y Posição vertical canto superior
2892 2890
      * @return number Posição vertical final
2893 2891
      */
2894 2892
     protected function observacao($x = 0, $y = 0)
@@ -2930,8 +2928,8 @@  discard block
 block discarded – undo
2930 2928
      * modalRod
2931 2929
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
2932 2930
      *
2933
-     * @param number $x Posição horizontal canto esquerdo
2934
-     * @param number $y Posição vertical canto superior
2931
+     * @param integer $x Posição horizontal canto esquerdo
2932
+     * @param integer $y Posição vertical canto superior
2935 2933
      * @return number Posição vertical final
2936 2934
      */
2937 2935
     protected function modalRod($x = 0, $y = 0)
@@ -2971,8 +2969,8 @@  discard block
 block discarded – undo
2971 2969
      * modalAereo
2972 2970
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
2973 2971
      *
2974
-     * @param number $x Posição horizontal canto esquerdo
2975
-     * @param number $y Posição vertical canto superior
2972
+     * @param integer $x Posição horizontal canto esquerdo
2973
+     * @param integer $y Posição vertical canto superior
2976 2974
      * @return number Posição vertical final
2977 2975
      */
2978 2976
     protected function modalAereo($x = 0, $y = 0)
@@ -3028,8 +3026,8 @@  discard block
 block discarded – undo
3028 3026
      * modalAquaviario
3029 3027
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
3030 3028
      *
3031
-     * @param number $x Posição horizontal canto esquerdo
3032
-     * @param number $y Posição vertical canto superior
3029
+     * @param integer $x Posição horizontal canto esquerdo
3030
+     * @param integer $y Posição vertical canto superior
3033 3031
      * @return number Posição vertical final
3034 3032
      */
3035 3033
     protected function modalAquaviario($x = 0, $y = 0)
@@ -3145,8 +3143,8 @@  discard block
 block discarded – undo
3145 3143
      * modalFerr
3146 3144
      * Monta o campo com os dados do remetente na DACTE. ( retrato  e paisagem  )
3147 3145
      *
3148
-     * @param number $x Posição horizontal canto esquerdo
3149
-     * @param number $y Posição vertical canto superior
3146
+     * @param integer $x Posição horizontal canto esquerdo
3147
+     * @param integer $y Posição vertical canto superior
3150 3148
      * @return number Posição vertical final
3151 3149
      */
3152 3150
     protected function modalFerr($x = 0, $y = 0)
@@ -3423,8 +3421,8 @@  discard block
 block discarded – undo
3423 3421
      * canhoto
3424 3422
      * Monta o campo com os dados do remetente na DACTE.
3425 3423
      *
3426
-     * @param number $x Posição horizontal canto esquerdo
3427
-     * @param number $y Posição vertical canto superior
3424
+     * @param integer $x Posição horizontal canto esquerdo
3425
+     * @param integer $y Posição vertical canto superior
3428 3426
      * @return number Posição vertical final
3429 3427
      */
3430 3428
     protected function canhoto($x = 0, $y = 0)
@@ -3497,9 +3495,10 @@  discard block
 block discarded – undo
3497 3495
      * dadosAdic
3498 3496
      * Coloca o grupo de dados adicionais da DACTE.
3499 3497
      *
3500
-     * @param number $x Posição horizontal canto esquerdo
3501
-     * @param number $y Posição vertical canto superior
3502
-     * @param number $h altura do campo
3498
+     * @param integer $x Posição horizontal canto esquerdo
3499
+     * @param double $y Posição vertical canto superior
3500
+     * @param integer $h altura do campo
3501
+     * @param integer $pag
3503 3502
      * @return number Posição vertical final
3504 3503
      */
3505 3504
     protected function dadosAdic($x, $y, $pag, $h)
@@ -3692,7 +3691,7 @@  discard block
 block discarded – undo
3692 3691
      * Fornece a imformação multiplicação de peso contida na CTe
3693 3692
      *
3694 3693
      * @param interger $U Informação de peso extraida da CTe
3695
-     * @return interger
3694
+     * @return integer
3696 3695
      */
3697 3696
     protected function multiUniPeso($U = '')
3698 3697
     {
Please login to merge, or discard this patch.
Spacing   +10 added lines, -12 removed lines patch added patch discarded remove patch
@@ -945,7 +945,7 @@  discard block
 block discarded – undo
945 945
             $n = count($resp['message']);
946 946
             $alttot = $n * 15;
947 947
             $x = 10;
948
-            $y = $this->hPrint/2 - $alttot/2;
948
+            $y = $this->hPrint / 2 - $alttot / 2;
949 949
             $h = 15;
950 950
             $w = $maxW - (2 * $x);
951 951
             $this->pdf->settextcolor(90, 90, 90);
@@ -989,10 +989,10 @@  discard block
 block discarded – undo
989 989
             $resp['message'][] = 'CTe NÃO PROTOCOLADO';
990 990
         } elseif ($this->getTagValue($this->ide, "tpAmb") == '2' && $this->preVisualizar == '0') {
991 991
             $resp['status'] = false;
992
-            $resp['message'][] =  "CTe EMITIDO EM HOMOLOGAÇÃO";
992
+            $resp['message'][] = "CTe EMITIDO EM HOMOLOGAÇÃO";
993 993
         } elseif ($this->preVisualizar == '1') {
994 994
             $resp['status'] = false;
995
-            $resp['message'][] =  "PRÉ-VISUALIZAÇÃO";
995
+            $resp['message'][] = "PRÉ-VISUALIZAÇÃO";
996 996
         }
997 997
         $retEvento = $this->cteProc->getElementsByTagName('retEventoCTe')->item(0);
998 998
         $cStat = $this->getTagValue($this->cteProc, "cStat");
@@ -1013,7 +1013,7 @@  discard block
 block discarded – undo
1013 1013
         } elseif (!empty($retEvento)) {
1014 1014
             $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0);
1015 1015
             $cStat = $this->getTagValue($infEvento, "cStat");
1016
-            $tpEvento= $this->getTagValue($infEvento, "tpEvento");
1016
+            $tpEvento = $this->getTagValue($infEvento, "tpEvento");
1017 1017
             $dhEvento = date("d/m/Y H:i:s", $this->toTimestamp($this->getTagValue($infEvento, "dhRegEvento")));
1018 1018
             $nProt = $this->getTagValue($infEvento, "nProt");
1019 1019
             if ($tpEvento == '110111' && ($cStat == '101' || $cStat == '151' || $cStat == '135' || $cStat == '155')) {
@@ -1269,8 +1269,7 @@  discard block
 block discarded – undo
1269 1269
             $texto = $this->getTagValue($this->enderExped, "xLgr") . ', ';
1270 1270
             $texto .= $this->getTagValue($this->enderExped, "nro");
1271 1271
             $texto .= $this->getTagValue($this->enderExped, "xCpl") != "" ?
1272
-                ' - ' . $this->getTagValue($this->enderExped, "xCpl") :
1273
-                '';
1272
+                ' - ' . $this->getTagValue($this->enderExped, "xCpl") : '';
1274 1273
         } else {
1275 1274
             $texto = '';
1276 1275
         }
@@ -1366,8 +1365,7 @@  discard block
 block discarded – undo
1366 1365
             $texto = $this->getTagValue($this->enderReceb, "xLgr") . ', ';
1367 1366
             $texto .= $this->getTagValue($this->enderReceb, "nro");
1368 1367
             $texto .= ($this->getTagValue($this->enderReceb, "xCpl") != "") ?
1369
-                ' - ' . $this->getTagValue($this->enderReceb, "xCpl") :
1370
-                '';
1368
+                ' - ' . $this->getTagValue($this->enderReceb, "xCpl") : '';
1371 1369
         } else {
1372 1370
             $texto = '';
1373 1371
         }
@@ -1571,7 +1569,7 @@  discard block
 block discarded – undo
1571 1569
         $qCarga = 0;
1572 1570
         foreach ($this->infQ as $infQ) {
1573 1571
             if (in_array($this->getTagValue($infQ, "cUnid"), array('01', '02'))) {
1574
-                $qCarga += (float)$this->getTagValue($infQ, "qCarga");
1572
+                $qCarga += (float) $this->getTagValue($infQ, "qCarga");
1575 1573
             }
1576 1574
         }
1577 1575
         $texto = 'PESO BRUTO (KG)';
@@ -1622,7 +1620,7 @@  discard block
 block discarded – undo
1622 1620
         $qCarga = 0;
1623 1621
         foreach ($this->infQ as $infQ) {
1624 1622
             if ($this->getTagValue($infQ, "cUnid") == '00') {
1625
-                $qCarga += (float)$this->getTagValue($infQ, "qCarga");
1623
+                $qCarga += (float) $this->getTagValue($infQ, "qCarga");
1626 1624
             }
1627 1625
         }
1628 1626
         $texto = !empty($qCarga) ? number_format($qCarga, 3, ",", ".") : '';
@@ -1639,7 +1637,7 @@  discard block
 block discarded – undo
1639 1637
         $qCarga = 0;
1640 1638
         foreach ($this->infQ as $infQ) {
1641 1639
             if ($this->getTagValue($infQ, "cUnid") == '03') {
1642
-                $qCarga += (float)$this->getTagValue($infQ, "qCarga");
1640
+                $qCarga += (float) $this->getTagValue($infQ, "qCarga");
1643 1641
             }
1644 1642
         }
1645 1643
         $texto = !empty($qCarga) ? number_format($qCarga, 3, ",", ".") : '';
@@ -3569,7 +3567,7 @@  discard block
 block discarded – undo
3569 3567
         $y = $y + 5;
3570 3568
         $this->pdf->line($x, $y + 3, $w * 0.255, $y + 3); // LINHA HORIZONTAL ACIMA DO RG ABAIXO DO NOME
3571 3569
         $texto = 'RG';
3572
-        $aFont = ['font' => $this->fontePadrao,'size' => 6,'style' => ''];
3570
+        $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3573 3571
         $this->pdf->textBox($x, $y + 3, $w * 0.33, $h, $texto, $aFont, 'T', 'L', 0, '');
3574 3572
         $x += $w * 0.85;
3575 3573
         $this->pdf->line($x, $y + 11.5, $x, $y - 5); // LINHA VERTICAL PROXIMO AO CT-E
Please login to merge, or discard this patch.
src/Common/DaCommon.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             //ativar modo debug
122 122
             error_reporting(E_ALL);
123 123
             ini_set('display_errors', 'On');
124
-            set_error_handler(function (int $errnum, string $errmsg, string $errfile, int $errline) {
124
+            set_error_handler(function(int $errnum, string $errmsg, string $errfile, int $errline) {
125 125
                 throw new \Exception("Erro identificado $errnum: '$errmsg' $errfile [linha:" . $errline . "]");
126 126
             });
127 127
         } else {
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
         }
276 276
         if (substr($logo, 0, 24) !== 'data://text/plain;base64') {
277 277
             if (is_file($logo)) {
278
-                $logo = 'data://text/plain;base64,'. base64_encode(file_get_contents($logo));
278
+                $logo = 'data://text/plain;base64,' . base64_encode(file_get_contents($logo));
279 279
             } else {
280 280
                 //se não é uma string e nem um file retorna nulo
281 281
                 return null;
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
         imagedestroy($image);
318 318
         $logo = ob_get_contents(); // read from buffer
319 319
         ob_end_clean();
320
-        return 'data://text/plain;base64,'.base64_encode($logo);
320
+        return 'data://text/plain;base64,' . base64_encode($logo);
321 321
     }
322 322
 
323 323
     /**
Please login to merge, or discard this patch.
src/NFe/Danfe.php 2 patches
Doc Comments   +27 added lines, -19 removed lines patch added patch discarded remove patch
@@ -875,8 +875,8 @@  discard block
 block discarded – undo
875 875
      *header
876 876
      * Monta o cabelhalho da DANFE (retrato e paisagem)
877 877
      *
878
-     * @param number $x      Posição horizontal inicial, canto esquerdo
879
-     * @param number $y      Posição vertical inicial, canto superior
878
+     * @param integer $x      Posição horizontal inicial, canto esquerdo
879
+     * @param integer $y      Posição vertical inicial, canto superior
880 880
      * @param number $pag    Número da Página
881 881
      * @param number $totPag Total de páginas
882 882
      *
@@ -1265,8 +1265,8 @@  discard block
 block discarded – undo
1265 1265
      *
1266 1266
      * @name   destinatarioDANFE
1267 1267
      *
1268
-     * @param number $x Posição horizontal canto esquerdo
1269
-     * @param number $y Posição vertical canto superior
1268
+     * @param integer $x Posição horizontal canto esquerdo
1269
+     * @param integer $y Posição vertical canto superior
1270 1270
      *
1271 1271
      * @return number Posição vertical final
1272 1272
      */
@@ -1480,8 +1480,8 @@  discard block
 block discarded – undo
1480 1480
      *
1481 1481
      * @name   localEntregaDANFE
1482 1482
      *
1483
-     * @param number $x Posição horizontal canto esquerdo
1484
-     * @param number $y Posição vertical canto superior
1483
+     * @param integer $x Posição horizontal canto esquerdo
1484
+     * @param integer $y Posição vertical canto superior
1485 1485
      *
1486 1486
      * @return number Posição vertical final
1487 1487
      */
@@ -1633,8 +1633,8 @@  discard block
 block discarded – undo
1633 1633
      *
1634 1634
      * @name   localretiradaDANFE
1635 1635
      *
1636
-     * @param number $x Posição horizontal canto esquerdo
1637
-     * @param number $y Posição vertical canto superior
1636
+     * @param integer $x Posição horizontal canto esquerdo
1637
+     * @param integer $y Posição vertical canto superior
1638 1638
      *
1639 1639
      * @return number Posição vertical final
1640 1640
      */
@@ -1785,7 +1785,7 @@  discard block
 block discarded – undo
1785 1785
      * Gera a String do Texto da Fatura
1786 1786
      *
1787 1787
      * @name   getTextoFatura
1788
-     * @return uma String com o texto ou "";
1788
+     * @return string String com o texto ou "";
1789 1789
      */
1790 1790
     protected function getTextoFatura()
1791 1791
     {
@@ -1843,8 +1843,8 @@  discard block
 block discarded – undo
1843 1843
      *
1844 1844
      * @name   fatura
1845 1845
      *
1846
-     * @param number $x Posição horizontal canto esquerdo
1847
-     * @param number $y Posição vertical canto superior
1846
+     * @param integer $x Posição horizontal canto esquerdo
1847
+     * @param double $y Posição vertical canto superior
1848 1848
      *
1849 1849
      * @return number Posição vertical final
1850 1850
      */
@@ -1971,8 +1971,8 @@  discard block
 block discarded – undo
1971 1971
      *
1972 1972
      * @name   pagamento
1973 1973
      *
1974
-     * @param number $x Posição horizontal canto esquerdo
1975
-     * @param number $y Posição vertical canto superior
1974
+     * @param integer $x Posição horizontal canto esquerdo
1975
+     * @param double $y Posição vertical canto superior
1976 1976
      *
1977 1977
      * @return number Posição vertical final
1978 1978
      */
@@ -2105,6 +2105,8 @@  discard block
 block discarded – undo
2105 2105
      * @param float $h Altura do campo
2106 2106
      * @param float $h Título do campo
2107 2107
      * @param float $h Valor do imposto
2108
+     * @param string $titulo
2109
+     * @param string $campoImposto
2108 2110
      *
2109 2111
      * @return float Sugestão do $x do próximo imposto
2110 2112
      */
@@ -2133,10 +2135,10 @@  discard block
 block discarded – undo
2133 2135
      * imposto
2134 2136
      * Monta o campo de impostos e totais da DANFE (retrato e paisagem)
2135 2137
      *
2136
-     * @param number $x Posição horizontal canto esquerdo
2137
-     * @param number $y Posição vertical canto superior
2138
+     * @param integer $x Posição horizontal canto esquerdo
2139
+     * @param double $y Posição vertical canto superior
2138 2140
      *
2139
-     * @return number Posição vertical final
2141
+     * @return double Posição vertical final
2140 2142
      */
2141 2143
     protected function imposto($x, $y)
2142 2144
     {
@@ -2531,6 +2533,10 @@  discard block
 block discarded – undo
2531 2533
     } //fim transporte
2532 2534
 
2533 2535
 
2536
+    /**
2537
+     * @param string $campo
2538
+     * @param string $formato
2539
+     */
2534 2540
     protected function descricaoProdutoHelper($origem, $campo, $formato)
2535 2541
     {
2536 2542
         $valor_original = $origem->getElementsByTagName($campo)->item(0);
@@ -2640,7 +2646,6 @@  discard block
 block discarded – undo
2640 2646
      * @param float $x       Posição horizontal canto esquerdo
2641 2647
      * @param float $y       Posição vertical canto superior
2642 2648
      * @param float $nInicio Número do item inicial
2643
-     * @param float $max     Número do item final
2644 2649
      * @param float $hmax    Altura máxima do campo de itens em mm
2645 2650
      *
2646 2651
      * @return float Posição vertical final
@@ -3385,8 +3390,8 @@  discard block
 block discarded – undo
3385 3390
      *
3386 3391
      * @name   canhotoDANFE
3387 3392
      *
3388
-     * @param number $x Posição horizontal canto esquerdo
3389
-     * @param number $y Posição vertical canto superior
3393
+     * @param integer $x Posição horizontal canto esquerdo
3394
+     * @param integer $y Posição vertical canto superior
3390 3395
      *
3391 3396
      * @return number Posição vertical final
3392 3397
      *
@@ -3691,6 +3696,9 @@  discard block
 block discarded – undo
3691 3696
         return $saida;
3692 3697
     }
3693 3698
 
3699
+    /**
3700
+     * @param string $xml
3701
+     */
3694 3702
     private function loadDoc($xml)
3695 3703
     {
3696 3704
         $this->xml = $xml;
Please login to merge, or discard this patch.
Spacing   +230 added lines, -231 removed lines patch added patch discarded remove patch
@@ -310,39 +310,39 @@  discard block
 block discarded – undo
310 310
     {
311 311
         $this->textoAdic = '';
312 312
         //informações adicionais
313
-        $fontProduto            = [
313
+        $fontProduto = [
314 314
             'font'  => $this->fontePadrao,
315 315
             'size'  => 8,
316 316
             'style' => ''
317 317
         ];
318 318
         $k                      = $this->pdf->k;
319 319
         $this->textadicfontsize = $fontProduto['size'] / $k;
320
-        $this->textoAdic        .= $this->geraInformacoesDasNotasReferenciadas();
320
+        $this->textoAdic .= $this->geraInformacoesDasNotasReferenciadas();
321 321
         if (isset($this->infAdic)) {
322 322
             $i = 0;
323 323
             if ($this->textoAdic != '') {
324 324
                 $this->textoAdic .= ". \n";
325 325
             }
326
-            $this->textoAdic .= ! empty($this->getTagValue($this->infAdic, "infCpl"))
326
+            $this->textoAdic .= !empty($this->getTagValue($this->infAdic, "infCpl"))
327 327
                 ? 'Inf. Contribuinte: ' . $this->anfaveaDANFE($this->getTagValue($this->infAdic, "infCpl"))
328 328
                 : '';
329
-            $infPedido       = $this->geraInformacoesDaTagCompra();
329
+            $infPedido = $this->geraInformacoesDaTagCompra();
330 330
             if ($infPedido != "") {
331 331
                 $this->textoAdic .= $infPedido;
332 332
             }
333 333
             $this->textoAdic .= $this->getTagValue($this->dest, "email", ' Email do Destinatário: ');
334
-            $this->textoAdic .= ! empty($this->getTagValue($this->infAdic, "infAdFisco"))
334
+            $this->textoAdic .= !empty($this->getTagValue($this->infAdic, "infAdFisco"))
335 335
                 ? "\n Inf. fisco: " . $this->getTagValue($this->infAdic, "infAdFisco")
336 336
                 : '';
337
-            $obsCont         = $this->infAdic->getElementsByTagName("obsCont");
337
+            $obsCont = $this->infAdic->getElementsByTagName("obsCont");
338 338
             if (isset($obsCont)) {
339 339
                 foreach ($obsCont as $obs) {
340 340
                     $campo           = $obsCont->item($i)->getAttribute("xCampo");
341
-                    $xTexto          = ! empty($obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue)
341
+                    $xTexto          = !empty($obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue)
342 342
                         ? $obsCont->item($i)->getElementsByTagName("xTexto")->item(0)->nodeValue
343 343
                         : '';
344 344
                     $this->textoAdic .= "\n" . $campo . ':  ' . trim($xTexto);
345
-                    $i ++;
345
+                    $i++;
346 346
                 }
347 347
             }
348 348
         }
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
             $flagVTT  = $flagVTT && (strpos(strtolower(trim($this->textoAdic)), 'trib') ||
357 357
                     strpos(strtolower(trim($this->textoAdic)), 'imp'));
358 358
             $vTotTrib = $this->getTagValue($this->ICMSTot, 'vTotTrib');
359
-            if ($vTotTrib != '' && ! $flagVTT) {
359
+            if ($vTotTrib != '' && !$flagVTT) {
360 360
                 $this->textoAdic .= "\n Valor Aproximado dos Tributos : R$ "
361 361
                     . number_format($vTotTrib, 2, ",", ".");
362 362
             }
@@ -367,9 +367,9 @@  discard block
 block discarded – undo
367 367
         $this->textadicfontsize = $this->pdf->fontSize;
368 368
         $hdadosadic             = ceil($numlinhasdados * ($this->textadicfontsize));
369 369
         if ($hdadosadic > 70) {
370
-            for ($f = 8; $f > 3; $f --) {
370
+            for ($f = 8; $f > 3; $f--) {
371 371
                 $this->pdf->setFont($this->fontePadrao, '', $f);
372
-                $fontProduto            = [
372
+                $fontProduto = [
373 373
                     'font'  => $this->fontePadrao,
374 374
                     'size'  => $f,
375 375
                     'style' => ''
@@ -497,9 +497,9 @@  discard block
 block discarded – undo
497 497
         $this->hdadosadic = $this->calculoEspacoVericalDadosAdicionais();
498 498
 
499 499
         //altura disponivel para os campos da DANFE
500
-        $hcabecalho    = 47;//para cabeçalho
501
-        $hdestinatario = 25;//para destinatario
502
-        $hduplicatas   = 12;//para cada grupo de 7 duplicatas
500
+        $hcabecalho    = 47; //para cabeçalho
501
+        $hdestinatario = 25; //para destinatario
502
+        $hduplicatas   = 12; //para cada grupo de 7 duplicatas
503 503
         if (isset($this->entrega)) {
504 504
             $hlocalentrega = 25;
505 505
         } else {
@@ -510,11 +510,11 @@  discard block
 block discarded – undo
510 510
         } else {
511 511
             $hlocalretirada = 0;
512 512
         }
513
-        $himposto    = 18;// para imposto
514
-        $htransporte = 25;// para transporte
515
-        $hissqn      = 11;// para issqn
516
-        $hfooter     = 5;// para rodape
517
-        $hCabecItens = 4;//cabeçalho dos itens
513
+        $himposto    = 18; // para imposto
514
+        $htransporte = 25; // para transporte
515
+        $hissqn      = 11; // para issqn
516
+        $hfooter     = 5; // para rodape
517
+        $hCabecItens = 4; //cabeçalho dos itens
518 518
         $hOCUPADA    = $hcabecalho
519 519
             + $hdestinatario
520 520
             + $hlocalentrega
@@ -537,10 +537,10 @@  discard block
 block discarded – undo
537 537
         $this->sizeExtraTextoFatura());*/
538 538
 
539 539
         if ($this->orientacao == 'P') {
540
-            $hDispo1 -= 24 * $this->qCanhoto;//para canhoto
541
-            $w       = $this->wPrint;
540
+            $hDispo1 -= 24 * $this->qCanhoto; //para canhoto
541
+            $w = $this->wPrint;
542 542
         } else {
543
-            $hcanhoto = $this->hPrint;//para canhoto
543
+            $hcanhoto = $this->hPrint; //para canhoto
544 544
             $w        = $this->wPrint - $this->wCanhoto;
545 545
         }
546 546
         //$hDispo1 += 14;
@@ -561,18 +561,18 @@  discard block
 block discarded – undo
561 561
             $prod = $itemProd->getElementsByTagName('prod')->item(0);
562 562
             $uCom = $prod->getElementsByTagName("uCom")->item(0)->nodeValue;
563 563
             $uTrib = $prod->getElementsByTagName("uTrib")->item(0);
564
-            if (! empty($uTrib) && strcmp($uCom, $uTrib->nodeValue) != 0) {
564
+            if (!empty($uTrib) && strcmp($uCom, $uTrib->nodeValue) != 0) {
565 565
                 $mostrarUnidadeTributavel = true;
566 566
             }
567 567
 
568 568
             $hUsado += $this->calculeHeight($itemProd, $mostrarUnidadeTributavel);
569 569
             if ($hUsado > $hDispo) {
570
-                $totPag ++;
570
+                $totPag++;
571 571
                 $hDispo = $hDispo2;
572 572
                 $hUsado = $hCabecItens;
573
-                $i --; // decrementa para readicionar o item que não coube nessa pagina na outra.
573
+                $i--; // decrementa para readicionar o item que não coube nessa pagina na outra.
574 574
             }
575
-            $i ++;
575
+            $i++;
576 576
         } //fim da soma das areas de itens usadas
577 577
         $qtdeItens = $i; //controle da quantidade de itens no DANFE
578 578
         //montagem da primeira página
@@ -604,7 +604,7 @@  discard block
 block discarded – undo
604 604
         $formaPag = [];
605 605
         if (isset($this->detPag) && $this->detPag->length > 0) {
606 606
             foreach ($this->detPag as $k => $d) {
607
-                $fPag            = ! empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
607
+                $fPag            = !empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
608 608
                     ? $this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue
609 609
                     : '0';
610 610
                 $formaPag[$fPag] = $fPag;
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
         }
649 649
 
650 650
         //loop para páginas seguintes
651
-        for ($n = 2; $n <= $totPag; $n ++) {
651
+        for ($n = 2; $n <= $totPag; $n++) {
652 652
             // fixa as margens
653 653
             $this->pdf->setMargins($this->margesq, $this->margsup);
654 654
             //adiciona nova página
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
             }
673 673
             //se estiver na última página e ainda restar itens para inserir, adiciona mais uma página
674 674
             if ($n == $totPag && $this->qtdeItensProc < $qtdeItens) {
675
-                $totPag ++;
675
+                $totPag++;
676 676
             }
677 677
         }
678 678
     }
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
         if ($startPos === false) {
702 702
             return $cdata;
703 703
         }
704
-        for ($x = $len; $x > 0; $x --) {
704
+        for ($x = $len; $x > 0; $x--) {
705 705
             if (substr($cdata, $x, 1) == '>') {
706 706
                 $endPos = $x;
707 707
                 break;
@@ -797,15 +797,15 @@  discard block
 block discarded – undo
797 797
         //grupo CADATA infCpl
798 798
         $t          = $dom->getElementsByTagName('transmissor')->item(0);
799 799
         $r          = $dom->getElementsByTagName('receptor')->item(0);
800
-        $versao     = ! empty($dom->getElementsByTagName('versao')->item(0)->nodeValue) ?
800
+        $versao     = !empty($dom->getElementsByTagName('versao')->item(0)->nodeValue) ?
801 801
             'Versao:' . $dom->getElementsByTagName('versao')->item(0)->nodeValue . ' ' : '';
802
-        $especieNF  = ! empty($dom->getElementsByTagName('especieNF')->item(0)->nodeValue) ?
802
+        $especieNF  = !empty($dom->getElementsByTagName('especieNF')->item(0)->nodeValue) ?
803 803
             'Especie:' . $dom->getElementsByTagName('especieNF')->item(0)->nodeValue . ' ' : '';
804
-        $fabEntrega = ! empty($dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue) ?
804
+        $fabEntrega = !empty($dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue) ?
805 805
             'Entrega:' . $dom->getElementsByTagName('fabEntrega')->item(0)->nodeValue . ' ' : '';
806
-        $dca        = ! empty($dom->getElementsByTagName('dca')->item(0)->nodeValue) ?
806
+        $dca        = !empty($dom->getElementsByTagName('dca')->item(0)->nodeValue) ?
807 807
             'dca:' . $dom->getElementsByTagName('dca')->item(0)->nodeValue . ' ' : '';
808
-        $texto      .= "" . $versao . $especieNF . $fabEntrega . $dca;
808
+        $texto .= "" . $versao . $especieNF . $fabEntrega . $dca;
809 809
         if (isset($t)) {
810 810
             if ($t->hasAttributes()) {
811 811
                 $texto .= " Transmissor ";
@@ -847,7 +847,7 @@  discard block
 block discarded – undo
847 847
             $resp['message'][] = 'NFe NÃO PROTOCOLADA';
848 848
         } elseif ($this->getTagValue($this->ide, "tpAmb") == '2') {
849 849
             $resp['status'] = false;
850
-            $resp['message'][] =  "NFe EMITIDA EM HOMOLOGAÇÃO";
850
+            $resp['message'][] = "NFe EMITIDA EM HOMOLOGAÇÃO";
851 851
         }
852 852
         $retEvento = $this->nfeProc->getElementsByTagName('retEvento')->item(0);
853 853
         $cStat = $this->getTagValue($this->nfeProc, "cStat");
@@ -868,7 +868,7 @@  discard block
 block discarded – undo
868 868
         } elseif (!empty($retEvento)) {
869 869
             $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0);
870 870
             $cStat = $this->getTagValue($infEvento, "cStat");
871
-            $tpEvento= $this->getTagValue($infEvento, "tpEvento");
871
+            $tpEvento = $this->getTagValue($infEvento, "tpEvento");
872 872
             $dhEvento = date("d/m/Y H:i:s", $this->toTimestamp($this->getTagValue($infEvento, "dhRegEvento")));
873 873
             $nProt = $this->getTagValue($infEvento, "nProt");
874 874
             if ($tpEvento == '110111' && ($cStat == '101' || $cStat == '151' || $cStat == '135' || $cStat == '155')) {
@@ -882,7 +882,7 @@  discard block
 block discarded – undo
882 882
 
883 883
     protected function notaDPEC()
884 884
     {
885
-        return ! empty($this->numdepec);
885
+        return !empty($this->numdepec);
886 886
     }
887 887
 
888 888
     /**
@@ -931,7 +931,7 @@  discard block
 block discarded – undo
931 931
         //se for right separa 2/3 para os dados e o terço seguinte para o logo
932 932
         //se não houver logo centraliza dos dados do emitente
933 933
         // coloca o logo
934
-        if (! empty($this->logomarca)) {
934
+        if (!empty($this->logomarca)) {
935 935
             $logoInfo = getimagesize($this->logomarca);
936 936
             //largura da imagem em mm
937 937
             $logoWmm = ($logoInfo[0] / 72) * 25.4;
@@ -987,7 +987,7 @@  discard block
 block discarded – undo
987 987
             //endereço
988 988
             $y1     = $y1 + 5;
989 989
             $aFont  = ['font' => $this->fontePadrao, 'size' => 8, 'style' => ''];
990
-            $fone   = ! empty($this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue)
990
+            $fone   = !empty($this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue)
991 991
                 ? $this->enderEmit->getElementsByTagName("fone")->item(0)->nodeValue
992 992
                 : '';
993 993
             $lgr    = $this->getTagValue($this->enderEmit, "xLgr");
@@ -1006,8 +1006,8 @@  discard block
 block discarded – undo
1006 1006
 
1007 1007
         //####################################################################################
1008 1008
         //coluna central Danfe
1009
-        $x  += $w;
1010
-        $w  = round($maxW * 0.17, 0);//35;
1009
+        $x += $w;
1010
+        $w  = round($maxW * 0.17, 0); //35;
1011 1011
         $w2 = $w;
1012 1012
         $h  = 32;
1013 1013
         $this->pdf->textBox($x, $y, $w, $h);
@@ -1064,8 +1064,8 @@  discard block
 block discarded – undo
1064 1064
 
1065 1065
         //####################################################################################
1066 1066
         //coluna codigo de barras
1067
-        $x  += $w;
1068
-        $w  = ($maxW - $w1 - $w2);//85;
1067
+        $x += $w;
1068
+        $w  = ($maxW - $w1 - $w2); //85;
1069 1069
         $w3 = $w;
1070 1070
         $h  = 32;
1071 1071
         $this->pdf->textBox($x, $y, $w, $h);
@@ -1095,7 +1095,7 @@  discard block
 block discarded – undo
1095 1095
         } else {
1096 1096
             $cabecalhoProtoAutorizacao = 'PROTOCOLO DE AUTORIZAÇÃO DE USO';
1097 1097
         }
1098
-        if (($this->tpEmis == 2 || $this->tpEmis == 5) && ! $this->notaDpec()) {
1098
+        if (($this->tpEmis == 2 || $this->tpEmis == 5) && !$this->notaDpec()) {
1099 1099
             $cabecalhoProtoAutorizacao = "DADOS DA NF-E";
1100 1100
             $chaveContingencia         = $this->geraChaveAdicionalDeContingencia();
1101 1101
             $this->pdf->setFillColor(0, 0, 0);
@@ -1127,7 +1127,7 @@  discard block
 block discarded – undo
1127 1127
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1128 1128
         $w     = $w1 + $w2;
1129 1129
         $y     = $oldY;
1130
-        $oldY  += $h;
1130
+        $oldY += $h;
1131 1131
         $x     = $oldX;
1132 1132
         $h     = 7;
1133 1133
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1144,7 +1144,7 @@  discard block
 block discarded – undo
1144 1144
         // NOTA : DANFE sem protocolo deve existir somente no caso de contingência !!!
1145 1145
         // Além disso, existem várias NFes em contingência que eu recebo com protocolo de autorização.
1146 1146
         // Na minha opinião, deveríamos mostra-lo, mas o  manual  da NFe v4.01 diz outra coisa...
1147
-        if (($this->tpEmis == 2 || $this->tpEmis == 5) && ! $this->notaDpec()) {
1147
+        if (($this->tpEmis == 2 || $this->tpEmis == 5) && !$this->notaDpec()) {
1148 1148
             $aFont = ['font' => $this->fontePadrao, 'size' => 8, 'style' => 'B'];
1149 1149
             $texto = $this->formatField(
1150 1150
                 $chaveContingencia,
@@ -1158,7 +1158,7 @@  discard block
 block discarded – undo
1158 1158
                 $cStat = '';
1159 1159
             } else {
1160 1160
                 if (isset($this->nfeProc)) {
1161
-                    $texto  = ! empty($this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue)
1161
+                    $texto  = !empty($this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue)
1162 1162
                         ? $this->nfeProc->getElementsByTagName("nProt")->item(0)->nodeValue
1163 1163
                         : '';
1164 1164
                     $tsHora = $this->toTimestamp(
@@ -1188,7 +1188,7 @@  discard block
 block discarded – undo
1188 1188
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1189 1189
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1190 1190
         //INSCRIÇÃO MUNICIPAL
1191
-        $x     += $w;
1191
+        $x += $w;
1192 1192
         $texto = 'INSCRIÇÃO MUNICIPAL';
1193 1193
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1194 1194
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1196,29 +1196,29 @@  discard block
 block discarded – undo
1196 1196
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1197 1197
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1198 1198
         //INSCRIÇÃO ESTADUAL DO SUBST. TRIBUT.
1199
-        $x     += $w;
1199
+        $x += $w;
1200 1200
         $texto = 'INSCRIÇÃO ESTADUAL DO SUBST. TRIBUT.';
1201 1201
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1202 1202
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1203
-        $texto = ! empty($this->emit->getElementsByTagName("IEST")->item(0)->nodeValue)
1203
+        $texto = !empty($this->emit->getElementsByTagName("IEST")->item(0)->nodeValue)
1204 1204
             ? $this->emit->getElementsByTagName("IEST")->item(0)->nodeValue
1205 1205
             : '';
1206 1206
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1207 1207
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1208 1208
         //CNPJ
1209
-        $x     += $w;
1209
+        $x += $w;
1210 1210
         $w     = ($maxW - (3 * $w));
1211 1211
         $texto = 'CNPJ';
1212 1212
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1213 1213
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1214 1214
         //Pegando valor do CPF/CNPJ
1215
-        if (! empty($this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1215
+        if (!empty($this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1216 1216
             $texto = $this->formatField(
1217 1217
                 $this->emit->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1218 1218
                 "###.###.###/####-##"
1219 1219
             );
1220 1220
         } else {
1221
-            $texto = ! empty($this->emit->getElementsByTagName("CPF")->item(0)->nodeValue)
1221
+            $texto = !empty($this->emit->getElementsByTagName("CPF")->item(0)->nodeValue)
1222 1222
                 ? $this->formatField(
1223 1223
                     $this->emit->getElementsByTagName("CPF")->item(0)->nodeValue,
1224 1224
                     "###.###.###-##"
@@ -1237,7 +1237,7 @@  discard block
 block discarded – undo
1237 1237
             $n = count($resp['message']);
1238 1238
             $alttot = $n * 15;
1239 1239
             $x = 10;
1240
-            $y = $this->hPrint/2 - $alttot/2;
1240
+            $y = $this->hPrint / 2 - $alttot / 2;
1241 1241
             $h = 15;
1242 1242
             $w = $maxW - (2 * $x);
1243 1243
             $this->pdf->settextcolor(90, 90, 90);
@@ -1310,7 +1310,7 @@  discard block
 block discarded – undo
1310 1310
         //NOME / RAZÃO SOCIAL
1311 1311
         $w     = round($maxW * 0.61, 0);
1312 1312
         $w1    = $w;
1313
-        $y     += 3;
1313
+        $y += 3;
1314 1314
         $texto = 'NOME / RAZÃO SOCIAL';
1315 1315
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1316 1316
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1322,20 +1322,20 @@  discard block
 block discarded – undo
1322 1322
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, '');
1323 1323
         }
1324 1324
         //CNPJ / CPF
1325
-        $x     += $w;
1325
+        $x += $w;
1326 1326
         $w     = round($maxW * 0.23, 0);
1327 1327
         $w2    = $w;
1328 1328
         $texto = 'CNPJ / CPF';
1329 1329
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1330 1330
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1331 1331
         //Pegando valor do CPF/CNPJ
1332
-        if (! empty($this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1332
+        if (!empty($this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1333 1333
             $texto = $this->formatField(
1334 1334
                 $this->dest->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1335 1335
                 "###.###.###/####-##"
1336 1336
             );
1337 1337
         } else {
1338
-            $texto = ! empty($this->dest->getElementsByTagName("CPF")->item(0)->nodeValue)
1338
+            $texto = !empty($this->dest->getElementsByTagName("CPF")->item(0)->nodeValue)
1339 1339
                 ? $this->formatField(
1340 1340
                     $this->dest->getElementsByTagName("CPF")->item(0)->nodeValue,
1341 1341
                     "###.###.###-##"
@@ -1345,17 +1345,17 @@  discard block
 block discarded – undo
1345 1345
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1346 1346
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1347 1347
         //DATA DA EMISSÃO
1348
-        $x     += $w;
1348
+        $x += $w;
1349 1349
         $w     = $maxW - ($w1 + $w2);
1350 1350
         $wx    = $w;
1351 1351
         $texto = 'DATA DA EMISSÃO';
1352 1352
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1353 1353
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1354
-        $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue)
1354
+        $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue)
1355 1355
             ? $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue
1356 1356
             : '';
1357 1357
         if ($dEmi == '') {
1358
-            $dEmi  = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue)
1358
+            $dEmi  = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue)
1359 1359
                 ? $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue
1360 1360
                 : '';
1361 1361
             $aDemi = explode('T', $dEmi);
@@ -1371,7 +1371,7 @@  discard block
 block discarded – undo
1371 1371
         //ENDEREÇO
1372 1372
         $w     = round($maxW * 0.47, 0);
1373 1373
         $w1    = $w;
1374
-        $y     += $h;
1374
+        $y += $h;
1375 1375
         $x     = $oldX;
1376 1376
         $texto = 'ENDEREÇO';
1377 1377
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1383,7 +1383,7 @@  discard block
 block discarded – undo
1383 1383
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1384 1384
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true);
1385 1385
         //BAIRRO / DISTRITO
1386
-        $x     += $w;
1386
+        $x += $w;
1387 1387
         $w     = round($maxW * 0.21, 0);
1388 1388
         $w2    = $w;
1389 1389
         $texto = 'BAIRRO / DISTRITO';
@@ -1393,29 +1393,29 @@  discard block
 block discarded – undo
1393 1393
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1394 1394
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1395 1395
         //CEP
1396
-        $x     += $w;
1396
+        $x += $w;
1397 1397
         $w     = $maxW - $w1 - $w2 - $wx;
1398 1398
         $w2    = $w;
1399 1399
         $texto = 'CEP';
1400 1400
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1401 1401
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1402
-        $texto = ! empty($this->dest->getElementsByTagName("CEP")->item(0)->nodeValue)
1402
+        $texto = !empty($this->dest->getElementsByTagName("CEP")->item(0)->nodeValue)
1403 1403
             ? $this->dest->getElementsByTagName("CEP")->item(0)->nodeValue
1404 1404
             : '';
1405 1405
         $texto = $this->formatField($texto, "#####-###");
1406 1406
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1407 1407
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1408 1408
         //DATA DA SAÍDA
1409
-        $x     += $w;
1409
+        $x += $w;
1410 1410
         $w     = $wx;
1411 1411
         $texto = 'DATA DA SAÍDA/ENTRADA';
1412 1412
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1413 1413
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1414
-        $dSaiEnt = ! empty($this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue)
1414
+        $dSaiEnt = !empty($this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue)
1415 1415
             ? $this->ide->getElementsByTagName("dSaiEnt")->item(0)->nodeValue
1416 1416
             : '';
1417 1417
         if ($dSaiEnt == '') {
1418
-            $dSaiEnt  = ! empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1418
+            $dSaiEnt  = !empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1419 1419
                 ? $this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue
1420 1420
                 : '';
1421 1421
             $aDsaient = explode('T', $dSaiEnt);
@@ -1426,7 +1426,7 @@  discard block
 block discarded – undo
1426 1426
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1427 1427
         //MUNICÍPIO
1428 1428
         $w     = $w1;
1429
-        $y     += $h;
1429
+        $y += $h;
1430 1430
         $x     = $oldX;
1431 1431
         $texto = 'MUNICÍPIO';
1432 1432
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1440,7 +1440,7 @@  discard block
 block discarded – undo
1440 1440
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1441 1441
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
1442 1442
         //UF
1443
-        $x     += $w;
1443
+        $x += $w;
1444 1444
         $w     = 8;
1445 1445
         $texto = 'UF';
1446 1446
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1449,19 +1449,19 @@  discard block
 block discarded – undo
1449 1449
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1450 1450
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1451 1451
         //FONE / FAX
1452
-        $x     += $w;
1452
+        $x += $w;
1453 1453
         $w     = round(($maxW - $w1 - $wx - 8) / 2, 0);
1454 1454
         $w3    = $w;
1455 1455
         $texto = 'FONE / FAX';
1456 1456
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1457 1457
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1458
-        $texto = ! empty($this->dest->getElementsByTagName("fone")->item(0)->nodeValue)
1458
+        $texto = !empty($this->dest->getElementsByTagName("fone")->item(0)->nodeValue)
1459 1459
             ? $this->dest->getElementsByTagName("fone")->item(0)->nodeValue
1460 1460
             : '';
1461 1461
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1462 1462
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1463 1463
         //INSCRIÇÃO ESTADUAL
1464
-        $x     += $w;
1464
+        $x += $w;
1465 1465
         $w     = $maxW - $w1 - $wx - 8 - $w3;
1466 1466
         $texto = 'INSCRIÇÃO ESTADUAL';
1467 1467
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1471,16 +1471,16 @@  discard block
 block discarded – undo
1471 1471
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1472 1472
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1473 1473
         //HORA DA SAÍDA
1474
-        $x     += $w;
1474
+        $x += $w;
1475 1475
         $w     = $wx;
1476 1476
         $texto = 'HORA DA SAÍDA/ENTRADA';
1477 1477
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1478 1478
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1479
-        $hSaiEnt = ! empty($this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue)
1479
+        $hSaiEnt = !empty($this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue)
1480 1480
             ? $this->ide->getElementsByTagName("hSaiEnt")->item(0)->nodeValue
1481 1481
             : '';
1482 1482
         if ($hSaiEnt == '') {
1483
-            $dhSaiEnt   = ! empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1483
+            $dhSaiEnt   = !empty($this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue)
1484 1484
                 ? $this->ide->getElementsByTagName("dhSaiEnt")->item(0)->nodeValue
1485 1485
                 : '';
1486 1486
             $tsDhSaiEnt = $this->toTimestamp($dhSaiEnt);
@@ -1524,7 +1524,7 @@  discard block
 block discarded – undo
1524 1524
         //NOME / RAZÃO SOCIAL
1525 1525
         $w     = round($maxW * 0.61, 0);
1526 1526
         $w1    = $w;
1527
-        $y     += 3;
1527
+        $y += 3;
1528 1528
         $texto = 'NOME / RAZÃO SOCIAL';
1529 1529
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1530 1530
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1539,20 +1539,20 @@  discard block
 block discarded – undo
1539 1539
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, '');
1540 1540
         }
1541 1541
         //CNPJ / CPF
1542
-        $x     += $w;
1542
+        $x += $w;
1543 1543
         $w     = round($maxW * 0.23, 0);
1544 1544
         $w2    = $w;
1545 1545
         $texto = 'CNPJ / CPF';
1546 1546
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1547 1547
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1548 1548
         //Pegando valor do CPF/CNPJ
1549
-        if (! empty($this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1549
+        if (!empty($this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1550 1550
             $texto = $this->formatField(
1551 1551
                 $this->entrega->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1552 1552
                 "###.###.###/####-##"
1553 1553
             );
1554 1554
         } else {
1555
-            $texto = ! empty($this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1555
+            $texto = !empty($this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1556 1556
                 $this->formatField(
1557 1557
                     $this->entrega->getElementsByTagName("CPF")->item(0)->nodeValue,
1558 1558
                     "###.###.###-##"
@@ -1561,7 +1561,7 @@  discard block
 block discarded – undo
1561 1561
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1562 1562
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1563 1563
         //INSCRIÇÃO ESTADUAL
1564
-        $x     += $w;
1564
+        $x += $w;
1565 1565
         $w     = $maxW - ($w1 + $w2);
1566 1566
         $wx    = $w;
1567 1567
         $texto = 'INSCRIÇÃO ESTADUAL';
@@ -1580,7 +1580,7 @@  discard block
 block discarded – undo
1580 1580
         //ENDEREÇO
1581 1581
         $w     = round($maxW * 0.355, 0) + $wx;
1582 1582
         $w1    = $w;
1583
-        $y     += $h;
1583
+        $y += $h;
1584 1584
         $x     = $oldX;
1585 1585
         $texto = 'ENDEREÇO';
1586 1586
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1591,7 +1591,7 @@  discard block
 block discarded – undo
1591 1591
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1592 1592
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true);
1593 1593
         //BAIRRO / DISTRITO
1594
-        $x     += $w;
1594
+        $x += $w;
1595 1595
         $w     = round($maxW * 0.335, 0);
1596 1596
         $w2    = $w;
1597 1597
         $texto = 'BAIRRO / DISTRITO';
@@ -1601,12 +1601,12 @@  discard block
 block discarded – undo
1601 1601
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1602 1602
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1603 1603
         //CEP
1604
-        $x     += $w;
1604
+        $x += $w;
1605 1605
         $w     = $maxW - ($w1 + $w2);
1606 1606
         $texto = 'CEP';
1607 1607
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1608 1608
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1609
-        $texto = ! empty($this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1609
+        $texto = !empty($this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1610 1610
             $this->entrega->getElementsByTagName("CEP")->item(0)->nodeValue : '';
1611 1611
         $texto = $this->formatField($texto, "#####-###");
1612 1612
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
@@ -1614,7 +1614,7 @@  discard block
 block discarded – undo
1614 1614
         //MUNICÍPIO
1615 1615
         $w     = round($maxW * 0.805, 0);
1616 1616
         $w1    = $w;
1617
-        $y     += $h;
1617
+        $y += $h;
1618 1618
         $x     = $oldX;
1619 1619
         $texto = 'MUNICÍPIO';
1620 1620
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1626,7 +1626,7 @@  discard block
 block discarded – undo
1626 1626
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1627 1627
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
1628 1628
         //UF
1629
-        $x     += $w;
1629
+        $x += $w;
1630 1630
         $w     = 8;
1631 1631
         $texto = 'UF';
1632 1632
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1635,12 +1635,12 @@  discard block
 block discarded – undo
1635 1635
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1636 1636
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1637 1637
         //FONE / FAX
1638
-        $x     += $w;
1638
+        $x += $w;
1639 1639
         $w     = $maxW - $w - $w1;
1640 1640
         $texto = 'FONE / FAX';
1641 1641
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1642 1642
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1643
-        $texto = ! empty($this->entrega->getElementsByTagName("fone")->item(0)->nodeValue) ?
1643
+        $texto = !empty($this->entrega->getElementsByTagName("fone")->item(0)->nodeValue) ?
1644 1644
             $this->entrega->getElementsByTagName("fone")->item(0)->nodeValue : '';
1645 1645
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1646 1646
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
@@ -1677,7 +1677,7 @@  discard block
 block discarded – undo
1677 1677
         //NOME / RAZÃO SOCIAL
1678 1678
         $w     = round($maxW * 0.61, 0);
1679 1679
         $w1    = $w;
1680
-        $y     += 3;
1680
+        $y += 3;
1681 1681
         $texto = 'NOME / RAZÃO SOCIAL';
1682 1682
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1683 1683
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -1692,20 +1692,20 @@  discard block
 block discarded – undo
1692 1692
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 1, '');
1693 1693
         }
1694 1694
         //CNPJ / CPF
1695
-        $x     += $w;
1695
+        $x += $w;
1696 1696
         $w     = round($maxW * 0.23, 0);
1697 1697
         $w2    = $w;
1698 1698
         $texto = 'CNPJ / CPF';
1699 1699
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1700 1700
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1701 1701
         //Pegando valor do CPF/CNPJ
1702
-        if (! empty($this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1702
+        if (!empty($this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue)) {
1703 1703
             $texto = $this->formatField(
1704 1704
                 $this->retirada->getElementsByTagName("CNPJ")->item(0)->nodeValue,
1705 1705
                 "###.###.###/####-##"
1706 1706
             );
1707 1707
         } else {
1708
-            $texto = ! empty($this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1708
+            $texto = !empty($this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue) ?
1709 1709
                 $this->formatField(
1710 1710
                     $this->retirada->getElementsByTagName("CPF")->item(0)->nodeValue,
1711 1711
                     "###.###.###-##"
@@ -1714,7 +1714,7 @@  discard block
 block discarded – undo
1714 1714
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1715 1715
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1716 1716
         //INSCRIÇÃO ESTADUAL
1717
-        $x     += $w;
1717
+        $x += $w;
1718 1718
         $w     = $maxW - ($w1 + $w2);
1719 1719
         $wx    = $w;
1720 1720
         $texto = 'INSCRIÇÃO ESTADUAL';
@@ -1733,7 +1733,7 @@  discard block
 block discarded – undo
1733 1733
         //ENDEREÇO
1734 1734
         $w     = round($maxW * 0.355, 0) + $wx;
1735 1735
         $w1    = $w;
1736
-        $y     += $h;
1736
+        $y += $h;
1737 1737
         $x     = $oldX;
1738 1738
         $texto = 'ENDEREÇO';
1739 1739
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1744,7 +1744,7 @@  discard block
 block discarded – undo
1744 1744
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1745 1745
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '', true);
1746 1746
         //BAIRRO / DISTRITO
1747
-        $x     += $w;
1747
+        $x += $w;
1748 1748
         $w     = round($maxW * 0.335, 0);
1749 1749
         $w2    = $w;
1750 1750
         $texto = 'BAIRRO / DISTRITO';
@@ -1754,12 +1754,12 @@  discard block
 block discarded – undo
1754 1754
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1755 1755
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1756 1756
         //CEP
1757
-        $x     += $w;
1757
+        $x += $w;
1758 1758
         $w     = $maxW - ($w1 + $w2);
1759 1759
         $texto = 'CEP';
1760 1760
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1761 1761
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1762
-        $texto = ! empty($this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1762
+        $texto = !empty($this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue) ?
1763 1763
             $this->retirada->getElementsByTagName("CEP")->item(0)->nodeValue : '';
1764 1764
         $texto = $this->formatField($texto, "#####-###");
1765 1765
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
@@ -1767,7 +1767,7 @@  discard block
 block discarded – undo
1767 1767
         //MUNICÍPIO
1768 1768
         $w     = round($maxW * 0.805, 0);
1769 1769
         $w1    = $w;
1770
-        $y     += $h;
1770
+        $y += $h;
1771 1771
         $x     = $oldX;
1772 1772
         $texto = 'MUNICÍPIO';
1773 1773
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1779,7 +1779,7 @@  discard block
 block discarded – undo
1779 1779
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1780 1780
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
1781 1781
         //UF
1782
-        $x     += $w;
1782
+        $x += $w;
1783 1783
         $w     = 8;
1784 1784
         $texto = 'UF';
1785 1785
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -1788,12 +1788,12 @@  discard block
 block discarded – undo
1788 1788
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1789 1789
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
1790 1790
         //FONE / FAX
1791
-        $x     += $w;
1791
+        $x += $w;
1792 1792
         $w     = $maxW - $w - $w1;
1793 1793
         $texto = 'FONE / FAX';
1794 1794
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
1795 1795
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
1796
-        $texto = ! empty($this->retirada->getElementsByTagName("fone")->item(0)->nodeValue) ?
1796
+        $texto = !empty($this->retirada->getElementsByTagName("fone")->item(0)->nodeValue) ?
1797 1797
             $this->retirada->getElementsByTagName("fone")->item(0)->nodeValue : '';
1798 1798
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
1799 1799
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
@@ -1813,7 +1813,7 @@  discard block
 block discarded – undo
1813 1813
         if (isset($this->cobr)) {
1814 1814
             $fat = $this->cobr->getElementsByTagName("fat")->item(0);
1815 1815
             if (isset($fat)) {
1816
-                if (! empty($this->getTagValue($this->ide, "indPag"))) {
1816
+                if (!empty($this->getTagValue($this->ide, "indPag"))) {
1817 1817
                     $textoIndPag = "";
1818 1818
                     $indPag      = $this->getTagValue($this->ide, "indPag");
1819 1819
                     if ($indPag === "0") {
@@ -1888,7 +1888,7 @@  discard block
 block discarded – undo
1888 1888
             $h     = 8;
1889 1889
             $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B'];
1890 1890
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
1891
-            $y       += 3;
1891
+            $y += 3;
1892 1892
             $dups    = "";
1893 1893
             $dupcont = 0;
1894 1894
             $nFat    = $this->dup->length;
@@ -1922,13 +1922,13 @@  discard block
 block discarded – undo
1922 1922
             }
1923 1923
             $increm = 1;
1924 1924
             foreach ($this->dup as $k => $d) {
1925
-                $nDup  = ! empty($this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue)
1925
+                $nDup  = !empty($this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue)
1926 1926
                     ? $this->dup->item($k)->getElementsByTagName('nDup')->item(0)->nodeValue
1927 1927
                     : '';
1928
-                $dDup  = ! empty($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue)
1928
+                $dDup  = !empty($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue)
1929 1929
                     ? $this->ymdTodmy($this->dup->item($k)->getElementsByTagName('dVenc')->item(0)->nodeValue)
1930 1930
                     : '';
1931
-                $vDup  = ! empty($this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue)
1931
+                $vDup  = !empty($this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue)
1932 1932
                     ? 'R$ ' . number_format(
1933 1933
                         $this->dup->item($k)->getElementsByTagName('vDup')->item(0)->nodeValue,
1934 1934
                         2,
@@ -1975,7 +1975,7 @@  discard block
 block discarded – undo
1975 1975
             }
1976 1976
             if ($dupcont == 0) {
1977 1977
                 $y -= 9;
1978
-                $linha --;
1978
+                $linha--;
1979 1979
             }
1980 1980
 
1981 1981
             return ($y + $h);
@@ -2015,7 +2015,7 @@  discard block
 block discarded – undo
2015 2015
             $h     = 8;
2016 2016
             $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B'];
2017 2017
             $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
2018
-            $y       += 3;
2018
+            $y += 3;
2019 2019
             $dups    = "";
2020 2020
             $dupcont = 0;
2021 2021
             if ($this->orientacao == 'P') {
@@ -2044,7 +2044,7 @@  discard block
 block discarded – undo
2044 2044
                 '90' => 'Sem pagamento',
2045 2045
                 '99' => 'Outros'
2046 2046
             ];
2047
-            $bandeira       = [
2047
+            $bandeira = [
2048 2048
                 '01' => 'Visa',
2049 2049
                 '02' => 'Mastercard',
2050 2050
                 '03' => 'American',
@@ -2057,10 +2057,10 @@  discard block
 block discarded – undo
2057 2057
                 '99' => 'Outros'
2058 2058
             ];
2059 2059
             foreach ($this->detPag as $k => $d) {
2060
-                $fPag  = ! empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
2060
+                $fPag  = !empty($this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue)
2061 2061
                     ? $this->detPag->item($k)->getElementsByTagName('tPag')->item(0)->nodeValue
2062 2062
                     : '0';
2063
-                $vPag  = ! empty($this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue)
2063
+                $vPag  = !empty($this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue)
2064 2064
                     ? 'R$ ' . number_format(
2065 2065
                         $this->detPag->item($k)->getElementsByTagName('vPag')->item(0)->nodeValue,
2066 2066
                         2,
@@ -2103,7 +2103,7 @@  discard block
 block discarded – undo
2103 2103
             }
2104 2104
             if ($dupcont == 0) {
2105 2105
                 $y -= 9;
2106
-                $linha --;
2106
+                $linha--;
2107 2107
             }
2108 2108
 
2109 2109
             return ($y + $h);
@@ -2135,7 +2135,7 @@  discard block
 block discarded – undo
2135 2135
         $the_field    = $this->ICMSTot->getElementsByTagName($campoImposto)->item(0);
2136 2136
         if (isset($the_field)) {
2137 2137
             $the_value = $the_field->nodeValue;
2138
-            if (! empty($the_value)) {
2138
+            if (!empty($the_value)) {
2139 2139
                 $valorImposto = number_format($the_value, 2, ",", ".");
2140 2140
             }
2141 2141
         }
@@ -2164,10 +2164,10 @@  discard block
 block discarded – undo
2164 2164
         $x_inicial = $x;
2165 2165
         //#####################################################################
2166 2166
         $campos_por_linha = 9;
2167
-        if (! $this->exibirPIS) {
2168
-            $campos_por_linha --;
2167
+        if (!$this->exibirPIS) {
2168
+            $campos_por_linha--;
2169 2169
         }
2170
-        if (! $this->exibirIcmsInterestadual) {
2170
+        if (!$this->exibirIcmsInterestadual) {
2171 2171
             $campos_por_linha -= 2;
2172 2172
         }
2173 2173
 
@@ -2254,12 +2254,12 @@  discard block
 block discarded – undo
2254 2254
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
2255 2255
         //NOME / RAZÃO SOCIAL
2256 2256
         $w1    = $maxW * 0.29;
2257
-        $y     += 3;
2257
+        $y += 3;
2258 2258
         $texto = 'NOME / RAZÃO SOCIAL';
2259 2259
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2260 2260
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, '');
2261 2261
         if (isset($this->transporta)) {
2262
-            $texto = ! empty($this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue)
2262
+            $texto = !empty($this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue)
2263 2263
                 ? $this->transporta->getElementsByTagName("xNome")->item(0)->nodeValue
2264 2264
                 : '';
2265 2265
         } else {
@@ -2268,12 +2268,12 @@  discard block
 block discarded – undo
2268 2268
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2269 2269
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'L', 0, '');
2270 2270
         //FRETE POR CONTA
2271
-        $x     += $w1;
2271
+        $x += $w1;
2272 2272
         $w2    = $maxW * 0.15;
2273 2273
         $texto = 'FRETE';
2274 2274
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2275 2275
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2276
-        $tipoFrete = ! empty($this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue)
2276
+        $tipoFrete = !empty($this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue)
2277 2277
             ? $this->transp->getElementsByTagName("modFrete")->item(0)->nodeValue
2278 2278
             : '0';
2279 2279
         switch ($tipoFrete) {
@@ -2299,12 +2299,12 @@  discard block
 block discarded – undo
2299 2299
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2300 2300
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'C', 'C', 1, '');
2301 2301
         //CÓDIGO ANTT
2302
-        $x     += $w2;
2302
+        $x += $w2;
2303 2303
         $texto = 'CÓDIGO ANTT';
2304 2304
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2305 2305
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2306 2306
         if (isset($this->veicTransp)) {
2307
-            $texto = ! empty($this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue)
2307
+            $texto = !empty($this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue)
2308 2308
                 ? $this->veicTransp->getElementsByTagName("RNTC")->item(0)->nodeValue
2309 2309
                 : '';
2310 2310
         } else {
@@ -2313,16 +2313,16 @@  discard block
 block discarded – undo
2313 2313
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2314 2314
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2315 2315
         //PLACA DO VEÍC
2316
-        $x     += $w2;
2316
+        $x += $w2;
2317 2317
         $texto = 'PLACA DO VEÍCULO';
2318 2318
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2319 2319
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2320 2320
         if (isset($this->veicTransp)) {
2321
-            $texto = ! empty($this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue)
2321
+            $texto = !empty($this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue)
2322 2322
                 ? $this->veicTransp->getElementsByTagName("placa")->item(0)->nodeValue
2323 2323
                 : '';
2324 2324
         } elseif (isset($this->reboque)) {
2325
-            $texto = ! empty($this->reboque->getElementsByTagName("placa")->item(0)->nodeValue)
2325
+            $texto = !empty($this->reboque->getElementsByTagName("placa")->item(0)->nodeValue)
2326 2326
                 ? $this->reboque->getElementsByTagName("placa")->item(0)->nodeValue
2327 2327
                 : '';
2328 2328
         } else {
@@ -2331,17 +2331,17 @@  discard block
 block discarded – undo
2331 2331
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2332 2332
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2333 2333
         //UF
2334
-        $x     += $w2;
2334
+        $x += $w2;
2335 2335
         $w3    = round($maxW * 0.04, 0);
2336 2336
         $texto = 'UF';
2337 2337
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2338 2338
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'L', 1, '');
2339 2339
         if (isset($this->veicTransp)) {
2340
-            $texto = ! empty($this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue)
2340
+            $texto = !empty($this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue)
2341 2341
                 ? $this->veicTransp->getElementsByTagName("UF")->item(0)->nodeValue
2342 2342
                 : '';
2343 2343
         } elseif (isset($this->reboque)) {
2344
-            $texto = ! empty($this->reboque->getElementsByTagName("UF")->item(0)->nodeValue)
2344
+            $texto = !empty($this->reboque->getElementsByTagName("UF")->item(0)->nodeValue)
2345 2345
                 ? $this->reboque->getElementsByTagName("UF")->item(0)->nodeValue
2346 2346
                 : '';
2347 2347
         } else {
@@ -2350,20 +2350,20 @@  discard block
 block discarded – undo
2350 2350
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2351 2351
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'C', 0, '');
2352 2352
         //CNPJ / CPF
2353
-        $x     += $w3;
2353
+        $x += $w3;
2354 2354
         $w     = $maxW - ($w1 + 3 * $w2 + $w3);
2355 2355
         $texto = 'CNPJ / CPF';
2356 2356
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2357 2357
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
2358 2358
         if (isset($this->transporta)) {
2359
-            $texto = ! empty($this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue)
2359
+            $texto = !empty($this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue)
2360 2360
                 ? $this->formatField(
2361 2361
                     $this->transporta->getElementsByTagName("CNPJ")->item(0)->nodeValue,
2362 2362
                     "##.###.###/####-##"
2363 2363
                 )
2364 2364
                 : '';
2365 2365
             if ($texto == '') {
2366
-                $texto = ! empty($this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue)
2366
+                $texto = !empty($this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue)
2367 2367
                     ? $this->formatField(
2368 2368
                         $this->transporta->getElementsByTagName("CPF")->item(0)->nodeValue,
2369 2369
                         "###.###.###-##"
@@ -2377,7 +2377,7 @@  discard block
 block discarded – undo
2377 2377
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'C', 0, '');
2378 2378
         //#####################################################################
2379 2379
         //ENDEREÇO
2380
-        $y     += $h;
2380
+        $y += $h;
2381 2381
         $x     = $oldX;
2382 2382
         $h     = 7;
2383 2383
         $w1    = $maxW * 0.44;
@@ -2385,7 +2385,7 @@  discard block
 block discarded – undo
2385 2385
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2386 2386
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, '');
2387 2387
         if (isset($this->transporta)) {
2388
-            $texto = ! empty($this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue)
2388
+            $texto = !empty($this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue)
2389 2389
                 ? $this->transporta->getElementsByTagName("xEnder")->item(0)->nodeValue
2390 2390
                 : '';
2391 2391
         } else {
@@ -2394,13 +2394,13 @@  discard block
 block discarded – undo
2394 2394
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2395 2395
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'L', 0, '');
2396 2396
         //MUNICÍPIO
2397
-        $x     += $w1;
2397
+        $x += $w1;
2398 2398
         $w2    = round($maxW * 0.30, 0);
2399 2399
         $texto = 'MUNICÍPIO';
2400 2400
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2401 2401
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2402 2402
         if (isset($this->transporta)) {
2403
-            $texto = ! empty($this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue)
2403
+            $texto = !empty($this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue)
2404 2404
                 ? $this->transporta->getElementsByTagName("xMun")->item(0)->nodeValue
2405 2405
                 : '';
2406 2406
         } else {
@@ -2409,13 +2409,13 @@  discard block
 block discarded – undo
2409 2409
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2410 2410
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2411 2411
         //UF
2412
-        $x     += $w2;
2412
+        $x += $w2;
2413 2413
         $w3    = round($maxW * 0.04, 0);
2414 2414
         $texto = 'UF';
2415 2415
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2416 2416
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'L', 1, '');
2417 2417
         if (isset($this->transporta)) {
2418
-            $texto = ! empty($this->transporta->getElementsByTagName("UF")->item(0)->nodeValue)
2418
+            $texto = !empty($this->transporta->getElementsByTagName("UF")->item(0)->nodeValue)
2419 2419
                 ? $this->transporta->getElementsByTagName("UF")->item(0)->nodeValue
2420 2420
                 : '';
2421 2421
         } else {
@@ -2424,14 +2424,14 @@  discard block
 block discarded – undo
2424 2424
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2425 2425
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'C', 0, '');
2426 2426
         //INSCRIÇÃO ESTADUAL
2427
-        $x     += $w3;
2427
+        $x += $w3;
2428 2428
         $w     = $maxW - ($w1 + $w2 + $w3);
2429 2429
         $texto = 'INSCRIÇÃO ESTADUAL';
2430 2430
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2431 2431
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
2432 2432
         $texto = '';
2433 2433
         if (isset($this->transporta)) {
2434
-            if (! empty($this->transporta->getElementsByTagName("IE")->item(0)->nodeValue)) {
2434
+            if (!empty($this->transporta->getElementsByTagName("IE")->item(0)->nodeValue)) {
2435 2435
                 $texto = $this->transporta->getElementsByTagName("IE")->item(0)->nodeValue;
2436 2436
             }
2437 2437
         }
@@ -2447,13 +2447,13 @@  discard block
 block discarded – undo
2447 2447
         $pesoBruto   = 0;
2448 2448
         $pesoLiquido = 0;
2449 2449
         foreach ($volumes as $volume) {
2450
-            $quantidade  += ! empty($volume->getElementsByTagName("qVol")->item(0)->nodeValue) ?
2450
+            $quantidade  += !empty($volume->getElementsByTagName("qVol")->item(0)->nodeValue) ?
2451 2451
                 $volume->getElementsByTagName("qVol")->item(0)->nodeValue : 0;
2452
-            $pesoBruto   += ! empty($volume->getElementsByTagName("pesoB")->item(0)->nodeValue) ?
2452
+            $pesoBruto   += !empty($volume->getElementsByTagName("pesoB")->item(0)->nodeValue) ?
2453 2453
                 $volume->getElementsByTagName("pesoB")->item(0)->nodeValue : 0;
2454
-            $pesoLiquido += ! empty($volume->getElementsByTagName("pesoL")->item(0)->nodeValue) ?
2454
+            $pesoLiquido += !empty($volume->getElementsByTagName("pesoL")->item(0)->nodeValue) ?
2455 2455
                 $volume->getElementsByTagName("pesoL")->item(0)->nodeValue : 0;
2456
-            $texto       = ! empty($this->transp->getElementsByTagName("esp")->item(0)->nodeValue) ?
2456
+            $texto = !empty($this->transp->getElementsByTagName("esp")->item(0)->nodeValue) ?
2457 2457
                 $this->transp->getElementsByTagName("esp")->item(0)->nodeValue : '';
2458 2458
             if ($texto != $especie && $especie != '') {
2459 2459
                 //tem várias especies
@@ -2461,7 +2461,7 @@  discard block
 block discarded – undo
2461 2461
             } else {
2462 2462
                 $especie = $texto;
2463 2463
             }
2464
-            $texto = ! empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue)
2464
+            $texto = !empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue)
2465 2465
                 ? $this->transp->getElementsByTagName("marca")->item(0)->nodeValue
2466 2466
                 : '';
2467 2467
             if ($texto != $marca && $marca != '') {
@@ -2470,7 +2470,7 @@  discard block
 block discarded – undo
2470 2470
             } else {
2471 2471
                 $marca = $texto;
2472 2472
             }
2473
-            $texto = ! empty($this->transp->getElementsByTagName("nVol")->item(0)->nodeValue)
2473
+            $texto = !empty($this->transp->getElementsByTagName("nVol")->item(0)->nodeValue)
2474 2474
                 ? $this->transp->getElementsByTagName("nVol")->item(0)->nodeValue
2475 2475
                 : '';
2476 2476
             if ($texto != $numero && $numero != '') {
@@ -2483,20 +2483,20 @@  discard block
 block discarded – undo
2483 2483
 
2484 2484
         //#####################################################################
2485 2485
         //QUANTIDADE
2486
-        $y     += $h;
2486
+        $y += $h;
2487 2487
         $x     = $oldX;
2488 2488
         $h     = 7;
2489 2489
         $w1    = round($maxW * 0.10, 0);
2490 2490
         $texto = 'QUANTIDADE';
2491 2491
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2492 2492
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'T', 'L', 1, '');
2493
-        if (! empty($quantidade)) {
2493
+        if (!empty($quantidade)) {
2494 2494
             $texto = $quantidade;
2495 2495
             $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2496 2496
             $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'B', 'C', 0, '');
2497 2497
         }
2498 2498
         //ESPÉCIE
2499
-        $x     += $w1;
2499
+        $x += $w1;
2500 2500
         $w2    = round($maxW * 0.17, 0);
2501 2501
         $texto = 'ESPÉCIE';
2502 2502
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -2505,16 +2505,16 @@  discard block
 block discarded – undo
2505 2505
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2506 2506
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2507 2507
         //MARCA
2508
-        $x     += $w2;
2508
+        $x += $w2;
2509 2509
         $texto = 'MARCA';
2510 2510
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2511 2511
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
2512
-        $texto = ! empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) ?
2512
+        $texto = !empty($this->transp->getElementsByTagName("marca")->item(0)->nodeValue) ?
2513 2513
             $this->transp->getElementsByTagName("marca")->item(0)->nodeValue : '';
2514 2514
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2515 2515
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2516 2516
         //NUMERAÇÃO
2517
-        $x     += $w2;
2517
+        $x += $w2;
2518 2518
         $texto = 'NUMERAÇÃO';
2519 2519
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2520 2520
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -2522,7 +2522,7 @@  discard block
 block discarded – undo
2522 2522
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2523 2523
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'B', 'C', 0, '');
2524 2524
         //PESO BRUTO
2525
-        $x     += $w2;
2525
+        $x += $w2;
2526 2526
         $w3    = round($maxW * 0.20, 0);
2527 2527
         $texto = 'PESO BRUTO';
2528 2528
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -2535,7 +2535,7 @@  discard block
 block discarded – undo
2535 2535
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
2536 2536
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'B', 'R', 0, '');
2537 2537
         //PESO LÍQUIDO
2538
-        $x     += $w3;
2538
+        $x += $w3;
2539 2539
         $w     = $maxW - ($w1 + 3 * $w2 + $w3);
2540 2540
         $texto = 'PESO LÍQUIDO';
2541 2541
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
@@ -2555,11 +2555,11 @@  discard block
 block discarded – undo
2555 2555
     protected function descricaoProdutoHelper($origem, $campo, $formato)
2556 2556
     {
2557 2557
         $valor_original = $origem->getElementsByTagName($campo)->item(0);
2558
-        if (! isset($valor_original)) {
2558
+        if (!isset($valor_original)) {
2559 2559
             return "";
2560 2560
         }
2561 2561
         $valor_original = $valor_original->nodeValue;
2562
-        $valor          = ! empty($valor_original) ? number_format($valor_original, 2, ",", ".") : '';
2562
+        $valor          = !empty($valor_original) ? number_format($valor_original, 2, ",", ".") : '';
2563 2563
 
2564 2564
         if ($valor != "") {
2565 2565
             return sprintf($formato, $valor);
@@ -2585,7 +2585,7 @@  discard block
 block discarded – undo
2585 2585
         $ICMSUFDest = $itemProd->getElementsByTagName("ICMSUFDest")->item(0);
2586 2586
         $impostos   = '';
2587 2587
 
2588
-        if (! empty($ICMS)) {
2588
+        if (!empty($ICMS)) {
2589 2589
             $impostos .= $this->descricaoProdutoHelper($ICMS, "vBCFCP", " BcFcp=%s");
2590 2590
             $impostos .= $this->descricaoProdutoHelper($ICMS, "pFCP", " pFcp=%s%%");
2591 2591
             $impostos .= $this->descricaoProdutoHelper($ICMS, "vFCP", " vFcp=%s");
@@ -2601,7 +2601,7 @@  discard block
 block discarded – undo
2601 2601
             $impostos .= $this->descricaoProdutoHelper($ICMS, "pST", " pSt=%s");
2602 2602
             $impostos .= $this->descricaoProdutoHelper($ICMS, "vICMSSTRet", " VALOR ICMS ST=%s");
2603 2603
         }
2604
-        if (! empty($ICMSUFDest)) {
2604
+        if (!empty($ICMSUFDest)) {
2605 2605
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pFCPUFDest", " pFCPUFDest=%s%%");
2606 2606
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pICMSUFDest", " pICMSUFDest=%s%%");
2607 2607
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "pICMSInterPart", " pICMSInterPart=%s%%");
@@ -2609,20 +2609,20 @@  discard block
 block discarded – undo
2609 2609
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "vICMSUFDest", " vICMSUFDest=%s");
2610 2610
             $impostos .= $this->descricaoProdutoHelper($ICMSUFDest, "vICMSUFRemet", " vICMSUFRemet=%s");
2611 2611
         }
2612
-        $infAdProd = ! empty($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue)
2612
+        $infAdProd = !empty($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue)
2613 2613
             ? substr(
2614 2614
                 $this->anfaveaDANFE($itemProd->getElementsByTagName('infAdProd')->item(0)->nodeValue),
2615 2615
                 0,
2616 2616
                 500
2617 2617
             )
2618 2618
             : '';
2619
-        if (! empty($infAdProd)) {
2619
+        if (!empty($infAdProd)) {
2620 2620
             $infAdProd = trim($infAdProd);
2621 2621
             $infAdProd .= ' ';
2622 2622
         }
2623 2623
         $loteTxt = '';
2624 2624
         $rastro  = $prod->getElementsByTagName("med");
2625
-        if (! empty($prod->getElementsByTagName("rastro"))) {
2625
+        if (!empty($prod->getElementsByTagName("rastro"))) {
2626 2626
             $rastro = $prod->getElementsByTagName("rastro");
2627 2627
             $i      = 0;
2628 2628
             while ($i < $rastro->length) {
@@ -2631,14 +2631,14 @@  discard block
 block discarded – undo
2631 2631
                 $loteTxt .= $this->getTagDate($rastro->item($i), 'dFab', ' Fab: ');
2632 2632
                 $loteTxt .= $this->getTagDate($rastro->item($i), 'dVal', ' Val: ');
2633 2633
                 $loteTxt .= $this->getTagValue($rastro->item($i), 'vPMC', ' PMC: ');
2634
-                $i ++;
2634
+                $i++;
2635 2635
             }
2636 2636
             if ($loteTxt != '') {
2637 2637
                 $loteTxt .= ' ';
2638 2638
             }
2639 2639
         }
2640 2640
         //NT2013.006 FCI
2641
-        $nFCI   = (! empty($itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue)) ?
2641
+        $nFCI   = (!empty($itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue)) ?
2642 2642
             ' FCI:' . $itemProd->getElementsByTagName('nFCI')->item(0)->nodeValue : '';
2643 2643
         $tmp_ad = $infAdProd . ($this->descProdInfoComplemento ? $loteTxt . $impostos . $nFCI : '');
2644 2644
         $texto  = $prod->getElementsByTagName("xProd")->item(0)->nodeValue
@@ -2688,7 +2688,7 @@  discard block
 block discarded – undo
2688 2688
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
2689 2689
         $y += 3;
2690 2690
         //desenha a caixa dos dados dos itens da NF
2691
-        $hmax  += 1;
2691
+        $hmax += 1;
2692 2692
         $texto = '';
2693 2693
         $this->pdf->textBox($x, $y, $w, $hmax);
2694 2694
         //##################################################################################
@@ -2701,101 +2701,101 @@  discard block
 block discarded – undo
2701 2701
         $this->pdf->textBox($x, $y, $w1, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2702 2702
         $this->pdf->line($x + $w1, $y, $x + $w1, $y + $hmax);
2703 2703
         //DESCRIÇÃO DO PRODUTO / SERVIÇO
2704
-        $x     += $w1;
2704
+        $x += $w1;
2705 2705
         $w2    = round($w * 0.25, 0);
2706 2706
         $texto = 'DESCRIÇÃO DO PRODUTO / SERVIÇO';
2707 2707
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2708 2708
         $this->pdf->textBox($x, $y, $w2, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2709 2709
         $this->pdf->line($x + $w2, $y, $x + $w2, $y + $hmax);
2710 2710
         //NCM/SH
2711
-        $x     += $w2;
2711
+        $x += $w2;
2712 2712
         $w3    = round($w * 0.06, 0);
2713 2713
         $texto = 'NCM/SH';
2714 2714
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2715 2715
         $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2716 2716
         $this->pdf->line($x + $w3, $y, $x + $w3, $y + $hmax);
2717 2717
         //O/CST ou O/CSOSN
2718
-        $x     += $w3;
2718
+        $x += $w3;
2719 2719
         $w4    = round($w * 0.05, 0);
2720 2720
         $texto = 'O/CST'; // CRT = 2 ou CRT = 3
2721 2721
         if ($this->getTagValue($this->emit, 'CRT') == '1') {
2722
-            $texto = 'O/CSOSN';//Regime do Simples CRT = 1
2722
+            $texto = 'O/CSOSN'; //Regime do Simples CRT = 1
2723 2723
         }
2724 2724
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2725 2725
         $this->pdf->textBox($x, $y, $w4, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2726 2726
         $this->pdf->line($x + $w4, $y, $x + $w4, $y + $hmax);
2727 2727
         //CFOP
2728
-        $x     += $w4;
2728
+        $x += $w4;
2729 2729
         $w5    = round($w * 0.04, 0);
2730 2730
         $texto = 'CFOP';
2731 2731
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2732 2732
         $this->pdf->textBox($x, $y, $w5, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2733 2733
         $this->pdf->line($x + $w5, $y, $x + $w5, $y + $hmax);
2734 2734
         //UN
2735
-        $x     += $w5;
2735
+        $x += $w5;
2736 2736
         $w6    = round($w * 0.03, 0);
2737 2737
         $texto = 'UN';
2738 2738
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2739 2739
         $this->pdf->textBox($x, $y, $w6, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2740 2740
         $this->pdf->line($x + $w6, $y, $x + $w6, $y + $hmax);
2741 2741
         //QUANT
2742
-        $x     += $w6;
2742
+        $x += $w6;
2743 2743
         $w7    = round($w * 0.08, 0);
2744 2744
         $texto = 'QUANT';
2745 2745
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2746 2746
         $this->pdf->textBox($x, $y, $w7, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2747 2747
         $this->pdf->line($x + $w7, $y, $x + $w7, $y + $hmax);
2748 2748
         //VALOR UNIT
2749
-        $x     += $w7;
2749
+        $x += $w7;
2750 2750
         $w8    = round($w * 0.06, 0);
2751 2751
         $texto = 'VALOR UNIT';
2752 2752
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2753 2753
         $this->pdf->textBox($x, $y, $w8, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2754 2754
         $this->pdf->line($x + $w8, $y, $x + $w8, $y + $hmax);
2755 2755
         //VALOR TOTAL
2756
-        $x     += $w8;
2756
+        $x += $w8;
2757 2757
         $w9    = round($w * 0.06, 0);
2758 2758
         $texto = 'VALOR TOTAL';
2759 2759
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2760 2760
         $this->pdf->textBox($x, $y, $w9, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2761 2761
         $this->pdf->line($x + $w9, $y, $x + $w9, $y + $hmax);
2762 2762
         //VALOR DESCONTO
2763
-        $x     += $w9;
2763
+        $x += $w9;
2764 2764
         $w10   = round($w * 0.05, 0);
2765 2765
         $texto = 'VALOR DESC';
2766 2766
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2767 2767
         $this->pdf->textBox($x, $y, $w10, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2768 2768
         $this->pdf->line($x + $w10, $y, $x + $w10, $y + $hmax);
2769 2769
         //B.CÁLC ICMS
2770
-        $x     += $w10;
2770
+        $x += $w10;
2771 2771
         $w11   = round($w * 0.06, 0);
2772 2772
         $texto = 'B.CÁLC ICMS';
2773 2773
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2774 2774
         $this->pdf->textBox($x, $y, $w11, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2775 2775
         $this->pdf->line($x + $w11, $y, $x + $w11, $y + $hmax);
2776 2776
         //VALOR ICMS
2777
-        $x     += $w11;
2777
+        $x += $w11;
2778 2778
         $w12   = round($w * 0.06, 0);
2779 2779
         $texto = 'VALOR ICMS';
2780 2780
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2781 2781
         $this->pdf->textBox($x, $y, $w12, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2782 2782
         $this->pdf->line($x + $w12, $y, $x + $w12, $y + $hmax);
2783 2783
         //VALOR IPI
2784
-        $x     += $w12;
2784
+        $x += $w12;
2785 2785
         $w13   = round($w * 0.05, 0);
2786 2786
         $texto = 'VALOR IPI';
2787 2787
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2788 2788
         $this->pdf->textBox($x, $y, $w13, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2789 2789
         $this->pdf->line($x + $w13, $y, $x + $w13, $y + $hmax);
2790 2790
         //ALÍQ. ICMS
2791
-        $x     += $w13;
2791
+        $x += $w13;
2792 2792
         $w14   = round($w * 0.04, 0);
2793 2793
         $texto = 'ALÍQ. ICMS';
2794 2794
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
2795 2795
         $this->pdf->textBox($x, $y, $w14, $h, $texto, $aFont, 'C', 'C', 0, '', false);
2796 2796
         $this->pdf->line($x + $w14, $y, $x + $w14, $y + $hmax);
2797 2797
         //ALÍQ. IPI
2798
-        $x     += $w14;
2798
+        $x += $w14;
2799 2799
         $w15   = $w - ($w1 + $w2 + $w3 + $w4 + $w5 + $w6 + $w7 + $w8 + $w9 + $w10 + $w11 + $w12 + $w13 + $w14);
2800 2800
         $texto = 'ALÍQ. IPI';
2801 2801
         $this->pdf->textBox($x, $y, $w15, $h, $texto, $aFont, 'C', 'C', 0, '', false);
@@ -2840,7 +2840,7 @@  discard block
 block discarded – undo
2840 2840
                 // Informação sobre unidade de medida tributavel.
2841 2841
                 // Se não for para exibir a unidade de medida tributavel, então
2842 2842
                 // A Escrita irá começar em 0.
2843
-                if (! $mostrarUnidadeTributavel) {
2843
+                if (!$mostrarUnidadeTributavel) {
2844 2844
                     $yTrib = 0;
2845 2845
                 }
2846 2846
                 $h = $this->calculeHeight($thisItem, $mostrarUnidadeTributavel);
@@ -2875,7 +2875,7 @@  discard block
 block discarded – undo
2875 2875
                 }
2876 2876
                 $x += $w2;
2877 2877
                 //NCM
2878
-                $texto = ! empty($prod->getElementsByTagName("NCM")->item(0)->nodeValue) ?
2878
+                $texto = !empty($prod->getElementsByTagName("NCM")->item(0)->nodeValue) ?
2879 2879
                     $prod->getElementsByTagName("NCM")->item(0)->nodeValue : '';
2880 2880
                 $this->pdf->textBox($x, $y, $w3, $h, $texto, $aFont, 'T', 'C', 0, '');
2881 2881
                 $x += $w3;
@@ -2888,11 +2888,11 @@  discard block
 block discarded – undo
2888 2888
                     $this->pdf->textBox($x, $y, $w4, $h, $texto, $aFont, 'T', 'C', 0, '');
2889 2889
                 }
2890 2890
                 //CFOP
2891
-                $x     += $w4;
2891
+                $x += $w4;
2892 2892
                 $texto = $prod->getElementsByTagName("CFOP")->item(0)->nodeValue;
2893 2893
                 $this->pdf->textBox($x, $y, $w5, $h, $texto, $aFont, 'T', 'C', 0, '');
2894 2894
                 //Unidade
2895
-                $x     += $w5;
2895
+                $x += $w5;
2896 2896
                 $texto = $uCom;
2897 2897
                 $this->pdf->textBox($x, $y, $w6, $h, $texto, $aFont, 'T', 'C', 0, '');
2898 2898
                 //Unidade de medida tributável
@@ -2913,7 +2913,7 @@  discard block
 block discarded – undo
2913 2913
                 // QTDADE Tributável
2914 2914
                 if ($mostrarUnidadeTributavel) {
2915 2915
                     $qTrib = $prod->getElementsByTagName("qTrib")->item(0);
2916
-                    if (! empty($qTrib)) {
2916
+                    if (!empty($qTrib)) {
2917 2917
                         $texto = number_format($qTrib->nodeValue, $this->qComCasasDec, ",", ".");
2918 2918
                         $this->pdf->textBox($x, $yTrib, $w7, $h, $texto, $aFont, 'T', $alinhamento, 0, '');
2919 2919
                     }
@@ -2926,7 +2926,7 @@  discard block
 block discarded – undo
2926 2926
                 // Valor Unitário Tributável
2927 2927
                 if ($mostrarUnidadeTributavel) {
2928 2928
                     $vUnTrib = $prod->getElementsByTagName("vUnTrib")->item(0);
2929
-                    if (! empty($vUnTrib)) {
2929
+                    if (!empty($vUnTrib)) {
2930 2930
                         $texto = number_format($vUnTrib->nodeValue, $this->vUnComCasasDec, ",", ".");
2931 2931
                         $this->pdf->textBox($x, $yTrib, $w8, $h, $texto, $aFont, 'T', $alinhamento, 0, '');
2932 2932
                     }
@@ -2940,7 +2940,7 @@  discard block
 block discarded – undo
2940 2940
                 $this->pdf->textBox($x, $y, $w9, $h, $texto, $aFont, 'T', $alinhamento, 0, '');
2941 2941
                 $x += $w9;
2942 2942
                 //Valor do Desconto
2943
-                $vdesc = ! empty($prod->getElementsByTagName("vDesc")->item(0)->nodeValue)
2943
+                $vdesc = !empty($prod->getElementsByTagName("vDesc")->item(0)->nodeValue)
2944 2944
                     ? $prod->getElementsByTagName("vDesc")->item(0)->nodeValue : 0;
2945 2945
 
2946 2946
                 $texto = number_format($vdesc, 2, ",", ".");
@@ -2948,7 +2948,7 @@  discard block
 block discarded – undo
2948 2948
                 //Valor da Base de calculo
2949 2949
                 $x += $w10;
2950 2950
                 if (isset($ICMS)) {
2951
-                    $texto = ! empty($ICMS->getElementsByTagName("vBC")->item(0)->nodeValue)
2951
+                    $texto = !empty($ICMS->getElementsByTagName("vBC")->item(0)->nodeValue)
2952 2952
                         ? number_format(
2953 2953
                             $ICMS->getElementsByTagName("vBC")->item(0)->nodeValue,
2954 2954
                             2,
@@ -2961,7 +2961,7 @@  discard block
 block discarded – undo
2961 2961
                 //Valor do ICMS
2962 2962
                 $x += $w11;
2963 2963
                 if (isset($ICMS)) {
2964
-                    $texto = ! empty($ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue)
2964
+                    $texto = !empty($ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue)
2965 2965
                         ? number_format(
2966 2966
                             $ICMS->getElementsByTagName("vICMS")->item(0)->nodeValue,
2967 2967
                             2,
@@ -2974,7 +2974,7 @@  discard block
 block discarded – undo
2974 2974
                 //Valor do IPI
2975 2975
                 $x += $w12;
2976 2976
                 if (isset($IPI)) {
2977
-                    $texto = ! empty($IPI->getElementsByTagName("vIPI")->item(0)->nodeValue)
2977
+                    $texto = !empty($IPI->getElementsByTagName("vIPI")->item(0)->nodeValue)
2978 2978
                         ? number_format(
2979 2979
                             $IPI->getElementsByTagName("vIPI")->item(0)->nodeValue,
2980 2980
                             2,
@@ -2989,7 +2989,7 @@  discard block
 block discarded – undo
2989 2989
                 // %ICMS
2990 2990
                 $x += $w13;
2991 2991
                 if (isset($ICMS)) {
2992
-                    $texto = ! empty($ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue)
2992
+                    $texto = !empty($ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue)
2993 2993
                         ? number_format(
2994 2994
                             $ICMS->getElementsByTagName("pICMS")->item(0)->nodeValue,
2995 2995
                             2,
@@ -3002,7 +3002,7 @@  discard block
 block discarded – undo
3002 3002
                 //%IPI
3003 3003
                 $x += $w14;
3004 3004
                 if (isset($IPI)) {
3005
-                    $texto = ! empty($IPI->getElementsByTagName("pIPI")->item(0)->nodeValue)
3005
+                    $texto = !empty($IPI->getElementsByTagName("pIPI")->item(0)->nodeValue)
3006 3006
                         ? number_format(
3007 3007
                             $IPI->getElementsByTagName("pIPI")->item(0)->nodeValue,
3008 3008
                             2,
@@ -3020,17 +3020,17 @@  discard block
 block discarded – undo
3020 3020
                 $veicProd = $prod->getElementsByTagName("veicProd")->item(0);
3021 3021
                 // Tag somente é gerada para veiculo 0k, e só é permitido um veiculo por NF-e por conta do detran
3022 3022
                 // Verifica se a Tag existe
3023
-                if (! empty($veicProd)) {
3023
+                if (!empty($veicProd)) {
3024 3024
                     $this->dadosItenVeiculoDANFE($oldX, $y, $nInicio, $h, $prod);
3025 3025
                 }
3026 3026
 
3027 3027
 
3028 3028
                 $y += $h;
3029
-                $i ++;
3029
+                $i++;
3030 3030
                 //incrementa o controle dos itens processados.
3031
-                $this->qtdeItensProc ++;
3031
+                $this->qtdeItensProc++;
3032 3032
             } else {
3033
-                $i ++;
3033
+                $i++;
3034 3034
             }
3035 3035
         }
3036 3036
 
@@ -3235,23 +3235,23 @@  discard block
 block discarded – undo
3235 3235
         $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => 'B'];
3236 3236
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 0, '');
3237 3237
         //INSCRIÇÃO MUNICIPAL
3238
-        $y     += 3;
3238
+        $y += 3;
3239 3239
         $w     = round($this->wPrint * 0.23, 0);
3240 3240
         $texto = 'INSCRIÇÃO MUNICIPAL';
3241 3241
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3242 3242
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3243 3243
         //inscrição municipal
3244
-        $texto = ! empty($this->emit->getElementsByTagName("IM")->item(0)->nodeValue) ?
3244
+        $texto = !empty($this->emit->getElementsByTagName("IM")->item(0)->nodeValue) ?
3245 3245
             $this->emit->getElementsByTagName("IM")->item(0)->nodeValue : '';
3246 3246
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
3247 3247
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'L', 0, '');
3248 3248
         //VALOR TOTAL DOS SERVIÇOS
3249
-        $x     += $w;
3249
+        $x += $w;
3250 3250
         $texto = 'VALOR TOTAL DOS SERVIÇOS';
3251 3251
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3252 3252
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3253 3253
         if (isset($this->ISSQNtot)) {
3254
-            $texto = ! empty($this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue) ?
3254
+            $texto = !empty($this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue) ?
3255 3255
                 $this->ISSQNtot->getElementsByTagName("vServ")->item(0)->nodeValue : '';
3256 3256
             $texto = number_format($texto, 2, ",", ".");
3257 3257
         } else {
@@ -3260,14 +3260,14 @@  discard block
 block discarded – undo
3260 3260
         $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
3261 3261
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'B', 'R', 0, '');
3262 3262
         //BASE DE CÁLCULO DO ISSQN
3263
-        $x     += $w;
3263
+        $x += $w;
3264 3264
         $texto = 'BASE DE CÁLCULO DO ISSQN';
3265 3265
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3266 3266
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3267 3267
         if (isset($this->ISSQNtot)) {
3268
-            $texto = ! empty($this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue) ?
3268
+            $texto = !empty($this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue) ?
3269 3269
                 $this->ISSQNtot->getElementsByTagName("vBC")->item(0)->nodeValue : '';
3270
-            $texto = ! empty($texto) ? number_format($texto, 2, ",", ".") : '';
3270
+            $texto = !empty($texto) ? number_format($texto, 2, ",", ".") : '';
3271 3271
         } else {
3272 3272
             $texto = '';
3273 3273
         }
@@ -3284,9 +3284,9 @@  discard block
 block discarded – undo
3284 3284
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3285 3285
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
3286 3286
         if (isset($this->ISSQNtot)) {
3287
-            $texto = ! empty($this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue) ?
3287
+            $texto = !empty($this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue) ?
3288 3288
                 $this->ISSQNtot->getElementsByTagName("vISS")->item(0)->nodeValue : '';
3289
-            $texto = ! empty($texto) ? number_format($texto, 2, ",", ".") : '';
3289
+            $texto = !empty($texto) ? number_format($texto, 2, ",", ".") : '';
3290 3290
         } else {
3291 3291
             $texto = '';
3292 3292
         }
@@ -3325,7 +3325,7 @@  discard block
 block discarded – undo
3325 3325
 
3326 3326
         //INFORMAÇÕES COMPLEMENTARES
3327 3327
         $texto = "INFORMAÇÕES COMPLEMENTARES";
3328
-        $y     += 3;
3328
+        $y += 3;
3329 3329
         $w     = $this->wAdic;
3330 3330
         $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => 'B'];
3331 3331
         $this->pdf->textBox($x, $y, $w, $h, $texto, $aFont, 'T', 'L', 1, '');
@@ -3335,7 +3335,7 @@  discard block
 block discarded – undo
3335 3335
         //$this->textoAdic com o texto completo do campo
3336 3336
         //echo str_replace("\n", "<br>",$this->textoAdic);
3337 3337
         //die;
3338
-        $y     += 1;
3338
+        $y += 1;
3339 3339
         $aFont = ['font' => $this->fontePadrao, 'size' => $this->textadicfontsize * $this->pdf->k, 'style' => ''];
3340 3340
         //$aFont = ['font'=>$this->fontePadrao, 'size'=> 5, 'style'=>''];
3341 3341
         $this->pdf->textBox($x, $y + 2, $w - 2, $h, $this->textoAdic, $aFont, 'T', 'L', 0, '', false);
@@ -3386,7 +3386,7 @@  discard block
 block discarded – undo
3386 3386
                 $texto = 'CONTINGÊNCIA SVC-RS' . $dhCont . $xJust;
3387 3387
                 break;
3388 3388
         }
3389
-        $y     += 2;
3389
+        $y += 2;
3390 3390
         $aFont = ['font' => $this->fontePadrao, 'size' => 7, 'style' => ''];
3391 3391
         $this->pdf->textBox($x, $y, $w - 2, $h, $texto, $aFont, 'T', 'L', 0, '', false);
3392 3392
 
@@ -3441,7 +3441,7 @@  discard block
 block discarded – undo
3441 3441
         $tpNF = $this->ide->getElementsByTagName('tpNF')->item(0)->nodeValue;
3442 3442
         if ($tpNF == '0') {
3443 3443
             //NFe de Entrada
3444
-            $emitente     = '';
3444
+            $emitente = '';
3445 3445
             $emitente     .= $this->dest->getElementsByTagName("xNome")->item(0)->nodeValue . " - ";
3446 3446
             $emitente     .= $this->enderDest->getElementsByTagName("xLgr")->item(0)->nodeValue . ", ";
3447 3447
             $emitente     .= $this->enderDest->getElementsByTagName("nro")->item(0)->nodeValue . " - ";
@@ -3494,10 +3494,10 @@  discard block
 block discarded – undo
3494 3494
             $texto .= "AO LADO";
3495 3495
         }
3496 3496
         $texto .= ". EMISSÃO: ";
3497
-        $dEmi  = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3497
+        $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3498 3498
             $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue : '';
3499 3499
         if ($dEmi == '') {
3500
-            $dEmi  = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3500
+            $dEmi  = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3501 3501
                 $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue : '';
3502 3502
             $aDemi = explode('T', $dEmi);
3503 3503
             $dEmi  = $aDemi[0];
@@ -3520,12 +3520,12 @@  discard block
 block discarded – undo
3520 3520
             $this->pdf->textBox($x1, $y, $w1, 18, $texto, $aFont, 'C', 'C', 1, '');
3521 3521
             //DATA DE RECEBIMENTO
3522 3522
             $texto = "DATA DE RECEBIMENTO";
3523
-            $y     += $h;
3523
+            $y += $h;
3524 3524
             $w2    = round($this->wPrint * 0.17, 0); //35;
3525 3525
             $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3526 3526
             $this->pdf->textBox($x, $y, $w2, 8, $texto, $aFont, 'T', 'L', 1, '');
3527 3527
             //IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR
3528
-            $x     += $w2;
3528
+            $x += $w2;
3529 3529
             $w3    = $w - $w2;
3530 3530
             $texto = "IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR";
3531 3531
             $this->pdf->textBox($x, $y, $w3, 8, $texto, $aFont, 'T', 'L', 1, '');
@@ -3536,7 +3536,7 @@  discard block
 block discarded – undo
3536 3536
 
3537 3537
             return $y;
3538 3538
         } else {
3539
-            $x --;
3539
+            $x--;
3540 3540
             $x = $this->pdf->textBox90($x, $y, $w - 1, $h, $texto, $aFontSmall, 'C', 'L', 0, '', false);
3541 3541
             //NUMERO DA NOTA FISCAL LOGO NFE
3542 3542
             $w1    = 18;
@@ -3557,7 +3557,7 @@  discard block
 block discarded – undo
3557 3557
             $aFont = ['font' => $this->fontePadrao, 'size' => 6, 'style' => ''];
3558 3558
             $this->pdf->textBox90($x, $y, $w2, 8, $texto, $aFont, 'T', 'L', 1, '');
3559 3559
             //IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR
3560
-            $y     -= $w2;
3560
+            $y -= $w2;
3561 3561
             $w3    = $w - $w2;
3562 3562
             $texto = "IDENTIFICAÇÃO E ASSINATURA DO RECEBEDOR";
3563 3563
             $aFont = ['font' => $this->fontePadrao, 'size' => 5.7, 'style' => ''];
@@ -3578,18 +3578,18 @@  discard block
 block discarded – undo
3578 3578
      */
3579 3579
     protected function geraInformacoesDaTagCompra()
3580 3580
     {
3581
-        if (! $this->gerarInformacoesAutomaticas) {
3581
+        if (!$this->gerarInformacoesAutomaticas) {
3582 3582
             return '';
3583 3583
         }
3584 3584
         $saida = "";
3585 3585
         if (isset($this->compra)) {
3586
-            if (! empty($this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue)) {
3586
+            if (!empty($this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue)) {
3587 3587
                 $saida .= " Nota de Empenho: " . $this->compra->getElementsByTagName("xNEmp")->item(0)->nodeValue;
3588 3588
             }
3589
-            if (! empty($this->compra->getElementsByTagName("xPed")->item(0)->nodeValue)) {
3589
+            if (!empty($this->compra->getElementsByTagName("xPed")->item(0)->nodeValue)) {
3590 3590
                 $saida .= " Pedido: " . $this->compra->getElementsByTagName("xPed")->item(0)->nodeValue;
3591 3591
             }
3592
-            if (! empty($this->compra->getElementsByTagName("xCont")->item(0)->nodeValue)) {
3592
+            if (!empty($this->compra->getElementsByTagName("xCont")->item(0)->nodeValue)) {
3593 3593
                 $saida .= " Contrato: " . $this->compra->getElementsByTagName("xCont")->item(0)->nodeValue;
3594 3594
             }
3595 3595
         }
@@ -3620,10 +3620,10 @@  discard block
 block discarded – undo
3620 3620
         if ($icmss > 0) {
3621 3621
             $icmss = 1;
3622 3622
         }
3623
-        $dEmi = ! empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3623
+        $dEmi = !empty($this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue) ?
3624 3624
             $this->ide->getElementsByTagName("dEmi")->item(0)->nodeValue : '';
3625 3625
         if ($dEmi == '') {
3626
-            $dEmi  = ! empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3626
+            $dEmi  = !empty($this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue) ?
3627 3627
                 $this->ide->getElementsByTagName("dhEmi")->item(0)->nodeValue : '';
3628 3628
             $aDemi = explode('T', $dEmi);
3629 3629
             $dEmi  = $aDemi[0];
@@ -3647,7 +3647,7 @@  discard block
 block discarded – undo
3647 3647
      */
3648 3648
     protected function geraInformacoesDasNotasReferenciadas()
3649 3649
     {
3650
-        if (! $this->gerarInformacoesAutomaticas) {
3650
+        if (!$this->gerarInformacoesAutomaticas) {
3651 3651
             return '';
3652 3652
         }
3653 3653
         $formaNfeRef = "\r\nNFe Ref.: série:%d número:%d emit:%s em %s [%s]";
@@ -3675,7 +3675,7 @@  discard block
 block discarded – undo
3675 3675
                 $cnpj          = $this->formatField(substr($chave_acesso, 6, 14), "##.###.###/####-##");
3676 3676
                 $serie         = substr($chave_acesso, 22, 3);
3677 3677
                 $numero        = substr($chave_acesso, 25, 9);
3678
-                $saida         .= sprintf($formaNfeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3678
+                $saida .= sprintf($formaNfeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3679 3679
             }
3680 3680
             $refNF = $nfRef->getElementsByTagName('refNF');
3681 3681
             foreach ($refNF as $umaRefNFe) {
@@ -3686,7 +3686,7 @@  discard block
 block discarded – undo
3686 3686
                 $numero = $umaRefNFe->getElementsByTagName('nNF')->item(0)->nodeValue;
3687 3687
                 $data   = substr($data, 2, 2) . "/20" . substr($data, 0, 2);
3688 3688
                 $cnpj   = $this->formatField($cnpj, "##.###.###/####-##");
3689
-                $saida  .= sprintf($formaNfRef, $serie, $numero, $cnpj, $data, $mod);
3689
+                $saida .= sprintf($formaNfRef, $serie, $numero, $cnpj, $data, $mod);
3690 3690
             }
3691 3691
             $refCTe = $nfRef->getElementsByTagName('refCTe');
3692 3692
             foreach ($refCTe as $chave_acessoRef) {
@@ -3696,7 +3696,7 @@  discard block
 block discarded – undo
3696 3696
                 $cnpj          = $this->formatField(substr($chave_acesso, 6, 14), "##.###.###/####-##");
3697 3697
                 $serie         = substr($chave_acesso, 22, 3);
3698 3698
                 $numero        = substr($chave_acesso, 25, 9);
3699
-                $saida         .= sprintf($formaCTeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3699
+                $saida .= sprintf($formaCTeRef, $serie, $numero, $cnpj, $data, $chave_acessoF);
3700 3700
             }
3701 3701
             $refECF = $nfRef->getElementsByTagName('refECF');
3702 3702
             foreach ($refECF as $umaRefNFe) {
@@ -3708,10 +3708,9 @@  discard block
 block discarded – undo
3708 3708
             $refNFP = $nfRef->getElementsByTagName('refNFP');
3709 3709
             foreach ($refNFP as $umaRefNFe) {
3710 3710
                 $data   = $umaRefNFe->getElementsByTagName('AAMM')->item(0)->nodeValue;
3711
-                $cnpj   = ! empty($umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue) ?
3712
-                    $umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue :
3713
-                    '';
3714
-                $cpf    = ! empty($umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue) ?
3711
+                $cnpj   = !empty($umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue) ?
3712
+                    $umaRefNFe->getElementsByTagName('CNPJ')->item(0)->nodeValue : '';
3713
+                $cpf    = !empty($umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue) ?
3715 3714
                     $umaRefNFe->getElementsByTagName('CPF')->item(0)->nodeValue : '';
3716 3715
                 $mod    = $umaRefNFe->getElementsByTagName('mod')->item(0)->nodeValue;
3717 3716
                 $serie  = $umaRefNFe->getElementsByTagName('serie')->item(0)->nodeValue;
@@ -3733,7 +3732,7 @@  discard block
 block discarded – undo
3733 3732
     private function loadDoc($xml)
3734 3733
     {
3735 3734
         $this->xml = $xml;
3736
-        if (! empty($xml)) {
3735
+        if (!empty($xml)) {
3737 3736
             $this->dom = new Dom();
3738 3737
             $this->dom->loadXML($this->xml);
3739 3738
             if (empty($this->dom->getElementsByTagName("infNFe")->item(0))) {
@@ -3787,7 +3786,7 @@  discard block
 block discarded – undo
3787 3786
         $numlinhas    = $this->pdf->getNumLines($textoProduto, $w2, $aFont);
3788 3787
 
3789 3788
         if ($mostrarUnidadeTributavel && $numlinhas == 1) {
3790
-            $numlinhas ++;
3789
+            $numlinhas++;
3791 3790
         }
3792 3791
 
3793 3792
         return round(($numlinhas * $this->pdf->fontSize) + ($numlinhas * 0.5), 2);
Please login to merge, or discard this patch.
src/Legacy/FPDF/Fpdf181.php 2 patches
Spacing   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -7,64 +7,64 @@  discard block
 block discarded – undo
7 7
     const FPDF_VERSION = '1.81';
8 8
     const FPDF_FONTPATH = 'font/';
9 9
 
10
-    protected $page;               // current page number
11
-    protected $n;                  // current object number
12
-    protected $offsets;            // array of object offsets
13
-    protected $buffer;             // buffer holding in-memory PDF
14
-    protected $pages;              // array containing pages
15
-    protected $state;              // current document state
16
-    protected $compress;           // compression flag
17
-    public $k;                  // scale factor (number of points in user unit)
18
-    protected $defOrientation;     // default orientation
19
-    protected $curOrientation;     // current orientation
20
-    protected $stdPageSizes;       // standard page sizes
21
-    protected $defPageSize;        // default page size
22
-    protected $curPageSize;        // current page size
23
-    protected $curRotation;        // current page rotation
24
-    protected $pageInfo;           // page-related data
10
+    protected $page; // current page number
11
+    protected $n; // current object number
12
+    protected $offsets; // array of object offsets
13
+    protected $buffer; // buffer holding in-memory PDF
14
+    protected $pages; // array containing pages
15
+    protected $state; // current document state
16
+    protected $compress; // compression flag
17
+    public $k; // scale factor (number of points in user unit)
18
+    protected $defOrientation; // default orientation
19
+    protected $curOrientation; // current orientation
20
+    protected $stdPageSizes; // standard page sizes
21
+    protected $defPageSize; // default page size
22
+    protected $curPageSize; // current page size
23
+    protected $curRotation; // current page rotation
24
+    protected $pageInfo; // page-related data
25 25
     protected $wPt;
26
-    protected $hPt;          // dimensions of current page in points
26
+    protected $hPt; // dimensions of current page in points
27 27
     protected $w;
28
-    protected $h;              // dimensions of current page in user unit
29
-    protected $lMargin;            // left margin
30
-    protected $tMargin;            // top margin
31
-    protected $rMargin;            // right margin
32
-    protected $bMargin;            // page break margin
33
-    protected $cMargin;            // cell margin
28
+    protected $h; // dimensions of current page in user unit
29
+    protected $lMargin; // left margin
30
+    protected $tMargin; // top margin
31
+    protected $rMargin; // right margin
32
+    protected $bMargin; // page break margin
33
+    protected $cMargin; // cell margin
34 34
     protected $x;
35
-    protected $y;              // current position in user unit
36
-    protected $lasth;              // height of last printed cell
37
-    protected $lineWidth;          // line width in user unit
38
-    protected $fontpath;           // path containing fonts
39
-    protected $coreFonts;          // array of core font names
40
-    protected $fonts;              // array of used fonts
41
-    protected $fontFiles;          // array of font files
42
-    protected $encodings;          // array of encodings
43
-    protected $cmaps;              // array of ToUnicode CMaps
44
-    protected $fontFamily;         // current font family
45
-    protected $fontStyle;          // current font style
46
-    protected $underline;          // underlining flag
47
-    protected $currentFont;        // current font info
48
-    protected $fontSizePt;         // current font size in points
49
-    public $fontSize;           // current font size in user unit
50
-    protected $drawColor;          // commands for drawing color
51
-    protected $fillColor;          // commands for filling color
52
-    protected $textColor;          // commands for text color
53
-    protected $colorFlag;          // indicates whether fill and text colors are different
54
-    protected $withAlpha;          // indicates whether alpha channel is used
55
-    protected $ws;                 // word spacing
56
-    protected $images;             // array of used images
57
-    protected $pageLinks;          // array of links in pages
58
-    protected $links;              // array of internal links
59
-    protected $autoPageBreak;      // automatic page breaking
60
-    protected $pageBreakTrigger;   // threshold used to trigger page breaks
61
-    protected $inHeader;           // flag set when processing header
62
-    protected $infooter;           // flag set when processing footer
63
-    protected $aliasNbPages;       // alias for total number of pages
64
-    protected $zoomMode;           // zoom display mode
65
-    protected $layoutMode;         // layout display mode
66
-    protected $metadata;           // document properties
67
-    protected $pdfVersion;         // PDF version number
35
+    protected $y; // current position in user unit
36
+    protected $lasth; // height of last printed cell
37
+    protected $lineWidth; // line width in user unit
38
+    protected $fontpath; // path containing fonts
39
+    protected $coreFonts; // array of core font names
40
+    protected $fonts; // array of used fonts
41
+    protected $fontFiles; // array of font files
42
+    protected $encodings; // array of encodings
43
+    protected $cmaps; // array of ToUnicode CMaps
44
+    protected $fontFamily; // current font family
45
+    protected $fontStyle; // current font style
46
+    protected $underline; // underlining flag
47
+    protected $currentFont; // current font info
48
+    protected $fontSizePt; // current font size in points
49
+    public $fontSize; // current font size in user unit
50
+    protected $drawColor; // commands for drawing color
51
+    protected $fillColor; // commands for filling color
52
+    protected $textColor; // commands for text color
53
+    protected $colorFlag; // indicates whether fill and text colors are different
54
+    protected $withAlpha; // indicates whether alpha channel is used
55
+    protected $ws; // word spacing
56
+    protected $images; // array of used images
57
+    protected $pageLinks; // array of links in pages
58
+    protected $links; // array of internal links
59
+    protected $autoPageBreak; // automatic page breaking
60
+    protected $pageBreakTrigger; // threshold used to trigger page breaks
61
+    protected $inHeader; // flag set when processing header
62
+    protected $infooter; // flag set when processing footer
63
+    protected $aliasNbPages; // alias for total number of pages
64
+    protected $zoomMode; // zoom display mode
65
+    protected $layoutMode; // layout display mode
66
+    protected $metadata; // document properties
67
+    protected $pdfVersion; // PDF version number
68 68
 
69 69
     public function __construct($orientation = 'P', $unit = 'mm', $size = 'A4')
70 70
     {
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $this->withAlpha = false;
98 98
         $this->ws = 0;
99 99
 
100
-        $this->fontpath = __DIR__. FPDF_FONTPATH;
100
+        $this->fontpath = __DIR__ . FPDF_FONTPATH;
101 101
 
102 102
         // Core fonts
103 103
         $this->coreFonts = [
Please login to merge, or discard this patch.
Doc Comments   +56 added lines patch added patch discarded remove patch
@@ -172,6 +172,9 @@  discard block
 block discarded – undo
172 172
         $this->pdfVersion = '1.3';
173 173
     }
174 174
 
175
+    /**
176
+     * @param integer $right
177
+     */
175 178
     public function setMargins($left, $top, $right = null)
176 179
     {
177 180
         // Set left, top and right margins
@@ -204,6 +207,9 @@  discard block
 block discarded – undo
204 207
         $this->rMargin = $margin;
205 208
     }
206 209
 
210
+    /**
211
+     * @param boolean $auto
212
+     */
207 213
     public function setautoPageBreak($auto, $margin = 0)
208 214
     {
209 215
         // Set auto page break mode and triggering margin
@@ -211,6 +217,10 @@  discard block
 block discarded – undo
211 217
         $this->bMargin = $margin;
212 218
         $this->pageBreakTrigger = $this->h - $margin;
213 219
     }
220
+
221
+    /**
222
+     * @param string $zoom
223
+     */
214 224
     public function setDisplayMode($zoom, $layout = 'default')
215 225
     {
216 226
         // Set display mode in viewer
@@ -226,6 +236,9 @@  discard block
 block discarded – undo
226 236
         }
227 237
     }
228 238
 
239
+    /**
240
+     * @param boolean $compress
241
+     */
229 242
     public function setCompression($compress)
230 243
     {
231 244
         // Set page compression
@@ -272,6 +285,9 @@  discard block
 block discarded – undo
272 285
         $this->aliasNbPages = $alias;
273 286
     }
274 287
 
288
+    /**
289
+     * @param string $msg
290
+     */
275 291
     public function error($msg)
276 292
     {
277 293
         // Fatal error
@@ -382,6 +398,12 @@  discard block
 block discarded – undo
382 398
         // Get current page number
383 399
         return $this->page;
384 400
     }
401
+
402
+    /**
403
+     * @param integer $r
404
+     * @param integer $g
405
+     * @param integer $b
406
+     */
385 407
     public function setdrawColor($r, $g = null, $b = null)
386 408
     {
387 409
         // Set color for all stroking operations
@@ -395,6 +417,11 @@  discard block
 block discarded – undo
395 417
         }
396 418
     }
397 419
 
420
+    /**
421
+     * @param integer $r
422
+     * @param integer $g
423
+     * @param integer $b
424
+     */
398 425
     public function setfillColor($r, $g = null, $b = null)
399 426
     {
400 427
         // Set color for all filling operations
@@ -409,6 +436,11 @@  discard block
 block discarded – undo
409 436
         }
410 437
     }
411 438
 
439
+    /**
440
+     * @param integer $r
441
+     * @param integer $g
442
+     * @param integer $b
443
+     */
412 444
     public function settextColor($r, $g = null, $b = null)
413 445
     {
414 446
         // Set color for text
@@ -478,6 +510,9 @@  discard block
 block discarded – undo
478 510
         );
479 511
     }
480 512
 
513
+    /**
514
+     * @param string $family
515
+     */
481 516
     public function addFont($family, $style = '', $file = '')
482 517
     {
483 518
         // Add a TrueType, OpenType or Type1 font
@@ -594,6 +629,10 @@  discard block
 block discarded – undo
594 629
         $this->links[$link] = [$page, $y];
595 630
     }
596 631
 
632
+    /**
633
+     * @param double $y
634
+     * @param string $link
635
+     */
597 636
     public function link($x, $y, $w, $h, $link)
598 637
     {
599 638
         // Put a link on the page
@@ -606,6 +645,10 @@  discard block
 block discarded – undo
606 645
         ];
607 646
     }
608 647
 
648
+    /**
649
+     * @param double $y
650
+     * @param string $txt
651
+     */
609 652
     public function text($x, $y, $txt)
610 653
     {
611 654
         // output a string
@@ -770,6 +813,9 @@  discard block
 block discarded – undo
770 813
         }
771 814
     }
772 815
 
816
+    /**
817
+     * @param integer $h
818
+     */
773 819
     public function multiCell($w, $h, $txt, $border = 0, $align = 'J', $fill = false)
774 820
     {
775 821
         // output text with automatic or explicit line breaks
@@ -970,6 +1016,9 @@  discard block
 block discarded – undo
970 1016
         }
971 1017
     }
972 1018
 
1019
+    /**
1020
+     * @param string $file
1021
+     */
973 1022
     public function image($file, $x = null, $y = null, $w = 0, $h = 0, $type = '', $link = '')
974 1023
     {
975 1024
         // Put an image on the page
@@ -1214,6 +1263,10 @@  discard block
 block discarded – undo
1214 1263
         }
1215 1264
     }
1216 1265
 
1266
+    /**
1267
+     * @param string $orientation
1268
+     * @param string $size
1269
+     */
1217 1270
     protected function beginPage($orientation, $size, $rotation)
1218 1271
     {
1219 1272
         $this->page++;
@@ -1416,6 +1469,9 @@  discard block
 block discarded – undo
1416 1469
         ];
1417 1470
     }
1418 1471
 
1472
+    /**
1473
+     * @param string $file
1474
+     */
1419 1475
     protected function parsePng($file)
1420 1476
     {
1421 1477
         // Extract info from a PNG file
Please login to merge, or discard this patch.
src/NFe/Danfce.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -279,7 +279,6 @@
 block discarded – undo
279 279
 
280 280
     /**
281 281
      * Carrega os dados do xml na classe
282
-     * @param string $xml
283 282
      *
284 283
      * @throws InvalidArgumentException
285 284
      */
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -13,13 +13,11 @@
 block discarded – undo
13 13
  * @link      http://github.com/nfephp-org/sped-da for the canonical source repository
14 14
  */
15 15
 
16
-use DateTime;
17 16
 use Exception;
18 17
 use InvalidArgumentException;
19 18
 use NFePHP\DA\Legacy\Dom;
20 19
 use NFePHP\DA\Legacy\Pdf;
21 20
 use NFePHP\DA\Common\DaCommon;
22
-use Com\Tecnick\Barcode\Barcode;
23 21
 
24 22
 class Danfce extends DaCommon
25 23
 {
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
     protected $paperwidth = 80;
28 28
     protected $descPercent = 0.38;
29 29
     protected $xml; // string XML NFe
30
-    protected $logomarca=''; // path para logomarca em jpg
31
-    protected $formatoChave="#### #### #### #### #### #### #### #### #### #### ####";
30
+    protected $logomarca = ''; // path para logomarca em jpg
31
+    protected $formatoChave = "#### #### #### #### #### #### #### #### #### #### ####";
32 32
     protected $nfeProc;
33 33
     protected $nfe;
34 34
     protected $infNFe;
@@ -220,10 +220,10 @@  discard block
 block discarded – undo
220 220
         //total inicial de paginas
221 221
         $totPag = 1;
222 222
         //largura imprimivel em mm: largura da folha menos as margens esq/direita
223
-        $this->wPrint = $maxW-($margEsq*2);
223
+        $this->wPrint = $maxW - ($margEsq * 2);
224 224
         //comprimento (altura) imprimivel em mm: altura da folha menos as margens
225 225
         //superior e inferior
226
-        $this->hPrint = $maxH-$margSup-$margInf;
226
+        $this->hPrint = $maxH - $margSup - $margInf;
227 227
         // estabelece contagem de paginas
228 228
         $this->pdf->aliasNbPages();
229 229
         $this->pdf->setMargins($margEsq, $margSup); // fixa as margens
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
         $y = $this->blocoIX($y); //informações sobre tributos
248 248
         $y = $this->blocoX($y); //creditos
249 249
         
250
-        $ymark = $maxH/4;
250
+        $ymark = $maxH / 4;
251 251
         if ($this->tpAmb == 2) {
252 252
             $this->pdf->setTextColor(120, 120, 120);
253 253
             $texto = "SEM VALOR FISCAL\nEmitida em ambiente de homologacao";
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
                 $this->margem,
257 257
                 $ymark,
258 258
                 $this->wPrint,
259
-                $maxH/2,
259
+                $maxH / 2,
260 260
                 $texto,
261 261
                 $aFont,
262 262
                 'T',
@@ -273,9 +273,9 @@  discard block
 block discarded – undo
273 273
             $aFont = ['font' => $this->fontePadrao, 'size' => 24, 'style' => 'B'];
274 274
             $this->pdf->textBox(
275 275
                 $this->margem,
276
-                $ymark+4,
276
+                $ymark + 4,
277 277
                 $this->wPrint,
278
-                $maxH/2,
278
+                $maxH / 2,
279 279
                 $texto,
280 280
                 $aFont,
281 281
                 'T',
@@ -287,9 +287,9 @@  discard block
 block discarded – undo
287 287
             $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
288 288
             $this->pdf->textBox(
289 289
                 $this->margem,
290
-                $ymark+14,
290
+                $ymark + 14,
291 291
                 $this->wPrint,
292
-                $maxH/2,
292
+                $maxH / 2,
293 293
                 $this->submessage,
294 294
                 $aFont,
295 295
                 'T',
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
             $y = $this->blocoVIII($y); //QRCODE
318 318
             $y = $this->blocoIX($y); //informações sobre tributos
319 319
             $y = $this->blocoX($y); //creditos
320
-            $ymark = $maxH/4;
320
+            $ymark = $maxH / 4;
321 321
             if ($this->tpAmb == 2) {
322 322
                 $this->pdf->setTextColor(120, 120, 120);
323 323
                 $texto = "SEM VALOR FISCAL\nEmitida em ambiente de homologacao";
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
                     $this->margem,
327 327
                     $ymark,
328 328
                     $this->wPrint,
329
-                    $maxH/2,
329
+                    $maxH / 2,
330 330
                     $texto,
331 331
                     $aFont,
332 332
                     'T',
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
             } elseif (!empty($retEvento = $this->nfeProc->getElementsByTagName('retEvento')->item(0))) {
411 411
                 $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0);
412 412
                 $cStat = $this->getTagValue($infEvento, "cStat");
413
-                $tpEvento= $this->getTagValue($infEvento, "tpEvento");
413
+                $tpEvento = $this->getTagValue($infEvento, "tpEvento");
414 414
                 $dhEvento = date(
415 415
                     "d/m/Y H:i:s",
416 416
                     $this->toTimestamp(
Please login to merge, or discard this patch.
src/NFe/Traits/TraitBlocoI.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -31,13 +31,13 @@  discard block
 block discarded – undo
31 31
             $xImg = $this->margem;
32 32
             $yImg = $this->margem + 1;
33 33
             $logoInfo = getimagesize($this->logomarca);
34
-            $logoWmm = ($logoInfo[0]/72)*25.4;
35
-            $logoHmm = ($logoInfo[1]/72)*25.4;
36
-            $nImgW = $this->wPrint/4;
37
-            $nImgH = round($logoHmm * ($nImgW/$logoWmm), 0);
34
+            $logoWmm = ($logoInfo[0] / 72) * 25.4;
35
+            $logoHmm = ($logoInfo[1] / 72) * 25.4;
36
+            $nImgW = $this->wPrint / 4;
37
+            $nImgH = round($logoHmm * ($nImgW / $logoWmm), 0);
38 38
             if ($nImgH > $maxHimg) {
39 39
                 $nImgH = $maxHimg;
40
-                $nImgW = round($logoWmm * ($nImgH/$logoHmm), 0);
40
+                $nImgW = round($logoWmm * ($nImgH / $logoHmm), 0);
41 41
             }
42 42
             $xRs = ($nImgW) + $this->margem;
43 43
             $wRs = ($this->wPrint - $nImgW);
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
         $aFont = ['font'=>$this->fontePadrao, 'size' => 8, 'style' => ''];
53 53
         $texto = "{$emitRazao}";
54 54
         $y += $this->pdf->textBox(
55
-            $xRs+2,
55
+            $xRs + 2,
56 56
             $this->margem,
57
-            $wRs-2,
58
-            $this->bloco1H-$this->margem-1,
57
+            $wRs - 2,
58
+            $this->bloco1H - $this->margem - 1,
59 59
             $texto,
60 60
             $aFont,
61 61
             'T',
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
             $aFont = ['font'=>$this->fontePadrao, 'size' => $this->pdf->fontSizePt, 'style' => ''];
69 69
         }
70 70
         $texto = "CNPJ: {$emitCnpj} IE: {$emitIE}";
71
-        $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
71
+        $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
72 72
         $texto = $emitLgr . ", " . $emitNro;
73
-        $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
73
+        $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
74 74
         $texto = $emitBairro;
75
-        $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
75
+        $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
76 76
         $texto = $emitMun . "-" . $emitUF;
77
-        $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
77
+        $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
78 78
         $this->pdf->dashedHLine($this->margem, $this->bloco1H, $this->wPrint, 0.1, 30);
79 79
         return $this->bloco1H;
80 80
     }
Please login to merge, or discard this patch.
src/NFe/Traits/TraitBlocoII.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => ''];
35 35
             $y1 += $this->pdf->textBox(
36 36
                 $this->margem,
37
-                $y+$y1,
37
+                $y + $y1,
38 38
                 $this->wPrint,
39 39
                 2,
40 40
                 $texto,
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             $aFont = ['font'=> $this->fontePadrao, 'size' => 10, 'style' => 'B'];
51 51
             $y2 = $this->pdf->textBox(
52 52
                 $this->margem,
53
-                $y+$y1,
53
+                $y + $y1,
54 54
                 $this->wPrint,
55 55
                 4,
56 56
                 $texto,
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             $aFont = ['font'=> $this->fontePadrao, 'size' => 8, 'style' => 'I'];
67 67
             $this->pdf->textBox(
68 68
                 $this->margem,
69
-                $y+$y1+$y2,
69
+                $y + $y1 + $y2,
70 70
                 $this->wPrint,
71 71
                 3,
72 72
                 $texto,
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => ''];
84 84
             $y1 = $this->pdf->textBox(
85 85
                 $this->margem,
86
-                $this->bloco1H-2,
86
+                $this->bloco1H - 2,
87 87
                 $this->wPrint,
88 88
                 $this->bloco2H,
89 89
                 $texto,
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                 true
96 96
             );
97 97
         }
98
-        $this->pdf->dashedHLine($this->margem, $this->bloco2H+$y, $this->wPrint, 0.1, 30);
98
+        $this->pdf->dashedHLine($this->margem, $this->bloco2H + $y, $this->wPrint, 0.1, 30);
99 99
         return $this->bloco2H + $y;
100 100
     }
101 101
 }
Please login to merge, or discard this patch.
src/NFe/Traits/TraitBlocoVI.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
             false
31 31
         );
32 32
         
33
-        $texto =  $this->urlChave;
33
+        $texto = $this->urlChave;
34 34
         $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => ''];
35 35
         $y2 = $this->pdf->textBox(
36 36
             $this->margem,
37
-            $y+$y1,
37
+            $y + $y1,
38 38
             $this->wPrint,
39 39
             2,
40 40
             $texto,
@@ -46,12 +46,12 @@  discard block
 block discarded – undo
46 46
             false
47 47
         );
48 48
         
49
-        $chave =  str_replace('NFe', '', $this->infNFe->getAttribute("Id"));
49
+        $chave = str_replace('NFe', '', $this->infNFe->getAttribute("Id"));
50 50
         $texto = $this->formatField($chave, $this->formatoChave);
51 51
         $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => ''];
52 52
         $y3 = $this->pdf->textBox(
53 53
             $this->margem,
54
-            $y+$y1+$y2+1,
54
+            $y + $y1 + $y2 + 1,
55 55
             $this->wPrint,
56 56
             2,
57 57
             $texto,
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             '',
63 63
             true
64 64
         );
65
-        $this->pdf->dashedHLine($this->margem, $this->bloco6H+$y, $this->wPrint, 0.1, 30);
65
+        $this->pdf->dashedHLine($this->margem, $this->bloco6H + $y, $this->wPrint, 0.1, 30);
66 66
         return $this->bloco6H + $y;
67 67
     }
68 68
 }
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -7,6 +7,9 @@
 block discarded – undo
7 7
  */
8 8
 trait TraitBlocoVI
9 9
 {
10
+    /**
11
+     * @param double $y
12
+     */
10 13
     protected function blocoVI($y)
11 14
     {
12 15
         //$this->bloco6H = 10;
Please login to merge, or discard this patch.
src/NFe/Traits/TraitBlocoIV.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         $this->pdf->textBox(
25 25
             $this->margem,
26 26
             $y,
27
-            $this->wPrint/2,
27
+            $this->wPrint / 2,
28 28
             3,
29 29
             $texto,
30 30
             $aFont,
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
             false
36 36
         );
37 37
         $y1 = $this->pdf->textBox(
38
-            $this->margem+$this->wPrint/2,
38
+            $this->margem + $this->wPrint / 2,
39 39
             $y,
40
-            $this->wPrint/2,
40
+            $this->wPrint / 2,
41 41
             3,
42 42
             $qtd,
43 43
             $aFont,
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
         $texto = "Valor Total R$";
52 52
         $this->pdf->textBox(
53 53
             $this->margem,
54
-            $y+$y1,
55
-            $this->wPrint/2,
54
+            $y + $y1,
55
+            $this->wPrint / 2,
56 56
             3,
57 57
             $texto,
58 58
             $aFont,
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
         );
65 65
         $texto = number_format((float) $bruto, 2, ',', '.');
66 66
         $y2 = $this->pdf->textBox(
67
-            $this->margem+$this->wPrint/2,
68
-            $y+$y1,
69
-            $this->wPrint/2,
67
+            $this->margem + $this->wPrint / 2,
68
+            $y + $y1,
69
+            $this->wPrint / 2,
70 70
             3,
71 71
             $texto,
72 72
             $aFont,
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
         $texto = "Desconto R$";
81 81
         $this->pdf->textBox(
82 82
             $this->margem,
83
-            $y+$y1+$y2,
84
-            $this->wPrint/2,
83
+            $y + $y1 + $y2,
84
+            $this->wPrint / 2,
85 85
             3,
86 86
             $texto,
87 87
             $aFont,
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
         );
94 94
         $texto = number_format((float) $desconto, 2, ',', '.');
95 95
         $y3 = $this->pdf->textBox(
96
-            $this->margem+$this->wPrint/2,
97
-            $y+$y1+$y2,
98
-            $this->wPrint/2,
96
+            $this->margem + $this->wPrint / 2,
97
+            $y + $y1 + $y2,
98
+            $this->wPrint / 2,
99 99
             3,
100 100
             $texto,
101 101
             $aFont,
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
         $texto = "Valor a Pagar R$";
114 114
         $this->pdf->textBox(
115 115
             $this->margem,
116
-            $y+$y1+$y2+$y3,
117
-            $this->wPrint/2,
116
+            $y + $y1 + $y2 + $y3,
117
+            $this->wPrint / 2,
118 118
             3,
119 119
             $texto,
120 120
             $aFont,
@@ -126,9 +126,9 @@  discard block
 block discarded – undo
126 126
         );
127 127
         $texto = number_format((float) $valor, 2, ',', '.');
128 128
         $y4 = $this->pdf->textBox(
129
-            $this->margem+$this->wPrint/2,
130
-            $y+$y1+$y2+$y3,
131
-            $this->wPrint/2,
129
+            $this->margem + $this->wPrint / 2,
130
+            $y + $y1 + $y2 + $y3,
131
+            $this->wPrint / 2,
132 132
             3,
133 133
             $texto,
134 134
             $aFont,
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
             false
140 140
         );
141 141
         
142
-        $this->pdf->dashedHLine($this->margem, $this->bloco4H+$y, $this->wPrint, 0.1, 30);
142
+        $this->pdf->dashedHLine($this->margem, $this->bloco4H + $y, $this->wPrint, 0.1, 30);
143 143
         return $this->bloco4H + $y;
144 144
     }
145 145
 }
Please login to merge, or discard this patch.