mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 04:03:26 +00:00
Code cleanup
This commit is contained in:
@@ -66,10 +66,10 @@ class ChartJsGenerator implements GeneratorInterface
|
||||
{
|
||||
reset($data);
|
||||
$first = current($data);
|
||||
$labels = is_array($first['entries']) ? array_keys($first['entries']) : [];
|
||||
$labels = \is_array($first['entries']) ? array_keys($first['entries']) : [];
|
||||
|
||||
$chartData = [
|
||||
'count' => count($data),
|
||||
'count' => \count($data),
|
||||
'labels' => $labels, // take ALL labels from the first set.
|
||||
'datasets' => [],
|
||||
];
|
||||
@@ -119,7 +119,7 @@ class ChartJsGenerator implements GeneratorInterface
|
||||
// different sort when values are positive and when they're negative.
|
||||
asort($data);
|
||||
$next = next($data);
|
||||
if (!is_bool($next) && 1 === bccomp($next, '0')) {
|
||||
if (!\is_bool($next) && 1 === bccomp($next, '0')) {
|
||||
// next is positive, sort other way around.
|
||||
arsort($data);
|
||||
}
|
||||
|
@@ -42,7 +42,6 @@ class MonthReportGenerator implements ReportGeneratorInterface
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
public function generate(): string
|
||||
{
|
||||
|
@@ -41,8 +41,6 @@ class MonthReportGenerator implements ReportGeneratorInterface
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*
|
||||
|
||||
*/
|
||||
public function generate(): string
|
||||
{
|
||||
|
@@ -40,8 +40,6 @@ class MultiYearReportGenerator implements ReportGeneratorInterface
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*
|
||||
|
||||
*/
|
||||
public function generate(): string
|
||||
{
|
||||
|
@@ -40,8 +40,6 @@ class YearReportGenerator implements ReportGeneratorInterface
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*
|
||||
|
||||
*/
|
||||
public function generate(): string
|
||||
{
|
||||
|
Reference in New Issue
Block a user