Various code cleanup.

This commit is contained in:
James Cole
2017-10-05 11:49:06 +02:00
parent b18012a36c
commit e68594a93b
34 changed files with 137 additions and 147 deletions

View File

@@ -66,7 +66,7 @@ class BunqInformation implements InformationInterface
}
Log::debug('Now in getAccounts()');
$sessionToken = $this->startSession();
$userId = $this->getUserInformation($sessionToken);
$userId = $this->getUserInformation($sessionToken);
// get list of Bunq accounts:
$accounts = $this->getMonetaryAccounts($sessionToken, $userId);
$return = [];

View File

@@ -13,7 +13,6 @@ declare(strict_types=1);
namespace FireflyIII\Support;
use Amount as GlobalAmount;
use Carbon\Carbon;
use Crypt;
use DB;
@@ -51,7 +50,7 @@ class Steam
$currencyId = intval($account->getMeta('currency_id'));
// use system default currency:
if ($currencyId === 0) {
$currency = GlobalAmount::getDefaultCurrency();
$currency = app('amount')->getDefaultCurrency();
$currencyId = $currency->id;
}
// first part: get all balances in own currency:

View File

@@ -265,12 +265,12 @@ class AmountFormat extends Twig_Extension
/**
* @return Twig_SimpleFunction
*/
protected function journalTotalAmount(): Twig_SimpleFunction
protected function journalAmount(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
'journalTotalAmount', function (TransactionJournal $journal): string {
'journalAmount', function (TransactionJournal $journal): string {
return app('amount')->journalTotalAmount($journal, true);
return app('amount')->journalAmount($journal, true);
}, ['is_safe' => ['html']]
);
}
@@ -278,12 +278,12 @@ class AmountFormat extends Twig_Extension
/**
* @return Twig_SimpleFunction
*/
protected function journalAmount(): Twig_SimpleFunction
protected function journalTotalAmount(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
'journalAmount', function (TransactionJournal $journal): string {
'journalTotalAmount', function (TransactionJournal $journal): string {
return app('amount')->journalAmount($journal, true);
return app('amount')->journalTotalAmount($journal, true);
}, ['is_safe' => ['html']]
);
}