Code Duplication    Length = 56-57 lines in 2 locations

src/Make.php 2 locations

@@ 875-930 (lines=56) @@
872
     *
873
     * @return DOMElement
874
     */
875
    public function tagperi(stdClass $std)
876
    {
877
        $possible = [
878
            'nONU',
879
            'xNomeAE',
880
            'xClaRisco',
881
            'grEmb',
882
            'qTotProd',
883
            'qVolTipo'
884
        ];
885
        $std = $this->equilizeParameters($std, $possible);
886
        $peri = $this->dom->createElement("peri");
887
        $this->dom->addChild(
888
            $peri,
889
            "nONU",
890
            $std->nONU,
891
            true,
892
            "Número ONU/UN"
893
        );
894
        $this->dom->addChild(
895
            $peri,
896
            "xNomeAE",
897
            $std->xNomeAE,
898
            true,
899
            "Nome apropriado para embarque do produto"
900
        );
901
        $this->dom->addChild(
902
            $peri,
903
            "xClaRisco",
904
            $std->xClaRisco,
905
            true,
906
            "Classe ou subclasse/divisão, e risco subsidiário/risco secundário"
907
        );
908
        $this->dom->addChild(
909
            $peri,
910
            "grEmb",
911
            $std->grEmb,
912
            true,
913
            "Grupo de Embalagem"
914
        );
915
        $this->dom->addChild(
916
            $peri,
917
            "qTotProd",
918
            $std->qTotProd,
919
            true,
920
            "Quantidade total por produto"
921
        );
922
        $this->dom->addChild(
923
            $peri,
924
            "qVolTipo",
925
            $std->qVolTipo,
926
            true,
927
            "Quantidade e Tipo de volumes"
928
        );
929
        return $peri;
930
    }
931
    
932
    /**
933
     * taginfNFe
@@ 1272-1328 (lines=57) @@
1269
     *
1270
     * @return DOMElement
1271
     */
1272
    public function tagtot(stdClass $std)
1273
    {
1274
        $possible = [
1275
            'qCTe',
1276
            'qNFe',
1277
            'qMDFe',
1278
            'vCarga',
1279
            'cUnid',
1280
            'qCarga'
1281
        ];
1282
        $std = $this->equilizeParameters($std, $possible);
1283
        $tot = $this->dom->createElement("tot");
1284
        $this->dom->addChild(
1285
            $tot,
1286
            "qCTe",
1287
            $std->qCTe,
1288
            false,
1289
            "Quantidade total de CT-e relacionados no Manifesto"
1290
        );
1291
        $this->dom->addChild(
1292
            $tot,
1293
            "qNFe",
1294
            $std->qNFe,
1295
            false,
1296
            "Quantidade total de NF-e relacionados no Manifesto"
1297
        );
1298
        $this->dom->addChild(
1299
            $tot,
1300
            "qMDFe",
1301
            $std->qMDFe,
1302
            false,
1303
            "Quantidade total de MDF-e relacionados no Manifesto"
1304
        );
1305
        $this->dom->addChild(
1306
            $tot,
1307
            "vCarga",
1308
            $std->vCarga,
1309
            true,
1310
            "Valor total da mercadoria/carga transportada"
1311
        );
1312
        $this->dom->addChild(
1313
            $tot,
1314
            "cUnid",
1315
            $std->cUnid,
1316
            true,
1317
            "Código da unidade de medida do Peso Bruto da Carga / Mercadoria Transportada"
1318
        );
1319
        $this->dom->addChild(
1320
            $tot,
1321
            "qCarga",
1322
            $std->qCarga,
1323
            true,
1324
            "Peso Bruto Total da Carga / Mercadoria Transportada"
1325
        );
1326
        $this->tot = $tot;
1327
        return $tot;
1328
    }
1329
1330
    /**
1331
     * tagLacres