Passed
Push — master ( 08c22c...f61562 )
by Michael
03:58
created

paths.php ➔ getPaths()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 23

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 23
rs 9.552
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @return object
5
 */
6
function getPaths()
7
{
8
    $moduleDirName      = basename(dirname(__DIR__));
9
    $moduleDirNameUpper = mb_strtoupper($moduleDirName);
0 ignored issues
show
Unused Code introduced by
The assignment to $moduleDirNameUpper is dead and can be removed.
Loading history...
10
11
    return (object)[
12
        'name'          => mb_strtoupper($moduleDirName) . ' PathConfigurator',
13
        'paths'         => [
14
            'dirname'    => $moduleDirName,
15
            'admin'      => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
16
            'modPath'    => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
17
            'modUrl'     => XOOPS_URL . '/modules/' . $moduleDirName,
18
            'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
19
            'uploadUrl'  => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
20
        ],
21
        'uploadFolders' => [
22
            XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
23
            XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category',
24
            XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots',
25
            //XOOPS_UPLOAD_PATH . '/flags'
26
        ],
27
    ];
28
}
29