Configurator   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 27
dl 0
loc 35
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 17 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace XoopsModules\Countdown\Common;
6
7
/*
8
 You may not change or alter any portion of this comment or credits
9
 of supporting developers from this source code or any supporting source code
10
 which is considered copyrighted (c) material of the original comment or credit authors.
11
12
 This program is distributed in the hope that it will be useful,
13
 but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
*/
16
/**
17
 * Module: Countdown
18
 *
19
 * @category        Module
20
 * @package         countdown
21
 * @author          XOOPS Development Team <https://xoops.org>
22
 * @copyright       {@link https://xoops.org/ XOOPS Project}
23
 * @license         GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
24
 * @link            https://xoops.org/
25
 * @since           1.0.0
26
 */
27
28
//require_once  dirname(dirname(__DIR__)) . '/include/common.php';
29
30
/**
31
 * Class Configurator
32
 */
33
class Configurator
34
{
35
    public $name;
36
    public $paths           = [];
37
    public $uploadFolders   = [];
38
    public $copyBlankFiles  = [];
39
    public $copyTestFolders = [];
40
    public $templateFolders = [];
41
    public $oldFiles        = [];
42
    public $oldFolders      = [];
43
    public $renameTables    = [];
44
    public $moduleStats     = [];
45
    public $modCopyright;
46
    public $icons;
47
48
    /**
49
     * Configurator constructor.
50
     */
51
    public function __construct()
52
    {
53
        $config                = include dirname(dirname(__DIR__)) . '/config/config.php';
54
        $this->name            = $config->name;
55
        $this->paths           = $config->paths;
56
        $this->uploadFolders   = $config->uploadFolders;
57
        $this->copyBlankFiles  = $config->copyBlankFiles;
58
        $this->copyTestFolders = $config->copyTestFolders;
59
        $this->templateFolders = $config->templateFolders;
60
        $this->oldFiles        = $config->oldFiles;
61
        $this->oldFolders      = $config->oldFolders;
62
        $this->renameTables    = $config->renameTables;
63
        $this->moduleStats     = $config->moduleStats;
64
        $this->modCopyright    = $config->modCopyright;
65
66
        $this->icons = include dirname(dirname(__DIR__)) . '/config/icons.php';
67
        $this->paths = include dirname(dirname(__DIR__)) . '/config/paths.php';
68
    }
69
}
70