Code cleanup

This commit is contained in:
James Cole
2018-04-02 14:50:17 +02:00
parent 379b104778
commit fa7ab45a40
100 changed files with 440 additions and 517 deletions

View File

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