Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
40 | 4 | private function getBestMatchCouple(): Couple |
|
41 | { |
||
42 | 4 | $selected_couple = $this->couples[0]; |
|
43 | |||
44 | 4 | foreach ($this->couples as $current_couple) { |
|
45 | 4 | if ($this->birthday_distance_criteria->isSatisfiedBy($current_couple)->versus($selected_couple)) { |
|
46 | 4 | $selected_couple = $current_couple; |
|
47 | } |
||
48 | } |
||
49 | |||
50 | 4 | return $selected_couple; |
|
51 | } |
||
52 | } |
||
53 |