adding abstract function in Stats class

This commit is contained in:
NASDAMI Quatadah 2022-06-15 12:25:00 +02:00
parent 2c6e422791
commit fc4f5d9af2

View File

@ -219,6 +219,13 @@ abstract class Stats
return $data; return $data;
} }
/**
* @param int $year year number
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
* @return int value
*/
protected abstract function getAverageByMonth($year, $format = 0);
/** /**
* Return average of entity by month for several years * Return average of entity by month for several years
* *
@ -236,7 +243,7 @@ abstract class Stats
$year = $startyear; $year = $startyear;
while ($year <= $endyear) { while ($year <= $endyear) {
$datay[$year] = $this->_getAverageByMonth($year); $datay[$year] = $this->getAverageByMonth($year);
$year++; $year++;
} }