Passed
Push — master ( 9df7f2...b3774a )
by Alexey
02:53
created

FlotAsset::init()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 8
c 0
b 0
f 0
dl 0
loc 10
rs 10
cc 2
nc 2
nop 0
1
<?php
2
3
namespace backend\widgets\chart\flot\assets;
4
5
use yii\web\AssetBundle;
6
use yii\web\JqueryAsset;
7
8
/**
9
 * Class FlotAsset
10
 *
11
 * @package backend\widgets\chart\flot\assets
12
 */
13
class FlotAsset extends AssetBundle
14
{
15
    /** @var string */
16
    public $sourcePath = '@vendor/almasaeed2010/adminlte/bower_components/Flot';
17
18
    /**
19
     * @inheritDoc
20
     */
21
    public function init()
22
    {
23
        parent::init();
24
        $min = YII_ENV_DEV ? '' : '.min';
25
        $this->js = [
26
            'excanvas' . $min . '.js',
27
            'jquery.flot.js',
28
            'jquery.flot.pie.js',
29
            'jquery.flot.categories.js',
30
            'jquery.flot.resize.js'
31
        ];
32
    }
33
34
35
    /**
36
     * @var string[]
37
     */
38
    public $depends = [
39
        JqueryAsset::class,
40
    ];
41
}
42