adding abstract function to Stats class
This commit is contained in:
parent
642810cb6d
commit
b713592c25
@ -123,6 +123,13 @@ abstract class Stats
|
||||
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 getAmountByMonth($year, $format = 0);
|
||||
|
||||
/**
|
||||
* Return amount of elements by month for several years.
|
||||
* Criterias used to build request are defined into the constructor of parent class into xxx/class/xxxstats.class.php
|
||||
@ -180,7 +187,7 @@ abstract class Stats
|
||||
$year = $year - 1;
|
||||
}
|
||||
while ($year <= $endyear) {
|
||||
$datay[$year] = $this->_getAmountByMonth($year, $format);
|
||||
$datay[$year] = $this->getAmountByMonth($year, $format);
|
||||
$year++;
|
||||
}
|
||||
|
||||
@ -460,7 +467,6 @@ abstract class Stats
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
/**
|
||||
* Return the amount per month for a given year
|
||||
|
||||
Loading…
Reference in New Issue
Block a user