@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | class DatetimeProviderFactory |
10 | 10 | { |
11 | - public static function create(Recurrence $recurrence): EndOfMonthProvider|OptimizedProvider |
|
11 | + public static function create(Recurrence $recurrence): EndOfMonthProvider | OptimizedProvider |
|
12 | 12 | { |
13 | 13 | $provider = new OptimizedProvider(); |
14 | 14 |
@@ -6,5 +6,5 @@ |
||
6 | 6 | |
7 | 7 | interface DatetimeConstraintInterface |
8 | 8 | { |
9 | - public function apply(Recurrence $recurrence, \DateTime $datetime): \DateTime|null; |
|
9 | + public function apply(Recurrence $recurrence, \DateTime $datetime): \DateTime | null; |
|
10 | 10 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | throw new InvalidRecurrenceException('Recurrence required [COUNT] or [UNTIL] option'); |
27 | 27 | } |
28 | 28 | |
29 | - $constraintNames = array_map(static function ($constraint) { return $constraint::class; }, $constraints); |
|
29 | + $constraintNames = array_map(static function($constraint) { return $constraint::class; }, $constraints); |
|
30 | 30 | $duplicateConstraints = array_diff_key($constraintNames, array_unique($constraintNames)); |
31 | 31 | |
32 | 32 | if (!empty($duplicateConstraints)) { |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | if ($recurrence->hasCount()) { |
14 | 14 | $periodEndAt = clone $recurrence->getPeriodStartAt(); |
15 | - $periodEndAt->modify(str_replace('1', $recurrence->getCount() * $recurrence->getInterval(), $recurrence->getFrequency()->convertToDateTimeFormat())); |
|
15 | + $periodEndAt->modify(str_replace('1', $recurrence->getCount()*$recurrence->getInterval(), $recurrence->getFrequency()->convertToDateTimeFormat())); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | return $periodEndAt; |