luyadev/luya-module-crawler

View on GitHub
src/admin/controllers/StatsController.php

Summary

Maintainability
A
2 hrs
Test Coverage
F
0%

Method generateEchartsJson has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function generateEchartsJson($daysRange, $series)
    {
        $days = [];
        foreach (array_keys($daysRange) as $item) {
            $days[] = strftime("%a, %e.%b", $item);
Severity: Minor
Found in src/admin/controllers/StatsController.php - About 1 hr to fix

    Method generateSeriesData has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function generateSeriesData($start, $end)
        {
            $interval = new DateInterval('P1D');
            $daterange = new DatePeriod((new Datetime())->setTimestamp($start), $interval, (new Datetime())->setTimestamp($end));
            $daysRange = [];
    Severity: Minor
    Found in src/admin/controllers/StatsController.php - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status