Some code cleanup.

This commit is contained in:
James Cole
2018-07-13 15:50:42 +02:00
parent d872484607
commit 2b4088c5f7
32 changed files with 76 additions and 84 deletions

View File

@@ -49,7 +49,6 @@ use Illuminate\Database\Query\JoinClause;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection;
use Log;
use Steam;
/**
* TODO rename references to journals to transactions
@@ -282,10 +281,10 @@ class JournalCollector implements JournalCollectorInterface
$set->each(
function (Transaction $transaction) {
$transaction->date = new Carbon($transaction->date);
$transaction->description = Steam::decrypt((int)$transaction->encrypted, $transaction->description);
$transaction->description = app('steam')->decrypt((int)$transaction->encrypted, $transaction->description);
if (null !== $transaction->bill_name) {
$transaction->bill_name = Steam::decrypt((int)$transaction->bill_name_encrypted, $transaction->bill_name);
$transaction->bill_name = app('steam')->decrypt((int)$transaction->bill_name_encrypted, $transaction->bill_name);
}
$transaction->account_name = app('steam')->tryDecrypt($transaction->account_name);
$transaction->opposing_account_name = app('steam')->tryDecrypt($transaction->opposing_account_name);