Passed
Push — master ( df5caf...cd5737 )
by Michael
02:02
created

AdsligthConfigurator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 44
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0
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    XOOPS Project https://xoops.org/
14
 * @license      GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
15
 * @package
16
 * @since
17
 * @author       XOOPS Development Team
18
 */
19
20
function getConfig()
21
{
22
    $moduleDirName      = basename(dirname(__DIR__));
23
    $moduleDirNameUpper = strtoupper($moduleDirName);
24
    return (object)[
25
        'name'           => strtoupper($moduleDirName) . ' Module Configurator',
26
        'paths'          => [
27
            'dirname'    => $moduleDirName,
28
            'admin'      => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
0 ignored issues
show
Bug introduced by
The constant XOOPS_ROOT_PATH was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
29
            'modPath'    => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
30
            'modUrl'     => XOOPS_URL . '/modules/' . $moduleDirName,
0 ignored issues
show
Bug introduced by
The constant XOOPS_URL was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
31
            'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
0 ignored issues
show
Bug introduced by
The constant XOOPS_UPLOAD_PATH was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
32
            'uploadUrl'  => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
0 ignored issues
show
Bug introduced by
The constant XOOPS_UPLOAD_URL was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
33
        ],
34
        'uploadFolders'  => [
35
            constant($moduleDirNameUpper . '_UPLOAD_PATH'),
36
            constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/category',
37
            constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/screenshots',
38
            //XOOPS_UPLOAD_PATH . '/flags'
39
        ],
40
        'copyBlankFiles' => [
41
            constant($moduleDirNameUpper . '_UPLOAD_PATH'),
42
            constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/category',
43
            constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/screenshots',
44
            //XOOPS_UPLOAD_PATH . '/flags'
45
        ],
46
47
        'copyTestFolders' => [
48
            //        constant($moduleDirNameUpper . '_UPLOAD_PATH'),
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% 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...
49
            //[
50
            //    constant($moduleDirNameUpper . '_PATH') . '/testdata/images',
0 ignored issues
show
Unused Code Comprehensibility introduced by
43% 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...
51
            //    constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/images',
0 ignored issues
show
Unused Code Comprehensibility introduced by
43% 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...
52
            //]
53
        ],
54
55
        'templateFolders' => [
56
            '/templates/',
57
            '/templates/blocks/',
58
            '/templates/admin/'
59
60
        ],
61
        'oldFiles'        => [
62
            '/class/request.php',
63
            '/class/registry.php',
64
            '/class/utilities.php',
65
            '/class/util.php',
66
            '/include/constants.php',
67
            '/include/functions.php',
68
            '/ajaxrating.txt',
69
        ],
70
        'oldFolders'      => [
71
            '/images',
72
            '/css',
73
            '/js',
74
            '/tcpdf',
75
            '/images',
76
        ],
77
        'modCopyright'    => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'>
78
                     <img src='" . constant($moduleDirNameUpper . '_AUTHOR_LOGOIMG') . '\' alt=\'XOOPS Project\' /></a>',
79
    ];
80
}
81