Configurator   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 28
c 1
b 0
f 0
dl 0
loc 36
rs 10
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\Tdmdownloads\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
 * Configurator Class
18
 *
19
 * @copyright   XOOPS Project (https://xoops.org)
20
 * @license     http://www.fsf.org/copyleft/gpl.html GNU public license
21
 * @author      XOOPS Development Team
22
 */
23
24
/**
25
 * Class Configurator
26
 */
27
class Configurator
28
{
29
    public $name;
30
    public $paths           = [];
31
    public $uploadFolders   = [];
32
    public $copyBlankFiles  = [];
33
    public $copyTestFolders = [];
34
    public $templateFolders = [];
35
    public $oldFiles        = [];
36
    public $oldFolders      = [];
37
    public $renameTables    = [];
38
    public $renameColumns   = [];
39
    public $moduleStats     = [];
40
    public $modCopyright;
41
    public $icons;
42
43
    /**
44
     * Configurator constructor.
45
     */
46
    public function __construct()
47
    {
48
        $config                = require \dirname(__DIR__, 2) . '/config/config.php';
49
        $this->name            = $config->name;
50
//        $this->paths           = $config->paths;
51
        $this->uploadFolders   = $config->uploadFolders;
52
        $this->copyBlankFiles  = $config->copyBlankFiles;
53
        $this->copyTestFolders = $config->copyTestFolders;
54
        $this->templateFolders = $config->templateFolders;
55
        $this->oldFiles        = $config->oldFiles;
56
        $this->oldFolders      = $config->oldFolders;
57
        $this->renameTables    = $config->renameTables;
58
        $this->renameColumns   = $config->renameColumns;
59
        $this->moduleStats     = $config->moduleStats;
60
        $this->modCopyright    = $config->modCopyright;
61
        $this->icons           = require \dirname(__DIR__, 2) . '/config/icons.php';
62
        $this->paths           = require \dirname(__DIR__, 2) . '/config/paths.php';
63
    }
64
}
65