Utility::getInstance()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 8
rs 10
cc 2
nc 2
nop 0
1
<?php
2
3
namespace XoopsModules\Groupmanager;
4
5
/*
6
 Utility Class Definition
7
8
 You may not change or alter any portion of this comment or credits of
9
 supporting developers from this source code or any supporting source code
10
 which is considered copyrighted (c) material of the original comment or credit
11
 authors.
12
13
 This program is distributed in the hope that it will be useful, but
14
 WITHOUT ANY WARRANTY; without even the implied warranty of
15
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
 */
17
/**
18
 * @package      \module\xsitemap\class
19
 * @license      https://www.fsf.org/copyleft/gpl.html GNU public license
20
 * @copyright    https://xoops.org 2000-2020 &copy; XOOPS Project
21
 * @author       Mamba <[email protected]>
22
 */
23
24
/**
25
 * Class Utility
26
 */
27
class Utility extends Common\SysUtility
28
{
29
    //--------------- Custom module methods -----------------------------
30
    /**
31
     * Access the only instance of this class
32
     *
33
     * @return object
34
     */
35
    public static function getInstance()
36
    {
37
        static $instance;
38
        if (null === $instance) {
39
            $instance = new static();
40
        }
41
42
        return $instance;
43
    }
44
}
45