@@ -60,12 +60,12 @@ 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 | - if (false === $day) { |
|
| 67 | - return false; |
|
| 68 | - } |
|
| 66 | + if (false === $day) { |
|
| 67 | + return false; |
|
| 68 | + } |
|
| 69 | 69 | |
| 70 | 70 | $comparator = new DateIntervalComparator(); |
| 71 | 71 | return 0 > $comparator->compare($day->diff($date), new DateInterval('P1D')); |
@@ -89,16 +89,16 @@ discard block |
||
| 89 | 89 | return $base->add(new DateInterval("P{$days}D")); |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - /** |
|
| 93 | - * @param DateTime|DateTimeImmutable $date |
|
| 94 | - * @return DateTime|DateTimeImmutable|false |
|
| 95 | - */ |
|
| 96 | - private function getOffsetDay($date, int $offset) |
|
| 97 | - { |
|
| 98 | - if ($offset < 0) { |
|
| 99 | - return $date->sub(new DateInterval('P' . $offset * -1 . 'D')); |
|
| 100 | - } |
|
| 101 | - |
|
| 102 | - return $date->add(new DateInterval('P' . $offset . 'D')); |
|
| 103 | - } |
|
| 92 | + /** |
|
| 93 | + * @param DateTime|DateTimeImmutable $date |
|
| 94 | + * @return DateTime|DateTimeImmutable|false |
|
| 95 | + */ |
|
| 96 | + private function getOffsetDay($date, int $offset) |
|
| 97 | + { |
|
| 98 | + if ($offset < 0) { |
|
| 99 | + return $date->sub(new DateInterval('P' . $offset * -1 . 'D')); |
|
| 100 | + } |
|
| 101 | + |
|
| 102 | + return $date->add(new DateInterval('P' . $offset . 'D')); |
|
| 103 | + } |
|
| 104 | 104 | } |