mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Fix various code things.
This commit is contained in:
@@ -355,7 +355,7 @@ trait ConvertsDataTypes
|
||||
foreach ($fields as $field => $info) {
|
||||
if ($this->has($info[0])) {
|
||||
$method = $info[1];
|
||||
$return[$field] = $this->$method($info[0]);
|
||||
$return[$field] = $this->$method($info[0]); // @phpstan-ignore-line
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ trait ConvertsDataTypes
|
||||
{
|
||||
$result = null;
|
||||
try {
|
||||
$result = $this->get($field) ? new Carbon($this->get($field), config('app.timezone')) : null;
|
||||
$result = '' !== (string) $this->get($field) ? new Carbon((string)$this->get($field), config('app.timezone')) : null;
|
||||
} catch (InvalidFormatException $e) {
|
||||
// @ignoreException
|
||||
}
|
||||
|
Reference in New Issue
Block a user