Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 17 |
Ratio | 100 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | View Code Duplication | function adminer_object() |
|
30 | { |
||
31 | class AdminerKfr extends Adminer |
||
32 | { |
||
33 | public function name() |
||
34 | { |
||
35 | return 'XOOPS Admin'; |
||
36 | } |
||
37 | |||
38 | public function credentials() |
||
39 | { |
||
40 | return array(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS); |
||
41 | } |
||
42 | |||
43 | public function database() |
||
44 | { |
||
45 | return XOOPS_DB_NAME; |
||
46 | } |
||
58 |
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.