diff --git a/src/PeriodTraits/PeriodOperations.php b/src/PeriodTraits/PeriodOperations.php index a3ccd84..c9b08cc 100644 --- a/src/PeriodTraits/PeriodOperations.php +++ b/src/PeriodTraits/PeriodOperations.php @@ -40,7 +40,7 @@ public function overlap(Period ...$others): ?static { if (count($others) === 0) { return null; - } else if (count($others) > 1) { + } elseif (count($others) > 1) { return $this->overlapAll(...$others); } else { $other = $others[0]; @@ -119,7 +119,7 @@ public function subtract(Period ...$others): PeriodCollection { if (count($others) === 0) { return PeriodCollection::make($this); - } else if (count($others) > 1) { + } elseif (count($others) > 1) { return $this->subtractAll(...$others); } else { $other = $others[0]; diff --git a/tests/Operations/OverlapTest.php b/tests/Operations/OverlapTest.php index 1eb3f91..f2421a5 100644 --- a/tests/Operations/OverlapTest.php +++ b/tests/Operations/OverlapTest.php @@ -186,7 +186,7 @@ public function passing_empty_period_collection_returns_null() $current = Period::make('2018-01-01', '2018-01-31'); $emptyCollection = new PeriodCollection; - $diff = $current->overlap(... $emptyCollection); + $diff = $current->overlap(...$emptyCollection); $this->assertNull($diff); } diff --git a/tests/Operations/SubtractTest.php b/tests/Operations/SubtractTest.php index 616a2e3..550b9d6 100644 --- a/tests/Operations/SubtractTest.php +++ b/tests/Operations/SubtractTest.php @@ -231,7 +231,7 @@ public function passing_empty_period_collection_returns_same_period_within_colle $current = Period::make('2018-01-01', '2018-01-31'); $emptyCollection = new PeriodCollection; - $diff = $current->subtract(... $emptyCollection); + $diff = $current->subtract(...$emptyCollection); $this->assertInstanceOf(PeriodCollection::class, $diff); $this->assertCount(1, $diff);