mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Code cleanup
This commit is contained in:
@@ -112,7 +112,7 @@ class ParseDateString
|
||||
return new Carbon('1984-09-17');
|
||||
}
|
||||
// maybe a year, nothing else?
|
||||
if (4 === strlen($date) && is_numeric($date) && (int)$date > 1000 && (int)$date <= 3000) {
|
||||
if (4 === strlen($date) && is_numeric($date) && (int) $date > 1000 && (int) $date <= 3000) {
|
||||
return new Carbon(sprintf('%d-01-01', $date));
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ class ParseDateString
|
||||
}
|
||||
$direction = str_starts_with($part, '+') ? 1 : 0;
|
||||
$period = $part[strlen($part) - 1];
|
||||
$number = (int)substr($part, 1, -1);
|
||||
$number = (int) substr($part, 1, -1);
|
||||
if (!array_key_exists($period, $functions[$direction])) {
|
||||
app('log')->error(sprintf('No method for direction %d and period "%s".', $direction, $period));
|
||||
|
||||
|
Reference in New Issue
Block a user