mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 11:48:05 +00:00
Clean up code.
This commit is contained in:
@@ -209,7 +209,7 @@ class ChartJsGenerator implements GeneratorInterface
|
||||
*/
|
||||
public function singleSet(string $setLabel, array $data): array
|
||||
{
|
||||
$chartData = [
|
||||
return [
|
||||
'count' => 1,
|
||||
'labels' => array_keys($data), // take ALL labels from the first set.
|
||||
'datasets' => [
|
||||
@@ -219,7 +219,5 @@ class ChartJsGenerator implements GeneratorInterface
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
return $chartData;
|
||||
}
|
||||
}
|
||||
|
@@ -41,12 +41,9 @@ use Throwable;
|
||||
*/
|
||||
class MonthReportGenerator implements ReportGeneratorInterface
|
||||
{
|
||||
/** @var Collection The accounts used. */
|
||||
private $accounts;
|
||||
/** @var Carbon End date of the report. */
|
||||
private $end;
|
||||
/** @var Carbon Start date of the report. */
|
||||
private $start;
|
||||
private Collection $accounts;
|
||||
private Carbon $end;
|
||||
private Carbon $start;
|
||||
|
||||
/**
|
||||
* Generates the report.
|
||||
@@ -155,7 +152,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
|
||||
|
||||
}
|
||||
$locale = app('steam')->getLocale();
|
||||
$return = [
|
||||
return [
|
||||
'journals' => $journals,
|
||||
'currency' => $currency,
|
||||
'exists' => count($journals) > 0,
|
||||
@@ -164,8 +161,6 @@ class MonthReportGenerator implements ReportGeneratorInterface
|
||||
'dayBefore' => $date->formatLocalized((string) trans('config.month_and_day', [], $locale)),
|
||||
'dayBeforeBalance' => $dayBeforeBalance,
|
||||
];
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user