Remove superfluous checks
This commit is contained in:
parent
c8d0292ca8
commit
df1d2c10eb
@ -451,14 +451,14 @@ final class NodaTimeSplitter {
|
||||
if (self::is_numeric((string)\substr($datum, 0, 2))) {
|
||||
$day = \substr($datum, 0, 2);
|
||||
}
|
||||
else if (\in_array(\substr($datum, 1, 1), [".", " "]) && self::is_numeric((string)\substr($datum, 0, 1))) {
|
||||
else if (\in_array(\substr($datum, 1, 1), [".", " "], true) && self::is_numeric((string)\substr($datum, 0, 1))) {
|
||||
$day = "0" . \substr($datum, 0, 1);
|
||||
}
|
||||
|
||||
if (!empty($year) and !empty($monat) and !empty($day) and $use_day) {
|
||||
if (!empty($monat) and !empty($day) and $use_day) {
|
||||
return [$year, $year, $monat, $day, '+', ""];
|
||||
}
|
||||
else if (!empty($year) and !empty($monat)) {
|
||||
else if (!empty($monat)) {
|
||||
return [$year, $year, $monat, "00", '+', ""];
|
||||
}
|
||||
return [];
|
||||
@ -537,10 +537,10 @@ final class NodaTimeSplitter {
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($year) and !empty($monat) and !empty($day)) {
|
||||
if (!empty($monat) and !empty($day)) {
|
||||
return [$year, $year, $monat, $day, '+', ""];
|
||||
}
|
||||
else if (!empty($year) and !empty($monat)) {
|
||||
else if (!empty($monat)) {
|
||||
return [$year, $year, $monat, "00", '+', ""];
|
||||
}
|
||||
return [];
|
||||
|
Loading…
Reference in New Issue
Block a user