Completed
Push — master ( 37052f...d19713 )
by Michael
02:03
created

Instruction   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 36
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getInstance() 0 9 2
A getDirname() 0 4 1
1
<?php
2
/*
3
 * You may not change or alter any portion of this comment or credits
4
 * of supporting developers from this source code or any supporting source code
5
 * which is considered copyrighted (c) material of the original comment or credit authors.
6
 *
7
 * This program is distributed in the hope that it will be useful,
8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
 */
11
12
/**
13
 * @copyright    XOOPS Project https://xoops.org/
14
 * @license      GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
15
 * @package
16
 * @since
17
 * @author       XOOPS Development Team
18
 */
19
defined('XOOPS_ROOT_PATH') || exit('Restricted access');
20
21
/**
22
 * Class XoalbumHelper
23
 */
24
class Instruction extends \Xmf\Module\Helper
25
{
26
    public $debugArray = [];
27
28
    /**
29
     * @internal param $debug
30
     */
31
    protected function __construct()
32
    {
33
        //        $this->debug   = $debug;
0 ignored issues
show
Unused Code Comprehensibility introduced by
45% 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...
34
        $this->dirname = basename(dirname(__DIR__));
35
    }
36
37
    /**
38
     * @param bool $debug
39
     *
40
     * @return Newbb
41
     */
42
    public static function getInstance($debug = false)
43
    {
44
        static $instance;
45
        if (null === $instance) {
46
            $instance = new static($debug);
47
        }
48
49
        return $instance;
50
    }
51
52
    /**
53
     * @return string
54
     */
55
    public function getDirname()
56
    {
57
        return $this->dirname;
58
    }
59
}
60