Code Duplication    Length = 7-7 lines in 5 locations

lib/Sii/PDF/Dte.php 5 locations

@@ 718-724 (lines=7) @@
715
            $this->setFont('', '', null);
716
            $this->MultiTexto($receptor['RznSocRecep'], $x+$offset+2, null, '', $x==10?105:0);
717
        }
718
        if (!empty($receptor['GiroRecep'])) {
719
            $this->setFont('', 'B', null);
720
            $this->Texto('Giro', $x);
721
            $this->Texto(':', $x+$offset);
722
            $this->setFont('', '', null);
723
            $this->MultiTexto($receptor['GiroRecep'], $x+$offset+2);
724
        }
725
        if (!empty($receptor['DirRecep'])) {
726
            $this->setFont('', 'B', null);
727
            $this->Texto('Dirección', $x);
@@ 742-748 (lines=7) @@
739
            $this->setFont('', '', null);
740
            $this->MultiTexto(\sasco\LibreDTE\Sii\Aduana::getNacionalidad($receptor['Extranjero']['Nacionalidad']), $x+$offset+2);
741
        }
742
        if (!empty($receptor['Extranjero']['NumId'])) {
743
            $this->setFont('', 'B', null);
744
            $this->Texto('N° ID extranj.', $x);
745
            $this->Texto(':', $x+$offset);
746
            $this->setFont('', '', null);
747
            $this->MultiTexto($receptor['Extranjero']['NumId'], $x+$offset+2);
748
        }
749
        $contacto = [];
750
        if (!empty($receptor['Contacto']))
751
            $contacto[] = $receptor['Contacto'];
@@ 754-760 (lines=7) @@
751
            $contacto[] = $receptor['Contacto'];
752
        if (!empty($receptor['CorreoRecep']))
753
            $contacto[] = $receptor['CorreoRecep'];
754
        if (!empty($contacto)) {
755
            $this->setFont('', 'B', null);
756
            $this->Texto('Contacto', $x);
757
            $this->Texto(':', $x+$offset);
758
            $this->setFont('', '', null);
759
            $this->MultiTexto(implode(' / ', $contacto), $x+$offset+2);
760
        }
761
        if (!empty($Encabezado['RUTSolicita'])) {
762
            list($rut, $dv) = explode('-', $Encabezado['RUTSolicita']);
763
            $this->setFont('', 'B', null);
@@ 790-796 (lines=7) @@
787
    private function agregarTraslado($IndTraslado, array $Transporte = null, $x = 10, $offset = 22)
788
    {
789
        // agregar tipo de traslado
790
        if ($IndTraslado) {
791
            $this->setFont('', 'B', null);
792
            $this->Texto('Tipo oper.', $x);
793
            $this->Texto(':', $x+$offset);
794
            $this->setFont('', '', null);
795
            $this->MultiTexto($this->traslados[$IndTraslado], $x+$offset+2);
796
        }
797
        // agregar información de transporte
798
        if ($Transporte) {
799
            $transporte = '';
@@ 813-819 (lines=7) @@
810
                if (!empty($Transporte['Chofer']['RUTChofer']))
811
                    $transporte .= ' ('.$Transporte['Chofer']['RUTChofer'].')';
812
            }
813
            if ($transporte) {
814
                $this->setFont('', 'B', null);
815
                $this->Texto('Traslado', $x);
816
                $this->Texto(':', $x+$offset);
817
                $this->setFont('', '', null);
818
                $this->MultiTexto(ucfirst(trim($transporte)), $x+$offset+2);
819
            }
820
        }
821
        // agregar información de aduana
822
        if (!empty($Transporte['Aduana']) and is_array($Transporte['Aduana'])) {