mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-18 23:50:09 +00:00
Code cleanup.
This commit is contained in:
@@ -29,7 +29,6 @@ use FireflyIII\Helpers\Report\ReportHelperInterface;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Support\CacheProperties;
|
||||
use Illuminate\Support\Collection;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* Class BillController
|
||||
@@ -37,11 +36,8 @@ use Throwable;
|
||||
class BillController extends Controller
|
||||
{
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return mixed|string
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function overview(Collection $accounts, Carbon $start, Carbon $end) // chart properties for cache:
|
||||
@@ -54,15 +50,18 @@ class BillController extends Controller
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
/** @var ReportHelperInterface $helper */
|
||||
$helper = app(ReportHelperInterface::class);
|
||||
$report = $helper->getBillReport($accounts, $start, $end);
|
||||
|
||||
try {
|
||||
$result = view('reports.partials.bills', compact('report'))->render();
|
||||
} catch (Throwable $e) {
|
||||
} catch (\Throwable $e) {
|
||||
app('log')->error(sprintf('Could not render reports.partials.budgets: %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