DefaultController::actionIndex()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 5
ccs 0
cts 0
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace bedezign\yii2\audit\controllers;
4
5
use bedezign\yii2\audit\components\panels\RendersSummaryChartTrait;
6
use bedezign\yii2\audit\components\web\Controller;
7
use bedezign\yii2\audit\models\AuditEntry;
8
use Yii;
9
10
/**
11
 * DefaultController
12
 * @package bedezign\yii2\audit\controllers
13
 */
14
class DefaultController extends Controller
15
{
16
    use RendersSummaryChartTrait;
17
18 3
    /**
19
     * Module Default Action.
20 3
     * @return mixed
21
     */
22
    public function actionIndex()
23
    {
24
        $chartData = $this->getChartData();
25
        return $this->render('index', ['chartData' => $chartData]);
26
    }
27
28
    protected function getChartModel()
29
    {
30
        return AuditEntry::className();
31
    }
32
}
33