From f41a5bc752f5c725629063ee0bcdfada947a559d Mon Sep 17 00:00:00 2001 From: thibdrev Date: Mon, 15 Jan 2024 18:54:33 +0100 Subject: [PATCH] phpstan Function dol_get_first_day() should return int but returns string. Function getWeekNumber() should return int but returns string. --- htdocs/core/lib/date.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 479417cc32f..ed0a2b03ebf 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -579,7 +579,7 @@ function dol_get_first_day($year, $month = 1, $gm = false) if ($year > 9999) { return ''; } - return dol_mktime(0, 0, 0, $month, 1, $year, $gm); + return (int) dol_mktime(0, 0, 0, $month, 1, $year, $gm); } @@ -1170,5 +1170,5 @@ function getWeekNumber($day, $month, $year) { $date = new DateTime($year.'-'.$month.'-'.$day); $week = $date->format("W"); - return $week; + return (int) $week; }