Code Duplication    Length = 16-20 lines in 2 locations

src/CTe/Dacte.php 1 location

@@ 1154-1173 (lines=20) @@
1151
                $texto = "devido à problemas técnicos";
1152
                $this->pTextBox($x, $y + 12, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1153
            } else {
1154
                if (!isset($this->cteProc)) {
1155
                    if (!$this->zCteDPEC()) {
1156
                        $texto = "SEM VALOR FISCAL";
1157
                        $aFont = array(
1158
                            'font' => $this->fontePadrao,
1159
                            'size' => 48,
1160
                            'style' => 'B');
1161
                        $this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1162
                    }
1163
                    $aFont = array(
1164
                        'font' => $this->fontePadrao,
1165
                        'size' => 30,
1166
                        'style' => 'B');
1167
                    $texto = "FALTA PROTOCOLO DE APROVAÇÃO DA SEFAZ";
1168
                    if (!$this->zCteDPEC()) {
1169
                        $this->pTextBox($x, $y + 12, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1170
                    } else {
1171
                        $this->pTextBox($x, $y + 25, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1172
                    }
1173
                } //fim cteProc
1174
                if ($this->tpEmis == 4) {
1175
                    //DPEC
1176
                    $x = 10;

src/NFe/Danfe.php 1 location

@@ 1375-1390 (lines=16) @@
1372
                $aFont = array('font'=>$this->fontePadrao, 'size'=>30, 'style'=>'B');
1373
                $texto = "devido à problemas técnicos";
1374
                $this->pTextBox($x, $y+12, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1375
            } else {
1376
                if (!isset($this->nfeProc)) {
1377
                    if (!$this->pNotaDPEC()) {
1378
                        $texto = "SEM VALOR FISCAL";
1379
                        $aFont = array('font'=>$this->fontePadrao, 'size'=>48, 'style'=>'B');
1380
                        $this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1381
                    }
1382
                    $aFont = array('font'=>$this->fontePadrao, 'size'=>30, 'style'=>'B');
1383
                    $texto = "FALTA PROTOCOLO DE APROVAÇÃO DA SEFAZ";
1384
                    if (!$this->pNotaDPEC()) {
1385
                        $this->pTextBox($x, $y+12, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1386
                    } else {
1387
                        $this->pTextBox($x, $y+25, $w, $h, $texto, $aFont, 'C', 'C', 0, '');
1388
                    }
1389
                }//fim nefProc
1390
            }//fim tpEmis
1391
            $this->pdf->SetTextColor(0, 0, 0);
1392
        }
1393
        return $oldY;