mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 14:41:20 +00:00
Fix various phpstan issues.
This commit is contained in:
@@ -266,10 +266,10 @@ trait ConvertsDataTypes
|
||||
// probably a date format.
|
||||
try {
|
||||
$carbon = Carbon::createFromFormat('Y-m-d', $value);
|
||||
} catch (InvalidDateException $e) {
|
||||
} catch (InvalidDateException $e) { // @phpstan-ignore-line
|
||||
app('log')->error(sprintf('[1] "%s" is not a valid date: %s', $value, $e->getMessage()));
|
||||
return null;
|
||||
} catch (InvalidFormatException $e) {
|
||||
} catch (InvalidFormatException $e) { // @phpstan-ignore-line
|
||||
app('log')->error(sprintf('[2] "%s" is of an invalid format: %s', $value, $e->getMessage()));
|
||||
|
||||
return null;
|
||||
@@ -279,7 +279,7 @@ trait ConvertsDataTypes
|
||||
// is an atom string, I hope?
|
||||
try {
|
||||
$carbon = Carbon::parse($value);
|
||||
} catch (InvalidDateException $e) {
|
||||
} catch (InvalidDateException $e) { // @phpstan-ignore-line
|
||||
app('log')->error(sprintf('[3] "%s" is not a valid date or time: %s', $value, $e->getMessage()));
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user