mambax7 /
xoopsmembers
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Name: menu.php |
||
| 4 | * Description: Menu for the Xoops Members Module |
||
| 5 | * |
||
| 6 | * You may not change or alter any portion of this comment or credits |
||
| 7 | * of supporting developers from this source code or any supporting source code |
||
| 8 | * which is considered copyrighted (c) material of the original comment or credit authors. |
||
| 9 | * This program is distributed in the hope that it will be useful, |
||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||
| 12 | * |
||
| 13 | * @copyright :: XOOPS Project (https://xoops.org) |
||
| 14 | * @license :: {@link http://www.fsf.org/copyleft/gpl.html GNU public license} |
||
| 15 | * @package :: xoopsmembers |
||
| 16 | * @subpackage:: Xoops Members Adminisration |
||
| 17 | * @since :: 1.02 |
||
| 18 | * @author :: John Neill |
||
| 19 | */ |
||
| 20 | |||
| 21 | $moduleDirName = basename(dirname(__DIR__)); |
||
| 22 | |||
| 23 | if (false !== ($moduleHelper = Xmf\Module\Helper::getHelper($moduleDirName))) { |
||
|
0 ignored issues
–
show
|
|||
| 24 | } else { |
||
| 25 | $moduleHelper = Xmf\Module\Helper::getHelper('system'); |
||
| 26 | } |
||
| 27 | $adminObject = \Xmf\Module\Admin::getInstance(); |
||
| 28 | |||
| 29 | $pathIcon32 = \Xmf\Module\Admin::menuIconPath(''); |
||
| 30 | //$pathModIcon32 = $moduleHelper->getModule()->getInfo('modicons32'); |
||
|
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
67% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. Loading history...
|
|||
| 31 | |||
| 32 | $moduleHelper->loadLanguage('modinfo'); |
||
| 33 | |||
| 34 | $adminObject = array(); |
||
| 35 | $i = 1; |
||
| 36 | $adminmenu[$i]['title'] = _AM_MODULEADMIN_HOME; |
||
| 37 | $adminmenu[$i]['link'] = 'admin/index.php'; |
||
| 38 | $adminmenu[$i]['icon'] = $pathIcon32 . '/home.png'; |
||
| 39 | |||
| 40 | $i++; |
||
| 41 | $adminmenu[$i]['title'] = _AM_MODULEADMIN_ABOUT; |
||
| 42 | $adminmenu[$i]['link'] = 'admin/about.php'; |
||
| 43 | $adminmenu[$i]['icon'] = $pathIcon32 . '/about.png'; |
||
| 44 |
This check looks for the bodies of
ifstatements 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
ifbodies can be removed. If you have an empty if but statements in theelsebranch, consider inverting the condition.could be turned into
This is much more concise to read.