Completed
Push — IncomprehensibleFinder/xavi ( c40efa...577002 )
by
unknown
02:24
created

PeopleComparison::setFirstPerson()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Kata\Algorithm;
6
7
final class PeopleComparison
8
{
9
    /** @var Person */
10
    private $first_person;
11
12
    /** @var Person */
13
    private $second_person;
14
15
    /** @var int */
16
    private $birthday_difference;
17
18 6
    public function firstPerson()
19
    {
20 6
        return $this->first_person;
21
    }
22
23 6
    public function secondPerson()
24
    {
25 6
        return $this->second_person;
26
    }
27
28 4
    public function birthdayDifference()
29
    {
30 4
        return $this->birthday_difference;
31
    }
32
33 4
    public function setFirstPerson(Person $a_person)
34
    {
35 4
        $this->first_person = $a_person;
36 4
    }
37
38 4
    public function setSecondPerson(Person $a_person)
39
    {
40 4
        $this->second_person = $a_person;
41 4
    }
42
43 4
    public function setBirthdayDifference(int $a_birthday_difference)
44
    {
45 4
        $this->birthday_difference = $a_birthday_difference;
46 4
    }
47
}
48