Utility::getInstance()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 0
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
1
<?php
2
3
namespace XoopsModules\Smallworld;
4
5
/**
6
 * Class Utility
7
 */
8
class Utility extends Common\SysUtility
9
{
10
    //--------------- Custom module methods -----------------------------
11
12
    /**
13
     * Access the only instance of this class
14
     *
15
     * @return object
16
     */
17
    public static function getInstance()
18
    {
19
        static $instance;
20
        if (null === $instance) {
21
            $instance = new static();
22
        }
23
24
        return $instance;
25
    }
26
}
27