Completed
Push — master ( bf54d1...c54225 )
by Gregory
01:52
created

I::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 3
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * File: I.php
4
 */
5
6
namespace Tivnet\WPDB;
7
8
use Symfony\Component\Console\Application;
9
10
/**
11
 * Class I: the Instance.
12
 */
13
class I {
14
15
	/**
16
	 * @var Config
17
	 */
18
	public static $cfg;
19
20
	/**
21
	 * Constructor.
22
	 */
23
	public static function init() {
24
		self::$cfg = new Config();
25
		self::runApplication();
26
	}
27
28
	/**
29
	 * Configure and run the application.
30
	 */
31
	protected static function runApplication() {
32
		$app = new Application( Config::APPLICATION_TITLE, '@package_version@' );
33
		$app->addCommands( array(
34
			new Command\ListDumpsCommand(),
35
			new Command\HiCommand(),
36
			new Command\SelfUpdateCommand(),
37
		) );
38
		$app->run();
39
	}
40
}
41