FeatureLevel   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A doRun() 0 15 1
1
<?php
2
/**
3
 * @author Threema GmbH
4
 * @copyright Copyright (c) 2015-2016 Threema GmbH
5
 */
6
7
namespace Threema\Console\Command;
8
9
use Threema\Console\Common;
10
use Threema\MsgApi\Tools\CryptTool;
11
12
class FeatureLevel extends Base {
13
	public function __construct() {
14
		parent::__construct('Show current feature level',
15
			[],
16
			'Show current version and feature level');
17
	}
18
19
	protected function doRun() {
20
		$cryptTool = CryptTool::getInstance();
21
22
		Common::l('Version: '.MSGAPI_SDK_VERSION);
23
		Common::l('Feature level: '.MSGAPI_SDK_FEATURE_LEVEL);
24
		Common::l('CryptTool: '.$cryptTool->getName().' ('.$cryptTool->getDescription().')');
25
26
		Common::l(' ╔═══════╤══════╤══════════════╤═══════╤══════╤═════════╗');
27
		Common::l(' ║ Level │ Text │ Capabilities │ Image │ File │ Credits ║');
28
		Common::l(' ╟───────┼──────┼──────────────┼───────┼──────┼─────────╢');
29
		Common::l(' ║ 1     │ X    │              │       │      │         ║');
30
		Common::l(' ║ 2     │ X    │ X            │ X     │ X    │         ║');
31
		Common::l("\033[1;36m\033[40m▶".'║ 3     │ X    │ X            │ X     │ X    │ X       ║'."\033[0m");
32
		Common::l(' ╚═══════╧══════╧══════════════╧═══════╧══════╧═════════╝');
33
	}
34
}
35