Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3.0416 |
Changes | 0 |
1 | <?php |
||
41 | 4 | public function versus(Couple $second_couple): bool |
|
42 | { |
||
43 | 4 | if (self::CLOSEST_BIRTHDAY === $this->criteria) { |
|
44 | 2 | return $this->first_couple->hasLessDistanceThan($second_couple); |
|
45 | } |
||
46 | |||
47 | 2 | if (self::FURTHEST_BIRTHDAY === $this->criteria) { |
|
48 | 2 | return $this->first_couple->hasGreaterDistanceThan($second_couple); |
|
49 | } |
||
50 | } |
||
51 | } |
||
52 |