Test Failed
Pull Request — master (#1)
by
unknown
09:08
created

PhoneUI::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * Phone.php
4
 *
5
 * @copyright      More in license.md
6
 * @license        http://www.ipublikuj.eu
7
 * @author         Adam Kadlec <[email protected]>
8
 * @package        iPublikuj:PhoneUI!
9
 * @subpackage     common
10
 * @since          1.0.0
11
 *
12
 * @date           12.12.15
13
 */
14
15
declare(strict_types = 1);
16
17
namespace IPub\PhoneUI;
18
19
use Nette;
20
21
use IPub\Phone;
22
23
/**
24
 * Phone number UI helpers
25
 *
26
 * @package        iPublikuj:PhoneUI!
27
 * @subpackage     common
28
 *
29
 * @author         Adam Kadlec <[email protected]>
30
 */
31 1
final class PhoneUI
32
{
33
	/**
34
	 * Implement nette smart magic
35
	 */
36 1
	use Nette\SmartObject;
37
38
	/**
39
	 * @var Phone\Phone
40
	 */
41
	private $phone;
42
43
	/**
44
	 * @param Phone\Phone $phone
45
	 */
46
	public function __construct(Phone\Phone $phone)
47
	{
48
		$this->phone = $phone;
49
	}
50
51
	/**
52
	 * @return Templating\Helpers
53
	 */
54
	public function createTemplateHelpers()
55
	{
56
		return new Templating\Helpers($this->phone);
57
	}
58
}
59