* Refactor reportModel::getYearMonths, and modify its unit test.

This commit is contained in:
liumengyi
2023-12-01 14:18:37 +08:00
parent d6856055bf
commit f9db851e1b
3 changed files with 12 additions and 6 deletions
+2 -1
View File
@@ -514,13 +514,14 @@ class reportModel extends model
}
/**
* 获取年度月份。
* Get year months.
*
* @param string $year
* @access public
* @return array
*/
public function getYearMonths($year)
public function getYearMonths(string $year): array
{
$months = array();
for($i = 1; $i <= 12; $i ++) $months[] = $year . '-' . sprintf('%02d', $i);