Check   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 14
c 2
b 0
f 0
dl 0
loc 35
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php
2
3
namespace alekciy\ffd\documents;
4
5
use alekciy\ffd\DocumentInterface;
6
use alekciy\ffd\tags\Tag1012;
7
use alekciy\ffd\tags\Tag1020;
8
use alekciy\ffd\tags\Tag1037;
9
use alekciy\ffd\tags\Tag1040;
10
use alekciy\ffd\tags\Tag1041;
11
use alekciy\ffd\tags\Tag1084;
12
use Exception;
13
14
/**
15
 * Фискальный документ: кассовый чек (Кассовый чек).
16
 */
17
class Check implements DocumentInterface
18
{
19
	/** @var int Тип документа */
20
	public $type = self::TYPE_CHECK;
21
22
	/** @var Tag1041 Заводской номер ФН */
23
	public $fnFactoryNumber;
24
25
	/** @var Tag1040 Номер фискального документа (ФД) */
26
	public $fdNumber;
27
28
	/** @var Tag1037 Регистрационный номер контрольно-кассовой техники (ККТ) */
29
	public $kktRegNumber;
30
31
	/** @var Tag1012 Дата и время формирования фискального документа (во временной зоне ККТ) */
32
	public $createAt;
33
34
	/** @var Tag1020 ИТОГ, включая размер НДС и наценки */
35
	public $total;
36
37
	/** @var Tag1084 Дополнительный реквизит пользователя */
38
	public $extend;
39
40
	/**
41
	 * @inheritDoc
42
	 * @throws Exception
43
	 */
44
	public function __construct(string $version, string $format, array &$init)
45
	{
46
		$this->createAt        = new Tag1012($this->type, $format, $version, $init);
47
		$this->total           = new Tag1020($this->type, $format, $version, $init);
48
		$this->kktRegNumber    = new Tag1037($this->type, $format, $version, $init);
49
		$this->fdNumber        = new Tag1040($this->type, $format, $version, $init);
50
		$this->fnFactoryNumber = new Tag1041($this->type, $format, $version, $init);
51
		$this->extend          = new Tag1084($this->type, $format, $version, $init);
52
	}
53
}
54