| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | 4 | public function __construct(Person $first_person, Person $second_person) |
|
| 19 | { |
||
| 20 | 4 | if ($first_person->birthDate() < $second_person->birthDate()) { |
|
| 21 | 3 | $this->younger = $first_person; |
|
| 22 | 3 | $this->older = $second_person; |
|
| 23 | } else { |
||
| 24 | 3 | $this->younger = $second_person; |
|
| 25 | 3 | $this->older = $first_person; |
|
| 26 | } |
||
| 27 | |||
| 28 | 4 | $this->birthday_distance_in_seconds = |
|
| 29 | 4 | $this->older->birthDate()->getTimestamp() - $this->younger->birthDate()->getTimestamp(); |
|
| 30 | 4 | } |
|
| 31 | |||
| 66 |