Kirki_Toolkit   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A get_instance() 0 5 2
1
<?php
2
/**
3
 * The main Kirki object
4
 *
5
 * @package     Kirki
6
 * @category    Core
7
 * @author      Aristeides Stathopoulos
8
 * @copyright   Copyright (c) 2017, Aristeides Stathopoulos
9
 * @license    https://opensource.org/licenses/MIT
10
 * @since       1.0
11
 */
12
13
// Exit if accessed directly.
14
if ( ! defined( 'ABSPATH' ) ) {
15
	exit;
16
}
17
18
/**
19
 * Singleton class
20
 */
21
final class Kirki_Toolkit {
22
23
	/**
24
	 * Holds the one, true instance of this object.
25
	 *
26
	 * @static
27
	 * @access protected
28
	 * @var object
29
	 */
30
	protected static $instance = null;
31
32
	/**
33
	 * Access the single instance of this class.
34
	 *
35
	 * @static
36
	 * @access public
37
	 * @return object Kirki_Toolkit.
38
	 */
39
	public static function get_instance() {
40
		if ( null === self::$instance ) {
41
			self::$instance = new self();
42
		}
43
		return self::$instance;
44
	}
45
}
46