Clean up code.

This commit is contained in:
James Cole
2023-12-10 06:51:59 +01:00
parent c2b22a2bac
commit 46e130fdfe
195 changed files with 973 additions and 984 deletions

View File

@@ -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;
}
}