FeatureLevel::doRun()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 9.7666
c 0
b 0
f 0
cc 1
nc 1
nop 0
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