1 | <?php |
||
2 | /* |
||
3 | * You may not change or alter any portion of this comment or credits |
||
4 | * of supporting developers from this source code or any supporting source code |
||
5 | * which is considered copyrighted (c) material of the original comment or credit authors. |
||
6 | * |
||
7 | * This program is distributed in the hope that it will be useful, |
||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||
10 | */ |
||
11 | |||
12 | /** |
||
13 | * @copyright {@link https://xoops.org/ XOOPS Project} |
||
14 | * @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU GPL 2 or later} |
||
15 | * @package |
||
16 | * @since |
||
17 | * @author XOOPS Development Team, |
||
18 | */ |
||
19 | |||
20 | // Part of the efqDirectory module provided by: wtravel // |
||
21 | // e-mail: [email protected] // |
||
22 | // Purpose: Create a business directory for xoops. // |
||
23 | // Based upon the mylinks and the mxDirectory modules // |
||
24 | |||
25 | $moduleDirName = basename(dirname(__DIR__)); |
||
26 | |||
27 | if (false !== ($moduleHelper = Xmf\Module\Helper::getHelper($moduleDirName))) { |
||
0 ignored issues
–
show
This
if statement is empty and can be removed.
This check looks for the bodies of These if (rand(1, 6) > 3) {
//print "Check failed";
} else {
print "Check succeeded";
}
could be turned into if (rand(1, 6) <= 3) {
print "Check succeeded";
}
This is much more concise to read. ![]() |
|||
28 | } else { |
||
29 | $moduleHelper = Xmf\Module\Helper::getHelper('system'); |
||
30 | } |
||
31 | $adminObject = \Xmf\Module\Admin::getInstance(); |
||
0 ignored issues
–
show
The type
Xmf\Module\Admin was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
32 | |||
33 | $pathIcon32 = \Xmf\Module\Admin::menuIconPath(''); |
||
34 | //$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. ![]() |
|||
35 | |||
36 | $moduleHelper->loadLanguage('modinfo'); |
||
37 | |||
38 | $adminmenu[] = [ |
||
39 | 'title' => _AM_MODULEADMIN_HOME, |
||
0 ignored issues
–
show
|
|||
40 | 'link' => 'admin/index.php', |
||
41 | 'icon' => $pathIcon32 . '/home.png', |
||
42 | ]; |
||
43 | $adminmenu[] = [ |
||
44 | 'title' => _MI_EFQDIR_ADMENU3, |
||
45 | 'link' => 'admin/directories.php', |
||
46 | 'icon' => $pathIcon32 . '/category.png', |
||
47 | ]; |
||
48 | $adminmenu[] = [ |
||
49 | 'title' => _MI_EFQDIR_ADMENU4, |
||
50 | 'link' => 'admin/fieldtypes.php', |
||
51 | 'icon' => $pathIcon32 . '/manage.png' |
||
52 | ]; |
||
53 | $adminmenu[] = [ |
||
54 | 'title' => _MI_EFQDIR_ADMENU5, |
||
55 | 'link' => 'admin/main.php?op=listNewListings', |
||
56 | 'icon' => 'images/prefs.png', |
||
57 | ]; |
||
58 | $adminmenu[] = [ |
||
59 | 'title' => _MI_EFQDIR_ADMENU7, |
||
60 | 'link' => 'admin/subscriptions.php', |
||
61 | 'icon' => $pathIcon32 . '/manage.png' |
||
62 | ]; |
||
63 | $adminmenu[] = [ |
||
64 | 'title' => _MI_EFQDIR_ADMENU8, |
||
65 | 'link' => 'admin/main.php?op=duplicateDataTypes', |
||
66 | 'icon' => $pathIcon32 . '/manage.png', |
||
67 | ]; |
||
68 | $adminmenu[] = [ |
||
69 | 'title' => _AM_MODULEADMIN_ABOUT, |
||
0 ignored issues
–
show
|
|||
70 | 'link' => 'admin/about.php', |
||
71 | 'icon' => $pathIcon32 . '/about.png', |
||
72 | ]; |
||
73 | //$adminmenu[5]['title'] = _MI_EFQDIR_ADMENU6; |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
68% 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. ![]() |
|||
74 | //$adminmenu[5]['link'] = "admin/addresstypes.php"; |
||
75 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths