Passed
Push — master ( 40654a...b847d6 )
by Michael
06:43 queued 10s
created

getPaths()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

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