1 | <?php |
||
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() |
|
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) |
|
47 | } |
||
48 |