AssetPanel   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 37.5%

Importance

Changes 0
Metric Value
dl 0
loc 26
ccs 3
cts 8
cp 0.375
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDetail() 0 6 1
A save() 0 7 2
1
<?php
2
3
namespace bedezign\yii2\audit\panels;
4
5
use bedezign\yii2\audit\components\panels\DataStoragePanelTrait;
6
use Yii;
7
8
/**
9
 * AssetPanel
10
 * @package bedezign\yii2\audit\panels
11
 */
12
class AssetPanel extends \yii\debug\panels\AssetPanel
13
{
14
    use DataStoragePanelTrait;
15
16
    /**
17
     * @return string
18
     */
19
    public function getDetail()
20
    {
21
        return Yii::$app->view->render('@yii/debug/views/default/panels/assets/detail', [
22
            'panel' => $this,
23
        ]);
24
    }
25
26
    /**
27
     * @inheritdoc
28
     */
29 57
    public function save()
30
    {
31 57
        if (\Yii::$app->request instanceof \yii\web\Request) {
32 57
            return parent::save();
33
        }
34
        return null;
35
    }
36
37
}