@@ -293,6 +293,7 @@ discard block |
||
| 293 | 293 | |
| 294 | 294 | /** |
| 295 | 295 | * @param \Spatie\Period\Period ...$periods |
| 296 | + * @param Period[] $periods |
|
| 296 | 297 | * |
| 297 | 298 | * @return \Spatie\Period\PeriodCollection|static[] |
| 298 | 299 | */ |
@@ -309,6 +310,7 @@ discard block |
||
| 309 | 310 | |
| 310 | 311 | /** |
| 311 | 312 | * @param \Spatie\Period\Period ...$periods |
| 313 | + * @param Period[] $periods |
|
| 312 | 314 | * |
| 313 | 315 | * @return \Spatie\Period\Period|static |
| 314 | 316 | */ |
@@ -367,6 +369,7 @@ discard block |
||
| 367 | 369 | |
| 368 | 370 | /** |
| 369 | 371 | * @param \Spatie\Period\Period ...$periods |
| 372 | + * @param Period[] $periods |
|
| 370 | 373 | * |
| 371 | 374 | * @return \Spatie\Period\PeriodCollection|static[] |
| 372 | 375 | */ |
@@ -396,6 +399,9 @@ discard block |
||
| 396 | 399 | return $this->precisionMask; |
| 397 | 400 | } |
| 398 | 401 | |
| 402 | + /** |
|
| 403 | + * @param string|null $format |
|
| 404 | + */ |
|
| 399 | 405 | protected static function resolveDate($date, ?string $format): DateTimeImmutable |
| 400 | 406 | { |
| 401 | 407 | if ($date instanceof DateTimeImmutable) { |
@@ -2,13 +2,13 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Spatie\Period; |
| 4 | 4 | |
| 5 | -use DateTime; |
|
| 6 | 5 | use DateInterval; |
| 6 | +use DateTime; |
|
| 7 | 7 | use DateTimeImmutable; |
| 8 | 8 | use DateTimeInterface; |
| 9 | +use Spatie\Period\Exceptions\CannotComparePeriods; |
|
| 9 | 10 | use Spatie\Period\Exceptions\InvalidDate; |
| 10 | 11 | use Spatie\Period\Exceptions\InvalidPeriod; |
| 11 | -use Spatie\Period\Exceptions\CannotComparePeriods; |
|
| 12 | 12 | |
| 13 | 13 | class Period |
| 14 | 14 | { |
@@ -2,9 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Spatie\Period; |
| 4 | 4 | |
| 5 | -use Iterator; |
|
| 6 | -use Countable; |
|
| 7 | 5 | use ArrayAccess; |
| 6 | +use Countable; |
|
| 7 | +use Iterator; |
|
| 8 | 8 | |
| 9 | 9 | class PeriodCollection implements ArrayAccess, Iterator, Countable |
| 10 | 10 | { |