Prefecture   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 7
dl 0
loc 37
c 0
b 0
f 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getCode() 0 3 1
A getName() 0 3 1
1
<?php
2
3
namespace JpPrefecture;
4
5
/**
6
 * Class Prefecture
7
 * @package JpPrefecture
8
 */
9
class Prefecture implements PrefectureInterface
10
{
11
    /**
12
     * @var int
13
     */
14
    protected $code;
15
16
    /**
17
     * @var string
18
     */
19
    protected $name;
20
21
    /**
22
     * Prefecture constructor.
23
     * @param $code
24
     * @param $name
25
     */
26
    public function __construct($code, $name)
27
    {
28
        $this->code = $code;
29
        $this->name = $name;
30
    }
31
32
    /**
33
     * @return int
34
     */
35
    public function getCode()
36
    {
37
        return $this->code;
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function getName()
44
    {
45
        return $this->name;
46
    }
47
}