AbstractUI   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 3
dl 0
loc 31
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
show() 0 1 ?
A getHelperSet() 0 3 1
A getService() 0 3 1
1
<?php
2
namespace keeko\tools\ui;
3
4
use keeko\tools\helpers\QuestionHelperTrait;
5
use keeko\tools\services\IOService;
6
use Symfony\Component\Console\Command\Command;
7
use keeko\tools\command\AbstractKeekoCommand;
8
use keeko\tools\services\CommandService;
9
10
abstract class AbstractUI {
11
	
12
	use QuestionHelperTrait;
13
	
14
	/** @var AbstractKeekoCommand */
15
	protected $command;
16
	
17
	/** @var IOService */
18
	protected $io;
19
	
20
	public function __construct(AbstractKeekoCommand $command) {
21
		$this->command = $command;
22
		$this->io = $command->getService()->getIOService();
23
	}
24
	
25
	abstract public function show();
0 ignored issues
show
Documentation introduced by
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
26
	
27
	/**
28
	 * @return HelperSet
29
	 */
30
	protected function getHelperSet() {
31
		return $this->command->getHelperSet();
32
	}
33
	
34
	/**
35
	 * @return CommandService
36
	 */
37
	protected function getService() {
38
		return $this->command->getService();
39
	}
40
}