Completed
Push — master ( 2f6fab...c5b9c9 )
by Goffy
11s queued 10s
created

Configurator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 35
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 18 1
1
<?php
2
3
namespace XoopsModules\Tools\Common;
4
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
10
 This program is distributed in the hope that it will be useful,
11
 but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
 */
14
/**
15
 * Configurator Class
16
 *
17
 * @copyright   XOOPS Project (https://xoops.org)
18
 * @license     http://www.fsf.org/copyleft/gpl.html GNU public license
19
 * @author      XOOPS Development Team
20
 */
21
22
/**
23
 * Class Configurator
24
 */
25
class Configurator
26
{
27
    public $name;
28
    public $paths           = [];
29
    public $uploadFolders   = [];
30
    public $copyBlankFiles  = [];
31
    public $copyTestFolders = [];
32
    public $templateFolders = [];
33
    public $oldFiles        = [];
34
    public $oldFolders      = [];
35
    public $renameTables    = [];
36
    public $modCopyright;
37
38
    /**
39
     * Configurator constructor.
40
     */
41
    public function __construct()
42
    {
43
        $moduleDirName      = \basename(\dirname(__DIR__, 2));
44
        $moduleDirNameUpper = mb_strtoupper($moduleDirName);
45
46
        $config = require \dirname(__DIR__, 2) . '/config/config.php';
47
48
        $this->name            = $config->name;
49
        $this->paths           = $config->paths;
50
        $this->uploadFolders   = $config->uploadFolders;
51
        $this->copyBlankFiles  = $config->copyBlankFiles;
52
        $this->copyTestFolders = $config->copyTestFolders;
53
        $this->templateFolders = $config->templateFolders;
54
        $this->oldFiles        = $config->oldFiles;
55
        $this->oldFolders      = $config->oldFolders;
56
        $this->renameTables    = $config->renameTables;
57
        $this->modCopyright    = $config->modCopyright;
58
    }
59
}
60