OutletShort::getPropertyInitMap()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace alekciy\ofd\providers\taxcom\Model;
4
5
use alekciy\ofd\BaseModel;
6
use alekciy\ofd\interfaces\OutletInterface;
7
use alekciy\ofd\providers\taxcom\Status;
8
9
/**
10
 * Сокращенная информацию по торговой точке.
11
 */
12
class OutletShort extends BaseModel implements OutletInterface
13
{
14
	/** @var string Адрес торговой точки */
15
	public $address = '';
16
17
	/** @var string Код торговой точки */
18
	public $code = '';
19
20
	/** @var string Идентификатор торговой точки */
21
	public $id = '';
22
23
	/** @var string Название торговой точки */
24
	public $name = '';
25
26
	/** @var string Признак наличия проблемы */
27
	public $problemIndicator = '';
28
29
	/**
30
	 * @inheritDoc
31
	 */
32
	public function getRuleList(): array
33
	{
34
		return [
35
			'id' => ['required', ['lengthMax', 36]],
36
			'name' => ['required', ['lengthMax', 255]],
37
			'code' => [['lengthMax', 10]],
38
			'problemIndicator' => [['in', [
39
				Status::OK,
40
				Status::PROBLEM,
41
				Status::WARNING,
42
			]]]
43
		];
44
	}
45
46
	/**
47
	 * @inheritDoc
48
	 */
49
	public function getId(): string
50
	{
51
		return $this->id;
52
	}
53
54
	/**
55
	 * @inheritDoc
56
	 */
57
	public function getName(): string
58
	{
59
		return $this->name;
60
	}
61
62
	/**
63
	 * @inheritDoc
64
	 */
65
	public function getAddress(): string
66
	{
67
		return $this->address;
68
	}
69
70
	/**
71
	 * @inheritDoc
72
	 */
73
	protected function getPropertyInitMap(): array
74
	{
75
		return [];
76
	}
77
}