@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | { |
| 61 | 61 | $year = (int) $date->format('Y'); |
| 62 | 62 | |
| 63 | - $easter = $this->getEaster($year); |
|
| 64 | - $day = $this->getOffsetDay($easter, $this->offset); |
|
| 63 | + $easter = $this->getEaster($year); |
|
| 64 | + $day = $this->getOffsetDay($easter, $this->offset); |
|
| 65 | 65 | |
| 66 | 66 | $comparator = new DateIntervalComparator(); |
| 67 | 67 | return 0 > $comparator->compare($day->diff($date), new DateInterval('P1D')); |
@@ -85,16 +85,16 @@ discard block |
||
| 85 | 85 | return $base->add(new DateInterval("P{$days}D")); |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | - /** |
|
| 89 | - * @param DateTime|DateTimeImmutable $date |
|
| 90 | - * @return DateTime|DateTimeImmutable |
|
| 91 | - */ |
|
| 92 | - private function getOffsetDay($date, int $offset) |
|
| 93 | - { |
|
| 94 | - if ($offset < 0) { |
|
| 95 | - return $date->sub(new DateInterval('P' . $offset * -1 . 'D')); |
|
| 96 | - } |
|
| 97 | - |
|
| 98 | - return $date->add(new DateInterval('P' . $offset . 'D')); |
|
| 99 | - } |
|
| 88 | + /** |
|
| 89 | + * @param DateTime|DateTimeImmutable $date |
|
| 90 | + * @return DateTime|DateTimeImmutable |
|
| 91 | + */ |
|
| 92 | + private function getOffsetDay($date, int $offset) |
|
| 93 | + { |
|
| 94 | + if ($offset < 0) { |
|
| 95 | + return $date->sub(new DateInterval('P' . $offset * -1 . 'D')); |
|
| 96 | + } |
|
| 97 | + |
|
| 98 | + return $date->add(new DateInterval('P' . $offset . 'D')); |
|
| 99 | + } |
|
| 100 | 100 | } |