Skip to content

Commit

Permalink
rename methods isFirstHalf and isSecondHalf
Browse files Browse the repository at this point in the history
  • Loading branch information
brenoroosevelt committed Sep 19, 2023
1 parent adebd62 commit 9a0eac4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Chronos.php
Original file line number Diff line number Diff line change
Expand Up @@ -2061,7 +2061,7 @@ public function isLastYear(): bool
*
* @return bool
*/
public function isFirstHalfOfYear(): bool
public function isFirstHalf(): bool
{
return $this->half === 1;
}
Expand All @@ -2071,7 +2071,7 @@ public function isFirstHalfOfYear(): bool
*
* @return bool
*/
public function isSecondHalfOfYear(): bool
public function isSecondHalf(): bool
{
return $this->half === 2;
}
Expand Down
4 changes: 2 additions & 2 deletions src/ChronosDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ public function isLastYear(DateTimeZone|string|null $timezone = null): bool
*
* @return bool
*/
public function isFirstHalfOfYear(): bool
public function isFirstHalf(): bool
{
return $this->half === 1;
}
Expand All @@ -1241,7 +1241,7 @@ public function isFirstHalfOfYear(): bool
*
* @return bool
*/
public function isSecondHalfOfYear(): bool
public function isSecondHalf(): bool
{
return $this->half === 2;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Date/IsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ public function testIsWithinNext()
public function testIsFirstOrSecondHalfOfYear(int $month, bool $isFirstHalfOfYear, bool $isSecondHalfOfYear): void
{
$d = Chronos::createFromDate(2023, $month, 1);
$this->assertSame($isFirstHalfOfYear, $d->isFirstHalfOfYear());
$this->assertSame($isSecondHalfOfYear, $d->isSecondHalfOfYear());
$this->assertSame($isFirstHalfOfYear, $d->isFirstHalf());
$this->assertSame($isSecondHalfOfYear, $d->isSecondHalf());
}
}
4 changes: 2 additions & 2 deletions tests/TestCase/DateTime/IsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ public function testIsWithinNext()
public function testIsFirstOrSecondHalfOfYear(int $month, bool $isFirstHalfOfYear, bool $isSecondHalfOfYear): void
{
$d = ChronosDate::create(2023, $month, 1);
$this->assertSame($isFirstHalfOfYear, $d->isFirstHalfOfYear());
$this->assertSame($isSecondHalfOfYear, $d->isSecondHalfOfYear());
$this->assertSame($isFirstHalfOfYear, $d->isFirstHalf());
$this->assertSame($isSecondHalfOfYear, $d->isSecondHalf());
}
}

0 comments on commit 9a0eac4

Please sign in to comment.