Configurator   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 29
dl 0
loc 39
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 20 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace XoopsModules\Gbook\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
18
/**
19
 * Configurator Class
20
 *
21
 * @copyright   XOOPS Project (https://xoops.org)
22
 * @license     http://www.fsf.org/copyleft/gpl.html GNU public license
23
 * @author      XOOPS Development Team
24
 */
25
26
//require_once \dirname(__DIR__, 2) . '/include/common.php';
27
28
/**
29
 * Class Configurator
30
 */
31
class Configurator
32
{
33
    public $name;
34
    public $paths           = [];
35
    public $uploadFolders   = [];
36
    public $copyBlankFiles  = [];
37
    public $copyTestFolders = [];
38
    public $templateFolders = [];
39
    public $oldFiles        = [];
40
    public $oldFolders      = [];
41
    public $renameTables    = [];
42
    public $renameColumns   = [];
43
    public $moduleStats     = [];
44
    public $modCopyright;
45
    public $icons;
46
47
    /**
48
     * Configurator constructor.
49
     */
50
    public function __construct()
51
    {
52
53
        $config = require \dirname(__DIR__, 2) . '/config/config.php';
54
55
        $this->name            = $config->name;
56
        $this->paths           = $config->paths;
57
        $this->uploadFolders   = $config->uploadFolders;
58
        $this->copyBlankFiles  = $config->copyBlankFiles;
59
        $this->copyTestFolders = $config->copyTestFolders;
60
        $this->templateFolders = $config->templateFolders;
61
        $this->oldFiles        = $config->oldFiles;
62
        $this->oldFolders      = $config->oldFolders;
63
        $this->renameTables    = $config->renameTables;
64
        $this->renameColumns   = $config->renameColumns;
65
        $this->moduleStats     = $config->moduleStats;
66
        $this->modCopyright    = $config->modCopyright;
67
68
        $this->icons = require \dirname(__DIR__, 2) . '/config/icons.php';
69
        $this->paths = require \dirname(__DIR__, 2) . '/config/paths.php';
70
71
    }
72
}
73