Completed
Push — master ( 171474...8d265e )
by Michael
01:31
created

Configurator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 34
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 namespace Xoopsmodules\randomquote\common;
2
3
/*
4
 You may not change or alter any portion of this comment or credits
5
 of supporting developers from this source code or any supporting source code
6
 which is considered copyrighted (c) material of the original comment or credit authors.
7
8
 This program is distributed in the hope that it will be useful,
9
 but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
*/
12
/**
13
 * Module: randomquote
14
 *
15
 * @category        Module
16
 * @package         randomquote
17
 * @author          XOOPS Development Team <[email protected]> - <https://xoops.org>
18
 * @copyright       {@link https://xoops.org/ XOOPS Project}
19
 * @license         GPL 2.0 or later
20
 * @link            https://xoops.org/
21
 * @since           1.0.0
22
 */
23
24
//require_once __DIR__ . '/../../include/common.php';
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
25
26
/**
27
 * Class Configurator
28
 */
29
class Configurator
30
{
31
    public $name;
32
    public $paths           = [];
33
    public $uploadFolders   = [];
34
    public $copyBlankFiles  = [];
35
    public $copyTestFolders = [];
36
    public $templateFolders = [];
37
    public $oldFiles        = [];
38
    public $oldFolders      = [];
39
    public $modCopyright;
40
41
    /**
42
     * Configurator constructor.
43
     */
44
    public function __construct()
45
    {
46
        $moduleDirName = basename(dirname(__DIR__));
47
        $capsDirName   = strtoupper($moduleDirName);
48
49
        $config = include __DIR__ . '/../../include/config.php';
50
51
        $this->name            = $config->name;
52
        $this->paths           = $config->paths;
53
        $this->uploadFolders   = $config->uploadFolders;
54
        $this->copyBlankFiles  = $config->copyBlankFiles;
55
        $this->copyTestFolders = $config->copyTestFolders;
56
        $this->templateFolders = $config->templateFolders;
57
        $this->oldFiles        = $config->oldFiles;
58
        $this->oldFolders      = $config->oldFolders;
59
        $this->modCopyright    = $config->modCopyright;
60
61
    }
62
}
63