Refactoring

This commit is contained in:
Meritoo
2019-05-05 23:06:18 +02:00
parent a6b2704c66
commit 98d0fed61d
4 changed files with 38 additions and 132 deletions

View File

@@ -66,11 +66,11 @@ class Date
/**
* Returns date's period (that contains start and end date) for given period
*
* @param int $period The period, type of period. One of DatePeriod class constants, e.g. DatePeriod::LAST_WEEK.
* @param string $period The period, type of period. One of DatePeriod class constants, e.g. DatePeriod::LAST_WEEK.
* @throws Exception
* @return null|DatePeriod
*/
public static function getDatesForPeriod($period)
public static function getDatesForPeriod(string $period): ?DatePeriod
{
/*
* Type of period is incorrect?