Outlet::getAddress()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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