Code cleanup

This commit is contained in:
James Cole
2018-04-28 06:23:13 +02:00
parent 6f0e1c79ac
commit 13b78bdc20
218 changed files with 621 additions and 681 deletions

View File

@@ -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);
}