| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | 98 | public function set(int $day, int $month, int $year) |
|
| 39 | { |
||
| 40 | 98 | $validator = new DateValidator($day, $month, $year); |
|
| 41 | |||
| 42 | 98 | if (!$validator->isValid()) { |
|
| 43 | 17 | throw new InvalidDateException(); |
|
| 44 | } |
||
| 45 | |||
| 46 | 81 | $this->day = $day; |
|
| 47 | 81 | $this->month = $month; |
|
| 48 | 81 | $this->year = $year; |
|
| 49 | |||
| 50 | 81 | $this->jdn = (int) static::process($day, $month, $year); |
|
| 51 | |||
| 52 | 81 | return $this; |
|
| 53 | } |
||
| 54 | |||
| 72 |