From 8dad51a0a0fcee97027ced5ee599de70a112bc60 Mon Sep 17 00:00:00 2001 From: Fabian Golle Date: Wed, 20 Sep 2023 18:35:17 +0200 Subject: [PATCH] Update CarbonGermanHolidays.php Removed PHP lang warning --- src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php b/src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php index b144be2..1ceefad 100644 --- a/src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php +++ b/src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php @@ -156,7 +156,7 @@ public static function getHolidays($year, $states = self::ALL_STATES) if (array_intersect([self::BERLIN, self::MECKLENBURG_VORPOMMERN], $states)) { $holidays['Internationaler Frauentag'] = mktime(0, 0, 0, 3, 8, $year); } - + if (in_array(self::BRANDENBURG, $states)) { $holidays['Ostersonntag'] = $easterSunday; $holidays['Pfingstsonntag'] = strtotime('+49 days', $easterSunday); @@ -219,14 +219,14 @@ public static function getHolidays($year, $states = self::ALL_STATES) //$holidays['Walpurgisnacht'] = mktime(0, 0, 0, 4, 30, $year); // WTF $holidays['Karsamstag'] = strtotime('-1 day', $easterSunday); $holidays['Allerseelen'] = mktime(0, 0, 0, 11, 2, $year); - $holidays['Erntedankfest'] = mktime(0, 0, 0, 10, 7 - ($year + 5 + $year / 4) % 7, $year); + $holidays['Erntedankfest'] = mktime(0, 0, 0, 10, 7 - intval($year + 5 + $year / 4) % 7, $year); $holidays['Volkstrauertag'] = strtotime('-3 days', $penanceDay); $holidays['Totensonntag'] = strtotime('+4 days', $penanceDay); } if (in_array(self::SPECIAL_DAYS_4, $states)) { - $holidays['Sommerzeit (+1h)'] = mktime(0, 0, 0, 3, 31 - ($year + 4 + $year / 4) % 7, $year); - $holidays['Winterzeit (-1h)'] = mktime(0, 0, 0, 10, 31 - ($year + 1 + $year / 4) % 7, $year); + $holidays['Sommerzeit (+1h)'] = mktime(0, 0, 0, 3, 31 - intval($year + 4 + $year / 4) % 7, $year); + $holidays['Winterzeit (-1h)'] = mktime(0, 0, 0, 10, 31 - intval($year + 1 + $year / 4) % 7, $year); } return array_map(static fn($u) => (new \DateTime())->setTimestamp($u), $holidays);