Skip to content

Commit

Permalink
docs: use return tag to describe method return value (#763)
Browse files Browse the repository at this point in the history
  • Loading branch information
marmichalski authored Aug 21, 2024
1 parent be796e5 commit 4e1566f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ public function isBetween(self $start, self $end): bool
}

/**
* Returns an instance of {@see Date} incremented by the specified number of months.
* If the resulting month has fewer days than the current day, the day will be the last day of that month.
* @return self Instance incremented by the specified number of months.
* If the resulting month has fewer days than the current day, the day will be the last day of that month.
*
* @throws \InvalidArgumentException if $increment is less than 1
*/
Expand Down Expand Up @@ -158,15 +158,15 @@ public function offsetByYears(int $years): self
}

/**
* Returns an instance of \DateTimeImmutable shifted to start of day in a given timezone (falls back to system default)
* @return \DateTimeImmutable Instance shifted to start of day in a given timezone (falls back to system default)
*/
public function startOfDay(\DateTimeZone $timezone = null): \DateTimeImmutable
{
return DateTimeFactory::immutableFromFormat('Y-m-d', $this->toYearMonthDayString(), $timezone)->setTime(0, 0);
}

/**
* Returns an instance of \DateTimeImmutable shifted to end of day in a given timezone (falls back to system default)
* @return \DateTimeImmutable Instance shifted to end of day in a given timezone (falls back to system default)
*/
public function endOfDay(\DateTimeZone $timezone = null): \DateTimeImmutable
{
Expand Down

0 comments on commit 4e1566f

Please sign in to comment.