| Total Complexity | 2 |
| Total Lines | 9 |
| Duplicated Lines | 88.89 % |
| Coverage | 60% |
| 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 | # Todos los hechizos de tipo sombra |
|
| 2 | 1 | class Sombra < Magia |
|
| 3 | 1 | def nivel |
|
| 4 | ((id / 6) + 1).to_i |
||
| 5 | end |
||
| 6 | |||
| 7 | 1 | def elemento |
|
| 8 | 'sombra' |
||
| 9 | end |
||
| 10 | end |
||
| 11 |