Completed
Push — IncomprehensibleFinder/spartan... ( 4f82a7 )
by Francisco
02:13
created

User::birthDate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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