From: Jakub Vrana Date: Sun, 2 Dec 2018 08:59:17 +0000 (+0100) Subject: Delete always-true condition X-Git-Tag: 1.34.0-rc.0~3370 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=8625fcec2f1000cb4da31d242d37b80ce7341926;p=lhc%2Fweb%2Fwiklou.git Delete always-true condition Found by PHPStan. Change-Id: Ibefd9d5d1b374448650a36702db18144f5feddae --- diff --git a/languages/Language.php b/languages/Language.php index aa287e926a..0efade9f62 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1833,22 +1833,19 @@ class Language { while ( $hebrewMonth <= 12 ) { # Calculate days in this month if ( $isLeap && $hebrewMonth == 6 ) { - # Adar in a leap year - if ( $isLeap ) { - # Leap year - has Adar I, with 30 days, and Adar II, with 29 days - $days = 30; + # Leap year - has Adar I, with 30 days, and Adar II, with 29 days + $days = 30; + if ( $hebrewDay <= $days ) { + # Day in Adar I + $hebrewMonth = 13; + } else { + # Subtract the days of Adar I + $hebrewDay -= $days; + # Try Adar II + $days = 29; if ( $hebrewDay <= $days ) { - # Day in Adar I - $hebrewMonth = 13; - } else { - # Subtract the days of Adar I - $hebrewDay -= $days; - # Try Adar II - $days = 29; - if ( $hebrewDay <= $days ) { - # Day in Adar II - $hebrewMonth = 14; - } + # Day in Adar II + $hebrewMonth = 14; } } } elseif ( $hebrewMonth == 2 && $yearPattern == 2 ) {