Conditions | 4 |
Paths | 6 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 17 |
Ratio | 100 % |
Changes | 1 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
32 | View Code Duplication | function xoops_module_pre_install_randomquote(&$module) |
|
|
|||
33 | { |
||
34 | |||
35 | if (!class_exists('RandomquoteUtilities')) { |
||
36 | xoops_load('utilities', 'randomquote'); |
||
37 | } |
||
38 | //check for minimum XOOPS version |
||
39 | if (!RandomquoteUtilities::checkXoopsVer($module)) { |
||
40 | return false; |
||
41 | } |
||
42 | |||
43 | // check for minimum PHP version |
||
44 | if (!RandomquoteUtilities::checkPHPVer($module)) { |
||
45 | return false; |
||
46 | } |
||
47 | return true; |
||
48 | } |
||
49 | |||
60 |
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.