ContainerHelper::getContainer()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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