Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
brendt committed Mar 17, 2021
1 parent 2665162 commit d7331b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Overlap two or more periods on each other. The resulting period will be the unio

![](./docs/img/period-overlap.png)

### `overlapAny(Period ...$periods): PeriodCollection`
### `overlapAny(Period ...$others): PeriodCollection`

Overlap two or more periods on each other. Whenever two or periods overlap, that overlapping period is added to a collection that's the final result.

Expand Down
6 changes: 3 additions & 3 deletions src/PeriodTraits/PeriodOperations.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ protected function overlapAll(Period ...$periods): ?static
}

/**
* @param \Spatie\Period\Period ...$periods
* @param \Spatie\Period\Period ...$others
*
* @return \Spatie\Period\PeriodCollection|static[]
*/
public function overlapAny(Period ...$periods): PeriodCollection
public function overlapAny(Period ...$others): PeriodCollection
{
$overlapCollection = new PeriodCollection();

foreach ($periods as $period) {
foreach ($others as $period) {
$overlap = $this->overlap($period);

if ($overlap === null) {
Expand Down

0 comments on commit d7331b2

Please sign in to comment.