Total Complexity | 2 |
Total Lines | 34 |
Duplicated Lines | 52.94 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
1 | <?php |
||
9 | class RetornosCliente extends Nucleo\Instancia { |
||
10 | |||
11 | /** |
||
12 | * Faz o upload do arquivo de retorno do banco para a API |
||
13 | * |
||
14 | * @param string $arquivo |
||
15 | * @return \OBRSDK\Entidades\Retornos Lista de boletos e propriedades que |
||
16 | * foram processados pelo arquivo de retorno |
||
17 | */ |
||
18 | View Code Duplication | public function enviarArquivoRetorno($arquivo) { |
|
27 | } |
||
28 | |||
29 | /** |
||
30 | * Pega dados de retorno enviado anteriormente |
||
31 | * |
||
32 | * @param string $retornoId |
||
33 | * @return \OBRSDK\Entidades\Retornos |
||
34 | */ |
||
35 | View Code Duplication | public function getRetorno($retornoId) { |
|
46 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.