ContainerHelper   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 5
c 1
b 0
f 0
dl 0
loc 36
ccs 7
cts 7
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A __construct() 0 3 1
A getContainer() 0 3 1
1
<?php
2
/**
3
 * This file is part of the Console-Kit library.
4
 * For the full copyright and license information, please view
5
 * the LICENSE file that was distributed with this source code.
6
 *
7
 * @copyright Alexander Obuhovich <[email protected]>
8
 * @link      https://github.com/console-helpers/console-kit
9
 */
10
11
namespace ConsoleHelpers\ConsoleKit\Helper;
12
13
14
use ConsoleHelpers\ConsoleKit\Container;
15
use Symfony\Component\Console\Helper\Helper;
16
17
class ContainerHelper extends Helper
18
{
19
20
	/**
21
	 * Container.
22
	 *
23
	 * @var Container
24
	 */
25
	private $_container;
26
27
	/**
28
	 * Creates helper instance.
29
	 *
30
	 * @param Container $container Container.
31
	 */
32 3
	public function __construct(Container $container)
33
	{
34 3
		$this->_container = $container;
35 3
	}
36
37
	/**
38
	 * Returns container.
39
	 *
40
	 * @return Container
41
	 */
42 1
	public function getContainer()
43
	{
44 1
		return $this->_container;
45
	}
46
47
	/**
48
	 * {@inheritdoc}
49
	 */
50 1
	public function getName()
51
	{
52 1
		return 'container';
53
	}
54
55
}
56