Fix bug in month names similar in English and German

This commit is contained in:
Joshua Ramon Enslin 2021-01-06 16:07:21 +01:00
parent 8f612dede1
commit a6030e4a5f
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
2 changed files with 2 additions and 3 deletions

View File

@ -403,14 +403,14 @@ final class NodaTimeSplitter {
foreach (self::MONTH_NAMES_ENGLISH as $monthVal => $monthValidNames) { foreach (self::MONTH_NAMES_ENGLISH as $monthVal => $monthValidNames) {
if (self::stri_occurs($datum, $monthValidNames)) { if (self::stri_occurs($datum, $monthValidNames)) {
if (!empty($monat)) return []; if (!empty($monat)) break;
$monat = (string)$monthVal; $monat = (string)$monthVal;
} }
} }
foreach (self::MONTH_NAMES_GERMAN as $monthVal => $monthValidNames) { foreach (self::MONTH_NAMES_GERMAN as $monthVal => $monthValidNames) {
if (self::stri_occurs($datum, $monthValidNames)) { if (self::stri_occurs($datum, $monthValidNames)) {
if (!empty($monat)) return []; if (!empty($monat)) break;
$monat = (string)$monthVal; $monat = (string)$monthVal;
} }
} }

View File

@ -20,7 +20,6 @@
enforceTimeLimit="true" enforceTimeLimit="true"
failOnWarning="true" failOnWarning="true"
forceCoversAnnotation="false" forceCoversAnnotation="false"
printerClass="PHPUnit\TextUI\ResultPrinter"
processIsolation="true" processIsolation="true"
stopOnError="true" stopOnError="true"
stopOnFailure="true" stopOnFailure="true"