| @@ 121-123 (lines=3) @@ | ||
| 118 | */ | |
| 119 | public function assertValid() | |
| 120 |     { | |
| 121 |         if (null !== $this->day && null === $this->month) { | |
| 122 |             throw new \Exception('Day set, but no month'); | |
| 123 | } | |
| 124 | ||
| 125 |         if (null !== $this->month && null === $this->year) { | |
| 126 |             throw new \Exception('Month, but no year'); | |
| @@ 125-127 (lines=3) @@ | ||
| 122 |             throw new \Exception('Day set, but no month'); | |
| 123 | } | |
| 124 | ||
| 125 |         if (null !== $this->month && null === $this->year) { | |
| 126 |             throw new \Exception('Month, but no year'); | |
| 127 | } | |
| 128 | ||
| 129 | return true; | |
| 130 | } | |