Code cleanup.

This commit is contained in:
James Cole
2023-12-20 19:35:52 +01:00
parent c4f6366642
commit 64ec0cf62e
997 changed files with 12908 additions and 28136 deletions

View File

@@ -29,7 +29,6 @@ use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Repositories\Account\AccountTaskerInterface;
use FireflyIII\Support\CacheProperties;
use Illuminate\Support\Collection;
use Throwable;
/**
* Class AccountController.
@@ -39,11 +38,6 @@ class AccountController extends Controller
/**
* Show partial overview for account balances.
*
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return string
* @throws FireflyException
*/
public function general(Collection $accounts, Carbon $start, Carbon $end): string
@@ -61,12 +55,14 @@ class AccountController extends Controller
/** @var AccountTaskerInterface $accountTasker */
$accountTasker = app(AccountTaskerInterface::class);
$accountReport = $accountTasker->getAccountReport($accounts, $start, $end);
try {
$result = view('reports.partials.accounts', compact('accountReport'))->render();
} catch (Throwable $e) {
} catch (\Throwable $e) {
app('log')->error(sprintf('Could not render reports.partials.accounts: %s', $e->getMessage()));
app('log')->error($e->getTraceAsString());
$result = 'Could not render view.';
throw new FireflyException($result, 0, $e);
}