| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3.0416 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | 3 | protected function generate() |
|
| 10 | { |
||
| 11 | 3 | $this->description = 'Vaderdag'; |
|
| 12 | |||
| 13 | 3 | if ($this->year >= 2009) { |
|
| 14 | $this->setupDateTimeObjects($this->generateDateTime($this->year, 6, 19)); |
||
| 15 | 3 | } else if ($this->year >= 1909) { |
|
| 16 | 3 | $timestamp = strtotime('third sunday', mktime(0, 0, 0, 6, 0, $this->year)); |
|
| 17 | 3 | $date = new \DateTime(); |
|
| 18 | 3 | $date->setTimestamp($timestamp); |
|
| 19 | |||
| 20 | 3 | $this->setupDateTimeObjects($date); |
|
| 21 | 3 | } else { |
|
| 22 | $this->valid = false; |
||
| 23 | } |
||
| 24 | 3 | } |
|
| 25 | } |
||
| 26 |