Code reordering and reformatting. I should really start employing style CI.

This commit is contained in:
James Cole
2021-09-18 10:26:12 +02:00
parent 9b9d52e99f
commit 4003cea759
344 changed files with 2776 additions and 2605 deletions

View File

@@ -24,12 +24,14 @@ declare(strict_types=1);
namespace FireflyIII\Support\Http\Controllers;
use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
use FireflyIII\Models\Account;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
use FireflyIII\Support\CacheProperties;
use Illuminate\Support\Collection;
use JsonException;
use Log;
/**
@@ -45,8 +47,8 @@ trait ChartGeneration
* @param Carbon $end
*
* @return array
* @throws \FireflyIII\Exceptions\FireflyException
* @throws \JsonException
* @throws FireflyException
* @throws JsonException
*/
protected function accountBalanceChart(Collection $accounts, Carbon $start, Carbon $end): array // chart helper method.
{
@@ -58,7 +60,7 @@ trait ChartGeneration
$cache->addProperty('chart.account.account-balance-chart');
$cache->addProperty($accounts);
if ($cache->has()) {
return $cache->get();
return $cache->get();
}
Log::debug('Regenerate chart.account.account-balance-chart from scratch.');
$locale = app('steam')->getLocale();
@@ -74,7 +76,7 @@ trait ChartGeneration
$chartData = [];
/** @var Account $account */
foreach ($accounts as $account) {
// See reference nr. 33
// See reference nr. 33
$currency = $repository->find((int)$accountRepos->getMetaValue($account, 'currency_id'));
if (null === $currency) {
$currency = $default;