Code Duplication    Length = 8-9 lines in 2 locations

src/NFe/Danfe.php 1 location

@@ 772-779 (lines=8) @@
769
            }
770
        }
771
        //retorna o ID na NFe
772
        if ($classPdf!==false) {
773
            $aR = array(
774
             'id'=>str_replace('NFe', '', $this->infNFe->getAttribute("Id")),
775
             'classe_PDF'=>$this->pdf);
776
            return $aR;
777
        } else {
778
            return str_replace('NFe', '', $this->infNFe->getAttribute("Id"));
779
        }
780
    }//fim da função montaDANFE
781
782
    /**

src/NFe/Danfce.php 1 location

@@ 224-232 (lines=9) @@
221
            + $hTotal + $hpagamentos + $hmsgfiscal + $hcliente;
222
        $y = $this->pQRDANFE($x, $y, $hQRCode);
223
        //retorna o ID na NFe
224
        if ($classPdf!==false) {
225
            $aR = [
226
             'id'=>str_replace('NFe', '', $this->infNFe->getAttribute("Id")),
227
             'classe_PDF'=>$this->pdf
228
            ];
229
            return $aR;
230
        } else {
231
            return str_replace('NFe', '', $this->infNFe->getAttribute("Id"));
232
        }
233
    }
234
    
235
    protected function pCabecalhoDANFE($x = 0, $y = 0, $h = 0, $pag = '1', $totPag = '1')