From 8625fcec2f1000cb4da31d242d37b80ce7341926 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 2 Dec 2018 09:59:17 +0100 Subject: [PATCH] Delete always-true condition Found by PHPStan. Change-Id: Ibefd9d5d1b374448650a36702db18144f5feddae --- languages/Language.php | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) 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 ) { -- 2.20.1