mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 01:31:45 +01:00
Fix "Argument 1 of DateTime::setdate expects int, string|false provided" bug pointed by Psalm
This commit is contained in:
@@ -160,7 +160,7 @@ class Date
|
||||
$dateEnd->modify($modifyString);
|
||||
}
|
||||
|
||||
$year = $dateStart->format('Y');
|
||||
$year = (int)$dateStart->format('Y');
|
||||
$dateStart->setDate($year, 1, 1);
|
||||
$dateEnd->setDate($year, 12, 31);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user