Update PHPDoc and comments

This commit is contained in:
Meritoo
2018-04-03 08:26:51 +02:00
parent f111174ed2
commit 5578b051a7
4 changed files with 53 additions and 4 deletions

View File

@@ -10,6 +10,7 @@ namespace Meritoo\Common\Utilities;
use DateInterval;
use DateTime;
use Exception;
use Meritoo\Common\Exception\Date\UnknownDatePartTypeException;
use Meritoo\Common\Type\DatePartType;
use Meritoo\Common\Type\DatePeriod;
@@ -68,6 +69,8 @@ class Date
*
* @param int $period The period, type of period. One of DatePeriod class constants, e.g. DatePeriod::LAST_WEEK.
* @return null|DatePeriod
*
* @throws Exception
*/
public static function getDatesForPeriod($period)
{
@@ -219,6 +222,7 @@ class Date
* Returns current day of week
*
* @return int
* @throws UnknownDatePartTypeException
*/
public static function getCurrentDayOfWeek()
{
@@ -485,6 +489,8 @@ class Date
* placeholder which is replaced with a number that represents each iteration.
* Default: interval for days.
* @return array
*
* @throws Exception
*/
public static function getDatesCollection(DateTime $startDate, $datesCount, $intervalTemplate = 'P%dD')
{
@@ -530,6 +536,8 @@ class Date
* @param string $intervalTemplate (optional) Template used to build date interval. The placeholder is replaced
* with next, iterated value.
* @return DateTime
*
* @throws Exception
*/
public static function getRandomDate(DateTime $startDate = null, $start = 1, $end = 100, $intervalTemplate = 'P%sD')
{