These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | include __DIR__ . '/../../mainfile.php'; |
||
4 | $moduleDirName = basename(__DIR__); |
||
5 | require_once __DIR__ . '/include/common.php'; |
||
6 | |||
7 | require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
||
8 | |||
9 | require_once __DIR__ . '/class/utility.php'; |
||
10 | |||
11 | $myts = MyTextSanitizer::getInstance(); |
||
12 | |||
13 | if (false !== ($moduleHelper = Xmf\Module\Helper::getHelper($moduleDirName))) { |
||
0 ignored issues
–
show
|
|||
14 | } else { |
||
15 | $moduleHelper = Xmf\Module\Helper::getHelper('system'); |
||
16 | } |
||
17 | |||
18 | $moduleHelper->loadLanguage('main'); |
||
19 | |||
20 | //------------------------------------------------------ |
||
21 | // Getting eXtCal object's handler |
||
22 | //$catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
||
23 | //$eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
||
24 | //$extcalTimeHandler = ExtcalTime::getHandler(); |
||
25 | //$permHandler = ExtcalPerm::getHandler(); |
||
26 | //$GLOBALS['xoopsUser'] = $GLOBALS['xoopsUser'] ?: null; |
||
27 | //------------------------------------------------------ |
||
28 |
This check looks for the bodies of
if
statements that have no statements or where all statements have been commented out. This may be the result of changes for debugging or the code may simply be obsolete.These
if
bodies can be removed. If you have an empty if but statements in theelse
branch, consider inverting the condition.could be turned into
This is much more concise to read.