mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 14:48:11 +00:00
Code cleanup.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user