mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-04 21:23:36 +00:00
Clean up code.
This commit is contained in:
@@ -49,7 +49,6 @@ class IsDateOrTime implements ValidationRule
|
||||
$value = (string)$value;
|
||||
if ('' === $value) {
|
||||
$fail('validation.date_or_time')->translate();
|
||||
;
|
||||
return;
|
||||
}
|
||||
if (10 === strlen($value)) {
|
||||
@@ -60,13 +59,11 @@ class IsDateOrTime implements ValidationRule
|
||||
app('log')->error(sprintf('"%s" is not a valid date: %s', $value, $e->getMessage()));
|
||||
|
||||
$fail('validation.date_or_time')->translate();
|
||||
;
|
||||
return;
|
||||
} catch (InvalidFormatException $e) { // @phpstan-ignore-line
|
||||
app('log')->error(sprintf('"%s" is of an invalid format: %s', $value, $e->getMessage()));
|
||||
|
||||
$fail('validation.date_or_time')->translate();
|
||||
;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -79,13 +76,11 @@ class IsDateOrTime implements ValidationRule
|
||||
app('log')->error(sprintf('"%s" is not a valid date or time: %s', $value, $e->getMessage()));
|
||||
|
||||
$fail('validation.date_or_time')->translate();
|
||||
;
|
||||
return;
|
||||
} catch (InvalidFormatException $e) {
|
||||
app('log')->error(sprintf('"%s" is of an invalid format: %s', $value, $e->getMessage()));
|
||||
|
||||
$fail('validation.date_or_time')->translate();
|
||||
;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user