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

I   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 5

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 5
dl 0
loc 28
ccs 0
cts 13
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A init() 0 4 1
A runApplication() 0 9 1
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