Improve type-safety / explicitness

This commit is contained in:
2020-09-21 10:49:34 +02:00
committed by Stefan Rohde-Enslin
parent e4558ae227
commit dd2fbafd25
2 changed files with 4 additions and 4 deletions

View File

@ -195,10 +195,10 @@ final class NodaTimeSplitter {
else if (intval($moda[2]) !== 0 and intval($moda[3]) !== 0) {
return "{$moda[3]}.{$moda[2]}.{$moda[0]}{$suffix}";
}
else if ($moda[0] === $moda[1] && trim($moda[2], " 0") === "" && trim($moda[3], " 0") === "") {
else if ($moda[0] === $moda[1] && trim((string)$moda[2], " 0") === "" && trim((string)$moda[3], " 0") === "") {
return "{$moda[0]}{$suffix}";
}
else if ($moda[0] === $moda[1] && trim($moda[2], " 0") !== "" && trim($moda[3], " 0") === "") {
else if ($moda[0] === $moda[1] && trim((string)$moda[2], " 0") !== "" && trim((string)$moda[3], " 0") === "") {
setlocale(LC_TIME, NodaTimeAutotranslater::LANGS_TO_LOCALES['de']);
return strftime(getMonthFormatByLang("de"), MD_STD::strtotime("{$moda[0]}-{$moda[2]}-01 01:01:01")) . $suffix;
}