Completed
Push — IncomprehensibleFinder/Edu-Chr... ( 695d9d...0d3d24 )
by Eduard
01:39
created

Person::setBirthDate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 0
cts 3
cp 0
rs 10
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Kata\Algorithm;
6
7
use DateTimeImmutable;
8
9
final class Person
10
{
11
    /** @var string */
12
    private $name;
13
14
    /** @var DateTimeImmutable */
15
    private $birthDate;
16
17 6
    public function __construct(
18
        string $a_name,
19
        DateTimeImmutable $a_birthDate
20
    ) {
21 6
        $this->name = $a_name;
22 6
        $this->birthDate = $a_birthDate;
23 6
    }
24
25
    public function name(): string
26
    {
27
        return $this->name;
28
    }
29
30 4
    public function birthDate(): DateTimeImmutable
31
    {
32 4
        return $this->birthDate;
33
    }
34
}
35