1 | <?php |
||
7 | class Couple |
||
8 | { |
||
9 | /** @var Person */ |
||
10 | public $younger; |
||
11 | |||
12 | /** @var Person */ |
||
13 | public $older; |
||
14 | |||
15 | /** @var int */ |
||
16 | public $birthday_distance_in_seconds; |
||
17 | |||
18 | 4 | public function __construct(Person $first_person, Person $second_person) |
|
31 | |||
32 | /** |
||
33 | * @return Person |
||
34 | */ |
||
35 | 4 | public function younger() |
|
39 | |||
40 | /** |
||
41 | * @return Person |
||
42 | */ |
||
43 | 4 | public function older() |
|
47 | |||
48 | /** |
||
49 | * @return int |
||
50 | */ |
||
51 | public function birthdayDistanceInSeconds(): int |
||
55 | |||
56 | 2 | public function hasGreaterDistanceThan(Couple $another_couple): bool |
|
60 | |||
61 | 2 | public function hasLessDistanceThan(Couple $another_couple): bool |
|
65 | } |
||
66 |