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 | # Pociones de todo tipo |
|
2 | 1 | class Pocion < Util |
|
3 | 1 | def name |
|
4 | pocion(id)['name'] |
||
5 | end |
||
6 | |||
7 | 1 | def efecto |
|
8 | pocion(id)['efecto'] |
||
9 | end |
||
10 | |||
11 | 1 | def precio |
|
12 | pocion(id)['precio'] |
||
13 | end |
||
14 | end |
||
15 |