src/admin/controllers/StatsController.php
Method generateEchartsJson
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function generateEchartsJson($daysRange, $series)
{
$days = [];
foreach (array_keys($daysRange) as $item) {
$days[] = strftime("%a, %e.%b", $item);
Method generateSeriesData
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function generateSeriesData($start, $end)
{
$interval = new DateInterval('P1D');
$daterange = new DatePeriod((new Datetime())->setTimestamp($start), $interval, (new Datetime())->setTimestamp($end));
$daysRange = [];