users weekly stats as bar-chart in dashboard (#847)

This commit is contained in:
Kevin Papst
2019-06-13 18:38:49 +02:00
committed by GitHub
parent e1f862507e
commit 3311f17bbb
96 changed files with 2754 additions and 846 deletions

View File

@@ -24,7 +24,6 @@ class Year
protected $months = [];
/**
* Year constructor.
* @param string $year
*/
public function __construct($year)
@@ -40,22 +39,14 @@ class Year
return $this->year;
}
/**
* @param Month $month
* @return $this
*/
public function setMonth(Month $month)
public function setMonth(Month $month): Year
{
$this->months[(int) $month->getMonth()] = $month;
return $this;
}
/**
* @param int $month
* @return null|Month
*/
public function getMonth(int $month)
public function getMonth(int $month): ?Month
{
if (isset($this->months[$month])) {
return $this->months[$month];
@@ -67,7 +58,7 @@ class Year
/**
* @return Month[]
*/
public function getMonths()
public function getMonths(): array
{
return array_values($this->months);
}