Configurator   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 28
c 2
b 0
f 0
dl 0
loc 38
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 19 1
1
<?php declare(strict_types=1);
2
3
namespace XoopsModules\Xoopsfaq\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     GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
19
 * @author      XOOPS Development Team
20
 */
21
22
/**
23
 * Class Configurator
24
 */
25
class Configurator
26
{
27
    public string $name;
28
    public array  $paths           = [];
29
    public array  $uploadFolders   = [];
30
    public array  $copyBlankFiles  = [];
31
    public array  $copyTestFolders = [];
32
    public array  $templateFolders = [];
33
    public array  $oldFiles        = [];
34
    public array  $oldFolders      = [];
35
    public array  $renameTables    = [];
36
    public array  $renameColumns   = [];
37
    public array  $moduleStats     = [];
38
    public string $modCopyright;
39
    public array  $icons           = [];
40
41
    /**
42
     * Configurator constructor.
43
     */
44
    public function __construct()
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->renameColumns   = $config->renameColumns;
58
        $this->moduleStats     = $config->moduleStats;
59
        $this->modCopyright    = $config->modCopyright;
60
61
        $this->icons = require \dirname(__DIR__, 2) . '/config/icons.php';
62
        $this->paths = require \dirname(__DIR__, 2) . '/config/paths.php';
63
    }
64
}
65