Test Setup Failed
Push — master ( 5e19b6...00752f )
by Dennis
03:43
created

RegionStatic::setDeep()   A

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
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
namespace SimpleCMS\Region\Packages;
3
4
/**
5
 * 地理信息基础模型
6
 */
7
class RegionStatic
8
{
9
10
    /**
11
     * 行政名称
12
     *
13
     * @var string|null
14
     */
15
    public string $name;
16
17
    /**
18
     * 简称/短名
19
     *
20
     * @var string|null
21
     */
22
    public string $short;
23
24
    /**
25
     * 行政编码(具备唯一性)
26
     *
27
     * @var string|null
28
     */
29
    public string $code;
30
31
    /**
32
     * 电话区号
33
     *
34
     * @var string|null
35
     */
36
    public string $area;
37
38
    /**
39
     * 邮政编码
40
     *
41
     * @var string|null
42
     */
43
    public string $zip;
44
45
    /**
46
     * 经度(高德坐标系/GCJ-02/火星坐标)
47
     *
48
     * @var float|null
49
     */
50
    public float $lng;
51
52
    /**
53
     * 纬度(高德坐标系/GCJ-02/火星坐标)
54
     *
55
     * @var float|null
56
     */
57
    public float $lat;
58
59
    /**
60
     * 行政区划层级
61
     * @var int
62
     */
63
    public int $deep = 0;
64
65
    /**
66
     * 设置行政区划层级
67
     * @param int $deep
68
     * @return void
69
     */
70
    public function setDeep(int $deep):void
71
    {
72
        $this->deep = $deep;
73
    }
74
}