LSX_Currencies   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 34
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A init() 0 6 2
1
<?php
2
/**
3
 * LSX Currency Deprecated Main Class
4
 *
5
 * @package   LSX Currencies
6
 * @author    LightSpeed
7
 * @license   GPL3
8
 * @link
9
 * @copyright 2019 LightSpeed
10
 */
11
12
/**
13
 * The main class
14
 */
15
class LSX_Currencies {
16
17
	/**
18
	 * A wrapper for the deprecated class.
19
	 *
20
	 * @var object
21
	 */
22
	public $class = '';
23
24
	/**
25
	 * Holds instance of the class
26
	 *
27
	 * @var object \lsx\currencies\classes\Currencies()
28
	 */
29
	private static $instance;
30
31
	/**
32
	 * Constructor
33
	 */
34
	public function __construct() {
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
35
		$this->class = lsx_currencies();
36
	}
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
37
38
	/**
39
	 * Return an instance of this class.
40
	 *
41
	 * @return  object
42
	 */
43
	public static function init() {
44
		// If the single instance hasn't been set, set it now.
45
		if ( ! isset( self::$instance ) ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
46
			self::$instance = new self();
47
		}
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
48
		return self::$instance;
49
	}
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
50
}
51