Person   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 53
ccs 0
cts 18
cp 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getName() 0 4 1
A getBirthday() 0 4 1
A getAddress() 0 4 1
1
<?php
2
3
namespace Defr\ValueObject;
4
5
use DateTime;
6
use DateTimeInterface;
7
8
final class Person
9
{
10
    /**
11
     * @var string
12
     */
13
    private $name;
14
15
    /**
16
     * @var DateTimeInterface
17
     */
18
    private $birthday;
19
20
    /**
21
     * @var string
22
     */
23
    private $address;
24
25
    /**
26
     * @param string $name
27
     * @param DateTimeInterface $birthday
28
     * @param string $address
29
     */
30
    public function __construct($name, DateTimeInterface $birthday, $address)
31
    {
32
        $this->name = $name;
33
        $this->birthday = $birthday;
34
        $this->address = $address;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function getName()
41
    {
42
        return $this->name;
43
    }
44
45
    /**
46
     * @return DateTime
47
     */
48
    public function getBirthday()
49
    {
50
        return $this->birthday;
51
    }
52
53
    /**
54
     * @return string
55
     */
56
    public function getAddress()
57
    {
58
        return $this->address;
59
    }
60
}
61