Total Complexity | 3 |
Total Lines | 13 |
Duplicated Lines | 92.31 % |
Coverage | 57.14% |
Changes | 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 | View Code Duplication | # Objetos raros como llaves, setas o mapas. |
|
2 | 1 | class Pieza < Util |
|
3 | 1 | def name |
|
4 | pieza(id)['name'] |
||
5 | end |
||
6 | |||
7 | 1 | def uso |
|
8 | pieza(id)['uso'] |
||
9 | end |
||
10 | |||
11 | 1 | def precio |
|
12 | pieza(id)['precio'] |
||
13 | end |
||
14 | end |
||
15 |