Code cleanup.

This commit is contained in:
James Cole
2017-11-22 21:12:27 +01:00
parent 4e6b782204
commit 781ca052d8
142 changed files with 213 additions and 859 deletions

View File

@@ -58,7 +58,7 @@ class Transaction extends Twig_Extension
$coloured = true;
// at this point amount is always negative.
if ($transaction->transaction_type_type === TransactionType::RECONCILIATION && bccomp(strval($transaction->transaction_amount),'0') === 1) {
if (TransactionType::RECONCILIATION === $transaction->transaction_type_type && 1 === bccomp(strval($transaction->transaction_amount), '0')) {
$amount = bcmul($amount, '-1');
}
@@ -290,7 +290,7 @@ class Transaction extends Twig_Extension
return $cache->get();
}
if($transaction->transaction_type_type === TransactionType::RECONCILIATION) {
if (TransactionType::RECONCILIATION === $transaction->transaction_type_type) {
return '—';
}
@@ -476,7 +476,7 @@ class Transaction extends Twig_Extension
if ($cache->has()) {
return $cache->get();
}
if($transaction->transaction_type_type === TransactionType::RECONCILIATION) {
if (TransactionType::RECONCILIATION === $transaction->transaction_type_type) {
return '—';
}