Code Duplication    Length = 15-15 lines in 2 locations

src/CTe/Dacte.php 1 location

@@ 1033-1047 (lines=15) @@
1030
        $tpAmb = $this->ide->getElementsByTagName('tpAmb')->item(0)->nodeValue;
1031
        //indicar cancelamento
1032
        $cStat = $this->pSimpleGetValue($this->cteProc, "cStat");
1033
        if ($cStat == '101' || $cStat == '135' || $this->situacao_externa == self::NFEPHP_SITUACAO_EXTERNA_CANCELADA) {
1034
            //101 Cancelamento
1035
            $x = 10;
1036
            $y = $this->hPrint - 130;
1037
            $h = 25;
1038
            $w = $maxW - (2 * $x);
1039
            $this->pdf->SetTextColor(90, 90, 90);
1040
            $texto = "CTe CANCELADO";
1041
            $aFont = array(
1042
                'font' => $this->fontePadrao,
1043
                'size' => 48,
1044
                'style' => 'B');
1045
            $this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1046
            $this->pdf->SetTextColor(0, 0, 0);
1047
        }
1048
        $cStat = $this->pSimpleGetValue($this->cteProc, "cStat");
1049
        if ($cStat == '110' ||
1050
            $cStat == '301' ||

src/CTe/DacteV3.php 1 location

@@ 1023-1037 (lines=15) @@
1020
        $tpAmb = $this->ide->getElementsByTagName('tpAmb')->item(0)->nodeValue;
1021
        //indicar cancelamento
1022
        $cStat = $this->pSimpleGetValue($this->cteProc, "cStat");
1023
        if ($cStat == '101' || $cStat == '135' || $this->situacao_externa == self::NFEPHP_SITUACAO_EXTERNA_CANCELADA) {
1024
            //101 Cancelamento
1025
            $x = 10;
1026
            $y = $this->hPrint - 130;
1027
            $h = 25;
1028
            $w = $maxW - (2 * $x);
1029
            $this->pdf->SetTextColor(90, 90, 90);
1030
            $texto = "CTe CANCELADO";
1031
            $aFont = array(
1032
                'font' => $this->fontePadrao,
1033
                'size' => 48,
1034
                'style' => 'B');
1035
            $this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1036
            $this->pdf->SetTextColor(0, 0, 0);
1037
        }
1038
        $cStat = $this->pSimpleGetValue($this->cteProc, "cStat");
1039
        if ($cStat == '110' ||
1040
            $cStat == '301' ||