Passed
Push — master ( ead853...557cfb )
by Alexey
03:41
created

ChartAsset   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
eloc 8
c 1
b 0
f 1
dl 0
loc 22
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 6 2
1
<?php
2
3
namespace backend\widgets\chart\sparkline\assets;
4
5
use yii\web\AssetBundle;
6
use yii\web\JqueryAsset;
7
8
/**
9
 * Class ChartAsset
10
 *
11
 * @package backend\widgets\chart\sparkline\assets
12
 */
13
class ChartAsset extends AssetBundle
14
{
15
    /** @var string */
16
    public $sourcePath = '@vendor/almasaeed2010/adminlte/bower_components/jquery-sparkline/dist';
17
18
    /**
19
     * @inheritDoc
20
     */
21
    public function init()
22
    {
23
        parent::init();
24
        $min = YII_ENV_DEV ? '' : '.min';
25
        $this->js = [
26
            'jquery.sparkline' . $min . '.js'
27
        ];
28
    }
29
30
    /**
31
     * @var string[]
32
     */
33
    public $depends = [
34
        JqueryAsset::class,
35
    ];
36
}
37