Code Duplication    Length = 22-22 lines in 2 locations

src/CTe/Dacte.php 1 location

@@ 194-215 (lines=22) @@
191
            $this->aquav = $this->dom->getElementsByTagName("aquav")->item(0);
192
            $tomador = $this->pSimpleGetValue($this->toma03, "toma");
193
            //0-Remetente;1-Expedidor;2-Recebedor;3-Destinatário;4-Outros
194
            switch ($tomador) {
195
                case '0':
196
                    $this->toma = $this->rem;
197
                    $this->enderToma = $this->enderReme;
198
                    break;
199
                case '1':
200
                    $this->toma = $this->exped;
201
                    $this->enderToma = $this->enderExped;
202
                    break;
203
                case '2':
204
                    $this->toma = $this->receb;
205
                    $this->enderToma = $this->enderReceb;
206
                    break;
207
                case '3':
208
                    $this->toma = $this->dest;
209
                    $this->enderToma = $this->enderDest;
210
                    break;
211
                default:
212
                    $this->toma = $this->toma4;
213
                    $this->enderToma = $this->pSimpleGetValue($this->toma4, "enderToma");
214
                    break;
215
            }
216
            $seguro = $this->pSimpleGetValue($this->seg, "respSeg");
217
            switch ($seguro) {
218
                case '0':

src/CTe/DacteV3.php 1 location

@@ 195-216 (lines=22) @@
192
            $this->aquav = $this->dom->getElementsByTagName("aquav")->item(0);
193
            $tomador = $this->pSimpleGetValue($this->toma03, "toma");
194
            //0-Remetente;1-Expedidor;2-Recebedor;3-Destinatário;4-Outros
195
            switch ($tomador) {
196
                case '0':
197
                    $this->toma = $this->rem;
198
                    $this->enderToma = $this->enderReme;
199
                    break;
200
                case '1':
201
                    $this->toma = $this->exped;
202
                    $this->enderToma = $this->enderExped;
203
                    break;
204
                case '2':
205
                    $this->toma = $this->receb;
206
                    $this->enderToma = $this->enderReceb;
207
                    break;
208
                case '3':
209
                    $this->toma = $this->dest;
210
                    $this->enderToma = $this->enderDest;
211
                    break;
212
                default:
213
                    $this->toma = $this->toma4;
214
                    $this->enderToma = $this->pSimpleGetValue($this->toma4, "enderToma");
215
                    break;
216
            }
217
            /*$seguro = $this->pSimpleGetValue($this->seg, "respSeg");
218
            switch ($seguro) {
219
                case '0':