Person::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
ccs 0
cts 6
cp 0
rs 9.4285
cc 1
eloc 4
nc 1
nop 3
crap 2
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