Code Duplication    Length = 56-57 lines in 2 locations

src/Make.php 2 locations

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