mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-04 21:23:36 +00:00
Code cleanup
This commit is contained in:
@@ -59,7 +59,7 @@ class TransactionJournal extends Twig_Extension
|
||||
/** @var JournalRepositoryInterface $repository */
|
||||
$repository = app(JournalRepositoryInterface::class);
|
||||
$result = $repository->getMetaField($journal, $field);
|
||||
if (is_null($result)) {
|
||||
if (null === $result) {
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -80,10 +80,10 @@ class TransactionJournal extends Twig_Extension
|
||||
/** @var JournalRepositoryInterface $repository */
|
||||
$repository = app(JournalRepositoryInterface::class);
|
||||
$result = $repository->getMetaField($journal, $field);
|
||||
if (is_null($result)) {
|
||||
if (null === $result) {
|
||||
return false;
|
||||
}
|
||||
if (strlen(strval($result)) === 0) {
|
||||
if (strlen((string)$result) === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -135,8 +135,7 @@ class TransactionJournal extends Twig_Extension
|
||||
}
|
||||
$array[] = app('amount')->formatAnything($total['currency'], $total['amount']);
|
||||
}
|
||||
$txt = join(' / ', $array);
|
||||
|
||||
return $txt;
|
||||
return join(' / ', $array);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user