Completed
Push — IncomprehensibleFinder/xavi ( a3476a...872493 )
by
unknown
02:26
created

PeopleComparison::setYoungPerson()   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
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Kata\Algorithm;
6
7
final class PeopleComparison
8
{
9
    /** @var Person */
10
    private $young_person;
11
12
    /** @var Person */
13
    private $old_person;
14
15
    /** @var int */
16
    private $birthday_difference;
17
18 6
    public function youngPerson()
19
    {
20 6
        return $this->young_person;
21
    }
22
23 6
    public function oldPerson()
24
    {
25 6
        return $this->old_person;
26
    }
27
28 4
    public function birthdayDifference()
29
    {
30 4
        return $this->birthday_difference;
31
    }
32
33 4
    public function setYoungPerson(Person $a_person)
34
    {
35 4
        $this->young_person = $a_person;
36 4
    }
37
38 4
    public function setOldPerson(Person $a_person)
39
    {
40 4
        $this->old_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