Code Duplication    Length = 73-73 lines in 2 locations

src/Make.php 2 locations

@@ 1721-1793 (lines=73) @@
1718
     *
1719
     * @return \DOMElement
1720
     */
1721
    public function remTag($CNPJ = '', $CPF = '', $IE = '', $xNome = '', $xFant = '', $fone = '', $email = '')
1722
    {
1723
        $identificador = '#97 <rem> - ';
1724
        $this->rem = $this->dom->createElement('rem');
1725
        if ($CNPJ != '') {
1726
            $this->dom->addChild(
1727
                $this->rem,
1728
                'CNPJ',
1729
                $CNPJ,
1730
                true,
1731
                $identificador . 'CNPJ do Remente'
1732
            );
1733
        } elseif ($CPF != '') {
1734
            $this->dom->addChild(
1735
                $this->rem,
1736
                'CPF',
1737
                $CPF,
1738
                true,
1739
                $identificador . 'CPF do Remente'
1740
            );
1741
        } else {
1742
            $this->dom->addChild(
1743
                $this->rem,
1744
                'CNPJ',
1745
                $CNPJ,
1746
                true,
1747
                $identificador . 'CNPJ do Remente'
1748
            );
1749
            $this->dom->addChild(
1750
                $this->rem,
1751
                'CPF',
1752
                $CPF,
1753
                true,
1754
                $identificador . 'CPF do remente'
1755
            );
1756
        }
1757
        $this->dom->addChild(
1758
            $this->rem,
1759
            'IE',
1760
            $IE,
1761
            true,
1762
            $identificador . 'Inscrição Estadual do remente'
1763
        );
1764
        $this->dom->addChild(
1765
            $this->rem,
1766
            'xNome',
1767
            $xNome,
1768
            true,
1769
            $identificador . 'Razão social ou Nome do remente'
1770
        );
1771
        $this->dom->addChild(
1772
            $this->rem,
1773
            'xFant',
1774
            $xFant,
1775
            false,
1776
            $identificador . 'Nome fantasia'
1777
        );
1778
        $this->dom->addChild(
1779
            $this->rem,
1780
            'fone',
1781
            $fone,
1782
            false,
1783
            $identificador . 'Telefone'
1784
        );
1785
        $this->dom->addChild(
1786
            $this->rem,
1787
            'email',
1788
            $email,
1789
            false,
1790
            $identificador . 'Endereço de email'
1791
        );
1792
        return $this->rem;
1793
    }
1794
1795
    /**
1796
     * Gera as tags para o elemento: "enderReme" (Dados do endereço)
@@ 2306-2378 (lines=73) @@
2303
     *
2304
     * @return \DOMElement
2305
     */
2306
    public function destTag($CNPJ = '', $CPF = '', $IE = '', $xNome = '', $fone = '', $ISUF = '', $email = '')
2307
    {
2308
        $identificador = '#178 <dest> - ';
2309
        $this->dest = $this->dom->createElement('dest');
2310
        if ($CNPJ != '') {
2311
            $this->dom->addChild(
2312
                $this->dest,
2313
                'CNPJ',
2314
                $CNPJ,
2315
                true,
2316
                $identificador . 'Número do CNPJ'
2317
            );
2318
        } elseif ($CPF != '') {
2319
            $this->dom->addChild(
2320
                $this->dest,
2321
                'CPF',
2322
                $CPF,
2323
                true,
2324
                $identificador . 'Número do CPF'
2325
            );
2326
        } else {
2327
            $this->dom->addChild(
2328
                $this->dest,
2329
                'CNPJ',
2330
                $CNPJ,
2331
                true,
2332
                $identificador . 'Número do CNPJ'
2333
            );
2334
            $this->dom->addChild(
2335
                $this->dest,
2336
                'CPF',
2337
                $CPF,
2338
                true,
2339
                $identificador . 'Número do CPF'
2340
            );
2341
        }
2342
        $this->dom->addChild(
2343
            $this->dest,
2344
            'IE',
2345
            $IE,
2346
            true,
2347
            $identificador . 'Inscrição Estadual'
2348
        );
2349
        $this->dom->addChild(
2350
            $this->dest,
2351
            'xNome',
2352
            $xNome,
2353
            true,
2354
            $identificador . 'Razão social ou Nome'
2355
        );
2356
        $this->dom->addChild(
2357
            $this->dest,
2358
            'fone',
2359
            $fone,
2360
            false,
2361
            $identificador . 'Telefone'
2362
        );
2363
        $this->dom->addChild(
2364
            $this->dest,
2365
            'ISUF',
2366
            $ISUF,
2367
            false,
2368
            $identificador . 'Inscrição na SUFRAMA'
2369
        );
2370
        $this->dom->addChild(
2371
            $this->dest,
2372
            'email',
2373
            $email,
2374
            false,
2375
            $identificador . 'Endereço de email'
2376
        );
2377
        return $this->dest;
2378
    }
2379
2380
    /**
2381
     * Gera as tags para o elemento: "enderDest" (Informações do Recebedor da Carga)