Completed
Push — IncomprehensibleFinder/xavi ( fcea6b...fbab92 )
by
unknown
02:46
created

Person::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

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