mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
Fix "Cannot call method add on possibly null value" bug pointed by Psalm
This commit is contained in:
@@ -120,7 +120,10 @@ class Date
|
|||||||
|
|
||||||
if (null !== $lastMonth) {
|
if (null !== $lastMonth) {
|
||||||
$dateStart = $lastMonth->getEndDate();
|
$dateStart = $lastMonth->getEndDate();
|
||||||
$dateStart->add(new DateInterval('P1D'));
|
|
||||||
|
if (null !== $dateStart) {
|
||||||
|
$dateStart->add(new DateInterval('P1D'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null !== $nextMonth) {
|
if (null !== $nextMonth) {
|
||||||
|
|||||||
Reference in New Issue
Block a user