mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +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);
|
$dateEnd->modify($modifyString);
|
||||||
}
|
}
|
||||||
|
|
||||||
$year = $dateStart->format('Y');
|
$year = (int)$dateStart->format('Y');
|
||||||
$dateStart->setDate($year, 1, 1);
|
$dateStart->setDate($year, 1, 1);
|
||||||
$dateEnd->setDate($year, 12, 31);
|
$dateEnd->setDate($year, 12, 31);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user