Code Duplication    Length = 73-73 lines in 2 locations

src/Make.php 2 locations

@@ 1689-1761 (lines=73) @@
1686
     *
1687
     * @return \DOMElement
1688
     */
1689
    public function remTag($CNPJ = '', $CPF = '', $IE = '', $xNome = '', $xFant = '', $fone = '', $email = '')
1690
    {
1691
        $identificador = '#97 <rem> - ';
1692
        $this->rem = $this->dom->createElement('rem');
1693
        if ($CNPJ != '') {
1694
            $this->dom->addChild(
1695
                $this->rem,
1696
                'CNPJ',
1697
                $CNPJ,
1698
                true,
1699
                $identificador . 'CNPJ do Remente'
1700
            );
1701
        } elseif ($CPF != '') {
1702
            $this->dom->addChild(
1703
                $this->rem,
1704
                'CPF',
1705
                $CPF,
1706
                true,
1707
                $identificador . 'CPF do Remente'
1708
            );
1709
        } else {
1710
            $this->dom->addChild(
1711
                $this->rem,
1712
                'CNPJ',
1713
                $CNPJ,
1714
                true,
1715
                $identificador . 'CNPJ do Remente'
1716
            );
1717
            $this->dom->addChild(
1718
                $this->rem,
1719
                'CPF',
1720
                $CPF,
1721
                true,
1722
                $identificador . 'CPF do remente'
1723
            );
1724
        }
1725
        $this->dom->addChild(
1726
            $this->rem,
1727
            'IE',
1728
            $IE,
1729
            true,
1730
            $identificador . 'Inscrição Estadual do remente'
1731
        );
1732
        $this->dom->addChild(
1733
            $this->rem,
1734
            'xNome',
1735
            $xNome,
1736
            true,
1737
            $identificador . 'Razão social ou Nome do remente'
1738
        );
1739
        $this->dom->addChild(
1740
            $this->rem,
1741
            'xFant',
1742
            $xFant,
1743
            false,
1744
            $identificador . 'Nome fantasia'
1745
        );
1746
        $this->dom->addChild(
1747
            $this->rem,
1748
            'fone',
1749
            $fone,
1750
            false,
1751
            $identificador . 'Telefone'
1752
        );
1753
        $this->dom->addChild(
1754
            $this->rem,
1755
            'email',
1756
            $email,
1757
            false,
1758
            $identificador . 'Endereço de email'
1759
        );
1760
        return $this->rem;
1761
    }
1762
1763
    /**
1764
     * Gera as tags para o elemento: "enderReme" (Dados do endereço)
@@ 2276-2348 (lines=73) @@
2273
     *
2274
     * @return \DOMElement
2275
     */
2276
    public function destTag($CNPJ = '', $CPF = '', $IE = '', $xNome = '', $fone = '', $ISUF = '', $email = '')
2277
    {
2278
        $identificador = '#178 <dest> - ';
2279
        $this->dest = $this->dom->createElement('dest');
2280
        if ($CNPJ != '') {
2281
            $this->dom->addChild(
2282
                $this->dest,
2283
                'CNPJ',
2284
                $CNPJ,
2285
                true,
2286
                $identificador . 'Número do CNPJ'
2287
            );
2288
        } elseif ($CPF != '') {
2289
            $this->dom->addChild(
2290
                $this->dest,
2291
                'CPF',
2292
                $CPF,
2293
                true,
2294
                $identificador . 'Número do CPF'
2295
            );
2296
        } else {
2297
            $this->dom->addChild(
2298
                $this->dest,
2299
                'CNPJ',
2300
                $CNPJ,
2301
                true,
2302
                $identificador . 'Número do CNPJ'
2303
            );
2304
            $this->dom->addChild(
2305
                $this->dest,
2306
                'CPF',
2307
                $CPF,
2308
                true,
2309
                $identificador . 'Número do CPF'
2310
            );
2311
        }
2312
        $this->dom->addChild(
2313
            $this->dest,
2314
            'IE',
2315
            $IE,
2316
            true,
2317
            $identificador . 'Inscrição Estadual'
2318
        );
2319
        $this->dom->addChild(
2320
            $this->dest,
2321
            'xNome',
2322
            $xNome,
2323
            true,
2324
            $identificador . 'Razão social ou Nome'
2325
        );
2326
        $this->dom->addChild(
2327
            $this->dest,
2328
            'fone',
2329
            $fone,
2330
            false,
2331
            $identificador . 'Telefone'
2332
        );
2333
        $this->dom->addChild(
2334
            $this->dest,
2335
            'ISUF',
2336
            $ISUF,
2337
            false,
2338
            $identificador . 'Inscrição na SUFRAMA'
2339
        );
2340
        $this->dom->addChild(
2341
            $this->dest,
2342
            'email',
2343
            $email,
2344
            false,
2345
            $identificador . 'Endereço de email'
2346
        );
2347
        return $this->dest;
2348
    }
2349
2350
    /**
2351
     * Gera as tags para o elemento: "enderDest" (Informações do Recebedor da Carga)